JFJochReceiver: Single preview, that can be switched to present all or indexed only results
This commit is contained in:
1 parent
af27854440
commit
566ff52bfc
9 files changed
+74
-81
No files matched your search
@@ -71,7 +71,7 @@ class DataProcessingPlots extends Component<MyProps, MyState> {
|
||||
render() {
|
||||
return <Paper style={{textAlign: 'center'}} sx={{ height: 630, width: "100%" }}>
|
||||
<Toolbar>
|
||||
<Grid container sx={{ minWidth: 450 }} >
|
||||
<Grid container sx={{ minWidth: 700 }} >
|
||||
<Tabs value={this.state.tab} onChange={this.tabsOnChange}>
|
||||
<Tab label="Indexing" value={1}/>
|
||||
<Tab label="Indexing/file" value={4} />
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, {Component} from 'react';
|
||||
|
||||
import Paper from '@mui/material/Paper';
|
||||
import {Grid, Slider, Typography} from "@mui/material";
|
||||
import {Grid, Slider, Switch, Typography} from "@mui/material";
|
||||
import {handleErrors} from "./handleErrors";
|
||||
|
||||
type MyProps = {
|
||||
@@ -18,7 +18,8 @@ type MyState = {
|
||||
highResolutionLimit?: number | string,
|
||||
lowResolutionLimit?: number | string,
|
||||
bkgEstimateLowQ: number | string,
|
||||
bkgEstimateHighQ: number | string
|
||||
bkgEstimateHighQ: number | string,
|
||||
previewIndexedOnly: boolean
|
||||
},
|
||||
connection_error: boolean;
|
||||
}
|
||||
@@ -35,7 +36,8 @@ class DataProcessingSettings extends Component<MyProps, MyState> {
|
||||
localBkgSize: 5,
|
||||
highResolutionLimit: 2.5,
|
||||
bkgEstimateLowQ: 3,
|
||||
bkgEstimateHighQ: 5
|
||||
bkgEstimateHighQ: 5,
|
||||
previewIndexedOnly: false
|
||||
},
|
||||
connection_error: true
|
||||
}
|
||||
@@ -44,6 +46,7 @@ class DataProcessingSettings extends Component<MyProps, MyState> {
|
||||
super(props);
|
||||
this.addr = props.addr;
|
||||
}
|
||||
|
||||
putValues() {
|
||||
fetch(this.addr + 'data_processing/settings', {
|
||||
method: "PUT",
|
||||
@@ -52,6 +55,14 @@ class DataProcessingSettings extends Component<MyProps, MyState> {
|
||||
.catch(error => console.log(error) );
|
||||
}
|
||||
|
||||
putValues2(x: MyState) {
|
||||
fetch(this.addr + 'data_processing/settings', {
|
||||
method: "PUT",
|
||||
body: JSON.stringify(x.s)
|
||||
}).then(handleErrors)
|
||||
.catch(error => console.log(error) );
|
||||
}
|
||||
|
||||
getValues() {
|
||||
fetch(this.addr + 'data_processing/settings')
|
||||
.then(handleErrors)
|
||||
@@ -119,6 +130,12 @@ class DataProcessingSettings extends Component<MyProps, MyState> {
|
||||
this.putValues();
|
||||
}
|
||||
|
||||
previewIndexedToggle = (event: React.ChangeEvent<HTMLInputElement>) => {
|
||||
let x = this.state;
|
||||
x.s.previewIndexedOnly = event.target.checked;
|
||||
this.putValues2(x);
|
||||
}
|
||||
|
||||
render() {
|
||||
return <Paper style={{textAlign: 'center'}} sx={{ height: 630, width: '100%' }}>
|
||||
<Grid container spacing={0}>
|
||||
@@ -149,9 +166,13 @@ class DataProcessingSettings extends Component<MyProps, MyState> {
|
||||
onChange={this.setHighResolutionLimit}
|
||||
min={1} max={5} step={0.2} valueLabelDisplay="auto" />
|
||||
<br/>
|
||||
<Switch onChange={this.previewIndexedToggle} checked={this.state.s.previewIndexedOnly}
|
||||
disabled={this.state.connection_error}/>
|
||||
Preview only indexed frames <br/><br/>
|
||||
</Grid>
|
||||
<Grid item xs={1}/>
|
||||
|
||||
|
||||
</Grid>
|
||||
</Paper>
|
||||
}
|
||||
|
||||
@@ -421,6 +421,7 @@ message DataProcessingSettings {
|
||||
optional float low_resolution_limit = 7;
|
||||
float bkg_estimate_low_q = 8;
|
||||
float bkg_estimate_high_q = 9;
|
||||
bool preview_indexed_only = 10;
|
||||
}
|
||||
|
||||
message PreviewFrameSpot {
|
||||
|
||||
+44
-44
@@ -13,25 +13,25 @@ _sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cjfjoch.proto\x12\x0eJFJochProtoBuf\"\x07\n\x05\x45mpty\"W\n\x08UnitCell\x12\t\n\x01\x61\x18\x01 \x01(\x02\x12\t\n\x01\x62\x18\x02 \x01(\x02\x12\t\n\x01\x63\x18\x03 \x01(\x02\x12\r\n\x05\x61lpha\x18\x04 \x01(\x02\x12\x0c\n\x04\x62\x65ta\x18\x05 \x01(\x02\x12\r\n\x05gamma\x18\x06 \x01(\x02\")\n\x06Vector\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\x12\t\n\x01z\x18\x03 \x01(\x02\"|\n\x10RotationSettings\x12\x17\n\x0fstart_angle_deg\x18\x01 \x01(\x02\x12 \n\x18\x61ngle_incr_per_image_deg\x18\x02 \x01(\x02\x12-\n\rrotation_axis\x18\x03 \x01(\x0b\x32\x16.JFJochProtoBuf.Vector\"\x1c\n\x04Plot\x12\t\n\x01x\x18\x01 \x03(\x02\x12\t\n\x01y\x18\x02 \x03(\x02\"E\n\x0cROIRectangle\x12\n\n\x02x0\x18\x01 \x01(\x05\x12\n\n\x02y0\x18\x02 \x01(\x05\x12\r\n\x05width\x18\x03 \x01(\x05\x12\x0e\n\x06height\x18\x04 \x01(\x05\"\xf2\x04\n\x0f\x44\x61tasetSettings\x12\x1a\n\x12images_per_trigger\x18\x01 \x01(\x03\x12\x10\n\x08ntrigger\x18\x02 \x01(\x03\x12\x13\n\tsummation\x18\x03 \x01(\x03H\x00\x12\x17\n\rimage_time_us\x18\x04 \x01(\x03H\x00\x12\x12\n\nbeam_x_pxl\x18\x05 \x01(\x02\x12\x12\n\nbeam_y_pxl\x18\x06 \x01(\x02\x12\x1c\n\x14\x64\x65tector_distance_mm\x18\x07 \x01(\x02\x12\x19\n\x11photon_energy_keV\x18\x08 \x01(\x02\x12\x13\n\x0b\x66ile_prefix\x18\t \x01(\t\x12\x17\n\x0f\x64\x61ta_file_count\x18\n \x01(\x03\x12\x30\n\x0b\x63ompression\x18\x0b \x01(\x0e\x32\x1b.JFJochProtoBuf.Compression\x12\x13\n\x0bsample_name\x18\x0c \x01(\t\x12\x30\n\tunit_cell\x18\r \x01(\x0b\x32\x18.JFJochProtoBuf.UnitCellH\x01\x88\x01\x01\x12\x1a\n\x12space_group_number\x18\x0e \x01(\x03\x12\x12\n\nbinning2x2\x18\x11 \x01(\x08\x12 \n\x18rad_int_solid_angle_corr\x18\x12 \x01(\x08\x12!\n\x19rad_int_polarization_corr\x18\x13 \x01(\x08\x12#\n\x1brad_int_polarization_factor\x18\x14 \x01(\x02\x12\x18\n\x10save_calibration\x18\x15 \x01(\x08\x12/\n\tuser_mask\x18\x16 \x03(\x0b\x32\x1c.JFJochProtoBuf.ROIRectangleB\x08\n\x06timingB\x0c\n\n_unit_cell\"\xb5\x03\n\x10\x44\x65tectorSettings\x12\x15\n\rframe_time_us\x18\x01 \x01(\x03\x12\x1a\n\rcount_time_us\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x1a\n\x12storage_cell_count\x18\x03 \x01(\x03\x12%\n\x1duse_internal_packet_generator\x18\x04 \x01(\x08\x12\x18\n\x10\x63ollect_raw_data\x18\x05 \x01(\x08\x12\x1f\n\x12pedestal_g0_frames\x18\x06 \x01(\x03H\x01\x88\x01\x01\x12\x1f\n\x12pedestal_g1_frames\x18\x07 \x01(\x03H\x02\x88\x01\x01\x12\x1f\n\x12pedestal_g2_frames\x18\x08 \x01(\x03H\x03\x88\x01\x01\x12\x19\n\x11\x63onversion_on_cpu\x18\t \x01(\x08\x12\"\n\x15storage_cell_delay_ns\x18\n \x01(\x03H\x04\x88\x01\x01\x42\x10\n\x0e_count_time_usB\x15\n\x13_pedestal_g0_framesB\x15\n\x13_pedestal_g1_framesB\x15\n\x13_pedestal_g2_framesB\x18\n\x16_storage_cell_delay_ns\"b\n\x16\x44\x65tectorModuleGeometry\x12\x0e\n\x06pixel0\x18\x01 \x01(\x03\x12\x1b\n\x13\x66\x61st_direction_step\x18\x02 \x01(\x03\x12\x1b\n\x13slow_direction_step\x18\x03 \x01(\x03\"z\n\x10\x44\x65tectorGeometry\x12\x11\n\twidth_pxl\x18\x01 \x01(\x03\x12\x12\n\nheight_pxl\x18\x02 \x01(\x03\x12?\n\x0fmodule_geometry\x18\x03 \x03(\x0b\x32&.JFJochProtoBuf.DetectorModuleGeometry\"\xde\x01\n\x08\x44\x65tector\x12\x10\n\x08nmodules\x18\x01 \x01(\x03\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x15\n\rpixel_size_mm\x18\x03 \x01(\x02\x12\x17\n\x0fmodule_hostname\x18\x04 \x03(\t\x12\x32\n\x08geometry\x18\x05 \x01(\x0b\x32 .JFJochProtoBuf.DetectorGeometry\x12*\n\x04type\x18\x06 \x01(\x0e\x32\x1c.JFJochProtoBuf.DetectorType\x12\x1b\n\x13udp_interface_count\x18\x07 \x01(\x03\"\xe2\x06\n\x10InternalSettings\x12\"\n\x1a\x66rame_time_pedestalG1G2_us\x18\x01 \x01(\x03\x12\x15\n\rframe_time_us\x18\x03 \x01(\x03\x12\x15\n\rcount_time_us\x18\x04 \x01(\x03\x12*\n\x08\x64\x65tector\x18\x05 \x01(\x0b\x32\x18.JFJochProtoBuf.Detector\x12\x14\n\x0cndatastreams\x18\x06 \x01(\x03\x12&\n\x1einternal_fpga_packet_generator\x18\t \x01(\x08\x12\x15\n\rstorage_cells\x18\n \x01(\x03\x12\x1a\n\x12storage_cell_start\x18\x0b \x01(\x03\x12\x1d\n\x15storage_cell_delay_ns\x18\' \x01(\x03\x12\x1a\n\x12pedestal_g0_frames\x18\x0c \x01(\x03\x12\x1a\n\x12pedestal_g1_frames\x18\r \x01(\x03\x12\x1a\n\x12pedestal_g2_frames\x18\x0e \x01(\x03\x12\x19\n\x11preview_period_us\x18\x0f \x01(\x03\x12\x1e\n\x16spot_finding_period_us\x18\x10 \x01(\x03\x12*\n\x04mode\x18\x13 \x01(\x0e\x32\x1c.JFJochProtoBuf.DetectorMode\x12\x19\n\x11mask_module_edges\x18\x14 \x01(\x08\x12\x17\n\x0fmask_chip_edges\x18\x15 \x01(\x08\x12\x16\n\x0eipv4_base_addr\x18\x16 \x01(\x03\x12\r\n\x05low_q\x18\x1a \x01(\x02\x12\x0e\n\x06high_q\x18\x1b \x01(\x02\x12\x11\n\tq_spacing\x18\x1c \x01(\x02\x12\x10\n\x08git_sha1\x18\x1d \x01(\t\x12\x10\n\x08git_date\x18\x1e \x01(\t\x12\x19\n\x11\x63onversion_on_cpu\x18\x1f \x01(\x08\x12\x13\n\x0bsource_name\x18 \x01(\t\x12\x19\n\x11source_name_short\x18! \x01(\t\x12\x17\n\x0finstrument_name\x18\" \x01(\t\x12\x1d\n\x15instrument_name_short\x18# \x01(\t\x12\x33\n\rroi_rectangle\x18$ \x03(\x0b\x32\x1c.JFJochProtoBuf.ROILine truncated
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cjfjoch.proto\x12\x0eJFJochProtoBuf\"\x07\n\x05\x45mpty\"W\n\x08UnitCell\x12\t\n\x01\x61\x18\x01 \x01(\x02\x12\t\n\x01\x62\x18\x02 \x01(\x02\x12\t\n\x01\x63\x18\x03 \x01(\x02\x12\r\n\x05\x61lpha\x18\x04 \x01(\x02\x12\x0c\n\x04\x62\x65ta\x18\x05 \x01(\x02\x12\r\n\x05gamma\x18\x06 \x01(\x02\")\n\x06Vector\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\x12\t\n\x01z\x18\x03 \x01(\x02\"|\n\x10RotationSettings\x12\x17\n\x0fstart_angle_deg\x18\x01 \x01(\x02\x12 \n\x18\x61ngle_incr_per_image_deg\x18\x02 \x01(\x02\x12-\n\rrotation_axis\x18\x03 \x01(\x0b\x32\x16.JFJochProtoBuf.Vector\"\x1c\n\x04Plot\x12\t\n\x01x\x18\x01 \x03(\x02\x12\t\n\x01y\x18\x02 \x03(\x02\"E\n\x0cROIRectangle\x12\n\n\x02x0\x18\x01 \x01(\x05\x12\n\n\x02y0\x18\x02 \x01(\x05\x12\r\n\x05width\x18\x03 \x01(\x05\x12\x0e\n\x06height\x18\x04 \x01(\x05\"\xf2\x04\n\x0f\x44\x61tasetSettings\x12\x1a\n\x12images_per_trigger\x18\x01 \x01(\x03\x12\x10\n\x08ntrigger\x18\x02 \x01(\x03\x12\x13\n\tsummation\x18\x03 \x01(\x03H\x00\x12\x17\n\rimage_time_us\x18\x04 \x01(\x03H\x00\x12\x12\n\nbeam_x_pxl\x18\x05 \x01(\x02\x12\x12\n\nbeam_y_pxl\x18\x06 \x01(\x02\x12\x1c\n\x14\x64\x65tector_distance_mm\x18\x07 \x01(\x02\x12\x19\n\x11photon_energy_keV\x18\x08 \x01(\x02\x12\x13\n\x0b\x66ile_prefix\x18\t \x01(\t\x12\x17\n\x0f\x64\x61ta_file_count\x18\n \x01(\x03\x12\x30\n\x0b\x63ompression\x18\x0b \x01(\x0e\x32\x1b.JFJochProtoBuf.Compression\x12\x13\n\x0bsample_name\x18\x0c \x01(\t\x12\x30\n\tunit_cell\x18\r \x01(\x0b\x32\x18.JFJochProtoBuf.UnitCellH\x01\x88\x01\x01\x12\x1a\n\x12space_group_number\x18\x0e \x01(\x03\x12\x12\n\nbinning2x2\x18\x11 \x01(\x08\x12 \n\x18rad_int_solid_angle_corr\x18\x12 \x01(\x08\x12!\n\x19rad_int_polarization_corr\x18\x13 \x01(\x08\x12#\n\x1brad_int_polarization_factor\x18\x14 \x01(\x02\x12\x18\n\x10save_calibration\x18\x15 \x01(\x08\x12/\n\tuser_mask\x18\x16 \x03(\x0b\x32\x1c.JFJochProtoBuf.ROIRectangleB\x08\n\x06timingB\x0c\n\n_unit_cell\"\xb5\x03\n\x10\x44\x65tectorSettings\x12\x15\n\rframe_time_us\x18\x01 \x01(\x03\x12\x1a\n\rcount_time_us\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x1a\n\x12storage_cell_count\x18\x03 \x01(\x03\x12%\n\x1duse_internal_packet_generator\x18\x04 \x01(\x08\x12\x18\n\x10\x63ollect_raw_data\x18\x05 \x01(\x08\x12\x1f\n\x12pedestal_g0_frames\x18\x06 \x01(\x03H\x01\x88\x01\x01\x12\x1f\n\x12pedestal_g1_frames\x18\x07 \x01(\x03H\x02\x88\x01\x01\x12\x1f\n\x12pedestal_g2_frames\x18\x08 \x01(\x03H\x03\x88\x01\x01\x12\x19\n\x11\x63onversion_on_cpu\x18\t \x01(\x08\x12\"\n\x15storage_cell_delay_ns\x18\n \x01(\x03H\x04\x88\x01\x01\x42\x10\n\x0e_count_time_usB\x15\n\x13_pedestal_g0_framesB\x15\n\x13_pedestal_g1_framesB\x15\n\x13_pedestal_g2_framesB\x18\n\x16_storage_cell_delay_ns\"b\n\x16\x44\x65tectorModuleGeometry\x12\x0e\n\x06pixel0\x18\x01 \x01(\x03\x12\x1b\n\x13\x66\x61st_direction_step\x18\x02 \x01(\x03\x12\x1b\n\x13slow_direction_step\x18\x03 \x01(\x03\"z\n\x10\x44\x65tectorGeometry\x12\x11\n\twidth_pxl\x18\x01 \x01(\x03\x12\x12\n\nheight_pxl\x18\x02 \x01(\x03\x12?\n\x0fmodule_geometry\x18\x03 \x03(\x0b\x32&.JFJochProtoBuf.DetectorModuleGeometry\"\xde\x01\n\x08\x44\x65tector\x12\x10\n\x08nmodules\x18\x01 \x01(\x03\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x15\n\rpixel_size_mm\x18\x03 \x01(\x02\x12\x17\n\x0fmodule_hostname\x18\x04 \x03(\t\x12\x32\n\x08geometry\x18\x05 \x01(\x0b\x32 .JFJochProtoBuf.DetectorGeometry\x12*\n\x04type\x18\x06 \x01(\x0e\x32\x1c.JFJochProtoBuf.DetectorType\x12\x1b\n\x13udp_interface_count\x18\x07 \x01(\x03\"\xe2\x06\n\x10InternalSettings\x12\"\n\x1a\x66rame_time_pedestalG1G2_us\x18\x01 \x01(\x03\x12\x15\n\rframe_time_us\x18\x03 \x01(\x03\x12\x15\n\rcount_time_us\x18\x04 \x01(\x03\x12*\n\x08\x64\x65tector\x18\x05 \x01(\x0b\x32\x18.JFJochProtoBuf.Detector\x12\x14\n\x0cndatastreams\x18\x06 \x01(\x03\x12&\n\x1einternal_fpga_packet_generator\x18\t \x01(\x08\x12\x15\n\rstorage_cells\x18\n \x01(\x03\x12\x1a\n\x12storage_cell_start\x18\x0b \x01(\x03\x12\x1d\n\x15storage_cell_delay_ns\x18\' \x01(\x03\x12\x1a\n\x12pedestal_g0_frames\x18\x0c \x01(\x03\x12\x1a\n\x12pedestal_g1_frames\x18\r \x01(\x03\x12\x1a\n\x12pedestal_g2_frames\x18\x0e \x01(\x03\x12\x19\n\x11preview_period_us\x18\x0f \x01(\x03\x12\x1e\n\x16spot_finding_period_us\x18\x10 \x01(\x03\x12*\n\x04mode\x18\x13 \x01(\x0e\x32\x1c.JFJochProtoBuf.DetectorMode\x12\x19\n\x11mask_module_edges\x18\x14 \x01(\x08\x12\x17\n\x0fmask_chip_edges\x18\x15 \x01(\x08\x12\x16\n\x0eipv4_base_addr\x18\x16 \x01(\x03\x12\r\n\x05low_q\x18\x1a \x01(\x02\x12\x0e\n\x06high_q\x18\x1b \x01(\x02\x12\x11\n\tq_spacing\x18\x1c \x01(\x02\x12\x10\n\x08git_sha1\x18\x1d \x01(\t\x12\x10\n\x08git_date\x18\x1e \x01(\t\x12\x19\n\x11\x63onversion_on_cpu\x18\x1f \x01(\x08\x12\x13\n\x0bsource_name\x18 \x01(\t\x12\x19\n\x11source_name_short\x18! \x01(\t\x12\x17\n\x0finstrument_name\x18\" \x01(\t\x12\x1d\n\x15instrument_name_short\x18# \x01(\t\x12\x33\n\rroi_rectangle\x18$ \x03(\x0b\x32\x1c.JFJochProtoBuf.ROILine truncated
|
||||
|
||||
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
|
||||
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'jfjoch_pb2', globals())
|
||||
if _descriptor._USE_C_DESCRIPTORS == False:
|
||||
|
||||
DESCRIPTOR._options = None
|
||||
_COMPRESSION._serialized_start=9090
|
||||
_COMPRESSION._serialized_end=9174
|
||||
_DETECTORTYPE._serialized_start=9176
|
||||
_DETECTORTYPE._serialized_end=9215
|
||||
_DETECTORMODE._serialized_start=9217
|
||||
_DETECTORMODE._serialized_end=9307
|
||||
_FPGAFIFOSTATUSENUM._serialized_start=9309
|
||||
_FPGAFIFOSTATUSENUM._serialized_end=9363
|
||||
_STATE._serialized_start=9365
|
||||
_STATE._serialized_end=9459
|
||||
_PLOTTYPE._serialized_start=9461
|
||||
_PLOTTYPE._serialized_end=9584
|
||||
_COMPRESSION._serialized_start=9120
|
||||
_COMPRESSION._serialized_end=9204
|
||||
_DETECTORTYPE._serialized_start=9206
|
||||
_DETECTORTYPE._serialized_end=9245
|
||||
_DETECTORMODE._serialized_start=9247
|
||||
_DETECTORMODE._serialized_end=9337
|
||||
_FPGAFIFOSTATUSENUM._serialized_start=9339
|
||||
_FPGAFIFOSTATUSENUM._serialized_end=9393
|
||||
_STATE._serialized_start=9395
|
||||
_STATE._serialized_end=9489
|
||||
_PLOTTYPE._serialized_start=9491
|
||||
_PLOTTYPE._serialized_end=9614
|
||||
_EMPTY._serialized_start=32
|
||||
_EMPTY._serialized_end=39
|
||||
_UNITCELL._serialized_start=41
|
||||
@@ -105,35 +105,35 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
||||
_FPGASTATUS._serialized_start=5873
|
||||
_FPGASTATUS._serialized_end=6768
|
||||
_DATAPROCESSINGSETTINGS._serialized_start=6771
|
||||
_DATAPROCESSINGSETTINGS._serialized_end=7117
|
||||
_PREVIEWFRAMESPOT._serialized_start=7119
|
||||
_PREVIEWFRAMESPOT._serialized_end=7176
|
||||
_PREVIEWFRAME._serialized_start=7179
|
||||
_PREVIEWFRAME._serialized_end=7497
|
||||
_MODULESTATISTICS._serialized_start=7500
|
||||
_MODULESTATISTICS._serialized_end=7737
|
||||
_IMAGE._serialized_start=7739
|
||||
_IMAGE._serialized_end=7812
|
||||
_MASKTOLOAD._serialized_start=7814
|
||||
_MASKTOLOAD._serialized_end=7860
|
||||
_MEASUREMENTSTATISTICS._serialized_start=7863
|
||||
_MEASUREMENTSTATISTICS._serialized_end=8476
|
||||
_BROKERSTATUS._serialized_start=8479
|
||||
_BROKERSTATUS._serialized_end=8694
|
||||
_BROKERFULLSTATUS._serialized_start=8697
|
||||
_BROKERFULLSTATUS._serialized_end=8861
|
||||
_DETECTORLISTELEMENT._serialized_start=8863
|
||||
_DETECTORLISTELEMENT._serialized_end=8935
|
||||
_DETECTORLIST._serialized_start=8937
|
||||
_DETECTORLIST._serialized_end=9055
|
||||
_DETECTORSELECTION._serialized_start=9057
|
||||
_DETECTORSELECTION._serialized_end=9088
|
||||
_GRPC_JFJOCHRECEIVER._serialized_start=9587
|
||||
_GRPC_JFJOCHRECEIVER._serialized_end=10354
|
||||
_GRPC_JFJOCHWRITER._serialized_start=10357
|
||||
_GRPC_JFJOCHWRITER._serialized_end=10559
|
||||
_GRPC_JFJOCHDETECTOR._serialized_start=10562
|
||||
_GRPC_JFJOCHDETECTOR._serialized_end=10948
|
||||
_GRPC_JFJOCHBROKER._serialized_start=10951
|
||||
_GRPC_JFJOCHBROKER._serialized_end=12640
|
||||
_DATAPROCESSINGSETTINGS._serialized_end=7147
|
||||
_PREVIEWFRAMESPOT._serialized_start=7149
|
||||
_PREVIEWFRAMESPOT._serialized_end=7206
|
||||
_PREVIEWFRAME._serialized_start=7209
|
||||
_PREVIEWFRAME._serialized_end=7527
|
||||
_MODULESTATISTICS._serialized_start=7530
|
||||
_MODULESTATISTICS._serialized_end=7767
|
||||
_IMAGE._serialized_start=7769
|
||||
_IMAGE._serialized_end=7842
|
||||
_MASKTOLOAD._serialized_start=7844
|
||||
_MASKTOLOAD._serialized_end=7890
|
||||
_MEASUREMENTSTATISTICS._serialized_start=7893
|
||||
_MEASUREMENTSTATISTICS._serialized_end=8506
|
||||
_BROKERSTATUS._serialized_start=8509
|
||||
_BROKERSTATUS._serialized_end=8724
|
||||
_BROKERFULLSTATUS._serialized_start=8727
|
||||
_BROKERFULLSTATUS._serialized_end=8891
|
||||
_DETECTORLISTELEMENT._serialized_start=8893
|
||||
_DETECTORLISTELEMENT._serialized_end=8965
|
||||
_DETECTORLIST._serialized_start=8967
|
||||
_DETECTORLIST._serialized_end=9085
|
||||
_DETECTORSELECTION._serialized_start=9087
|
||||
_DETECTORSELECTION._serialized_end=9118
|
||||
_GRPC_JFJOCHRECEIVER._serialized_start=9617
|
||||
_GRPC_JFJOCHRECEIVER._serialized_end=10384
|
||||
_GRPC_JFJOCHWRITER._serialized_start=10387
|
||||
_GRPC_JFJOCHWRITER._serialized_end=10589
|
||||
_GRPC_JFJOCHDETECTOR._serialized_start=10592
|
||||
_GRPC_JFJOCHDETECTOR._serialized_end=10978
|
||||
_GRPC_JFJOCHBROKER._serialized_start=10981
|
||||
_GRPC_JFJOCHBROKER._serialized_end=12670
|
||||
# @@protoc_insertion_point(module_scope)
|
||||
@@ -26,7 +26,6 @@ JFJochReceiver::JFJochReceiver(const JFJochProtoBuf::ReceiverInput &settings,
|
||||
Logger &in_logger, int64_t in_forward_and_sum_nthreads,
|
||||
int64_t in_send_buffer_count,
|
||||
ZMQPreviewPublisher* in_preview_publisher,
|
||||
ZMQPreviewPublisher* in_preview_publisher_indexed,
|
||||
const NUMAHWPolicy &in_numa_policy) :
|
||||
experiment(settings.jungfraujoch_settings()),
|
||||
acquisition_device(in_aq_device),
|
||||
@@ -35,7 +34,6 @@ JFJochReceiver::JFJochReceiver(const JFJochProtoBuf::ReceiverInput &settings,
|
||||
frame_transformation_nthreads((experiment.GetSummation() >= threaded_summation_threshold) ?
|
||||
2 : in_forward_and_sum_nthreads),
|
||||
preview_publisher(in_preview_publisher),
|
||||
preview_publisher_indexed(in_preview_publisher_indexed),
|
||||
ndatastreams(experiment.GetDataStreamsNum()),
|
||||
data_acquisition_ready(ndatastreams),
|
||||
frame_transformation_ready((experiment.GetImageNum() > 0) ? frame_transformation_nthreads : 0),
|
||||
@@ -86,8 +84,6 @@ JFJochReceiver::JFJochReceiver(const JFJochProtoBuf::ReceiverInput &settings,
|
||||
if (experiment.GetDetectorMode() == DetectorMode::Conversion) {
|
||||
if (preview_publisher != nullptr)
|
||||
preview_publisher->Start(experiment, calib.value());
|
||||
if (preview_publisher_indexed != nullptr)
|
||||
preview_publisher_indexed->Start(experiment, calib.value());
|
||||
|
||||
if (!GPUImageAnalysis::GPUPresent())
|
||||
logger.Info("GPU support missing");
|
||||
@@ -442,12 +438,9 @@ void JFJochReceiver::FrameTransformationThread() {
|
||||
message.exptime_base = 10*1000*1000;
|
||||
message.indexing_result = 0;
|
||||
|
||||
bool indexed = false;
|
||||
bool send_preview = false;
|
||||
bool calculate_spots = false;
|
||||
|
||||
if ((preview_publisher != nullptr) && (preview_stride > 0) && (image_number % preview_stride == 0))
|
||||
send_preview = true;
|
||||
|
||||
bool send_image = false; // We send image if at least one module was collected in full
|
||||
|
||||
std::unique_ptr<RadialIntegrationProfile> rad_int_profile_image;
|
||||
@@ -547,10 +540,7 @@ void JFJochReceiver::FrameTransformationThread() {
|
||||
for (int i = 0; i < recip.size(); i++)
|
||||
message.spots[i].indexed = indexer_result[0].indexed_spots[i];
|
||||
indexer_result[0].l.Save(message.indexing_lattice);
|
||||
if (preview_publisher_indexed)
|
||||
preview_publisher_indexed->Publish(experiment,
|
||||
transformation.GetPreview16BitImage(),
|
||||
message);
|
||||
indexed = true;
|
||||
} else {
|
||||
message.indexing_result = 1;
|
||||
indexing_solution.AddElement(image_number, 0);
|
||||
@@ -575,7 +565,7 @@ void JFJochReceiver::FrameTransformationThread() {
|
||||
*rad_int_profile_per_file[image_number % experiment.GetDataFileCount()] += *rad_int_profile_image;
|
||||
}
|
||||
|
||||
if (send_preview)
|
||||
if (preview_publisher && (!local_data_processing_settings.preview_indexed_only() || indexed))
|
||||
preview_publisher->Publish(experiment,
|
||||
transformation.GetPreview16BitImage(),
|
||||
message);
|
||||
@@ -727,9 +717,6 @@ void JFJochReceiver::FinalizeMeasurement() {
|
||||
if (preview_publisher != nullptr)
|
||||
preview_publisher->Stop(experiment);
|
||||
|
||||
if (preview_publisher_indexed != nullptr)
|
||||
preview_publisher_indexed->Stop(experiment);
|
||||
|
||||
for (int d = 0; d < ndatastreams; d++)
|
||||
acquisition_device[d]->Cancel();
|
||||
|
||||
|
||||
@@ -59,7 +59,6 @@ class JFJochReceiver {
|
||||
ThreadSafeFIFO<uint64_t> images_to_go;
|
||||
|
||||
ZMQPreviewPublisher *preview_publisher = nullptr;
|
||||
ZMQPreviewPublisher* preview_publisher_indexed = nullptr;
|
||||
|
||||
ImagePusher &image_pusher;
|
||||
bool push_images_to_writer;
|
||||
@@ -131,7 +130,6 @@ public:
|
||||
Logger &logger, int64_t forward_and_sum_nthreads,
|
||||
int64_t send_buffer_count,
|
||||
ZMQPreviewPublisher* preview_publisher,
|
||||
ZMQPreviewPublisher* preview_publisher_indexed,
|
||||
const NUMAHWPolicy &numa_policy);
|
||||
~JFJochReceiver();
|
||||
JFJochReceiver(const JFJochReceiver &other) = delete;
|
||||
|
||||
@@ -21,8 +21,7 @@ grpc::Status JFJochReceiverService::Start(grpc::ServerContext *context, const JF
|
||||
receiver.reset();
|
||||
receiver = std::make_unique<JFJochReceiver>(*request, aq_devices, image_pusher,
|
||||
logger, nthreads, send_buffer_count,
|
||||
preview_publisher, preview_publisher_indexed,
|
||||
numa_policy);
|
||||
preview_publisher, numa_policy);
|
||||
try {
|
||||
// Don't want to stop
|
||||
receiver->SetDataProcessingSettings(data_processing_settings);
|
||||
@@ -114,11 +113,6 @@ JFJochReceiverService& JFJochReceiverService::PreviewPublisher(ZMQPreviewPublish
|
||||
return *this;
|
||||
}
|
||||
|
||||
JFJochReceiverService& JFJochReceiverService::PreviewPublisherIndexed(ZMQPreviewPublisher *in_preview_writer) {
|
||||
preview_publisher_indexed = in_preview_writer;
|
||||
return *this;
|
||||
}
|
||||
|
||||
JFJochReceiverService &JFJochReceiverService::NUMAPolicy(const NUMAHWPolicy &policy) {
|
||||
numa_policy = policy;
|
||||
return *this;
|
||||
|
||||
@@ -19,7 +19,6 @@ class JFJochReceiverService final : public JFJochProtoBuf::gRPC_JFJochReceiver::
|
||||
|
||||
ImagePusher &image_pusher;
|
||||
ZMQPreviewPublisher *preview_publisher = nullptr;
|
||||
ZMQPreviewPublisher *preview_publisher_indexed = nullptr;
|
||||
int64_t nthreads = 8;
|
||||
|
||||
int64_t send_buffer_count = 32;
|
||||
@@ -35,7 +34,6 @@ public:
|
||||
JFJochReceiverService(std::vector<AcquisitionDevice *> &open_capi_device,
|
||||
Logger &logger, ImagePusher &pusher);
|
||||
JFJochReceiverService& PreviewPublisher(ZMQPreviewPublisher *in_preview_writer);
|
||||
JFJochReceiverService& PreviewPublisherIndexed(ZMQPreviewPublisher *in_preview_writer);
|
||||
JFJochReceiverService& NumThreads(int64_t input);
|
||||
JFJochReceiverService& SendBufferCount(int64_t input);
|
||||
JFJochReceiverService& NUMAPolicy(const NUMAHWPolicy& policy);
|
||||
|
||||
@@ -152,12 +152,6 @@ int main(int argc, char **argv) {
|
||||
logger.Info("Preview available on ZMQ addr " + input["preview_zmq_addr"].get<std::string>());
|
||||
}
|
||||
|
||||
if (input.contains("preview_indexed_zmq_addr")) {
|
||||
preview_indexed = std::make_unique<ZMQPreviewPublisher>(context, input["preview_indexed_zmq_addr"]);
|
||||
service.PreviewPublisherIndexed(preview_indexed.get());
|
||||
logger.Info("Preview available for indexed frames on ZMQ addr " + input["preview_indexed_zmq_addr"].get<std::string>());
|
||||
}
|
||||
|
||||
if (input.contains("compression_threads")) {
|
||||
service.NumThreads(input["compression_threads"].get<int64_t>());
|
||||
logger.Info("Compression threads {}", input["compression_threads"].get<int64_t>());
|
||||
|
||||
Reference in new issue
Block a user