Improve recording of timing for different data analysis steps

This commit is contained in:
leonarski_f committed 2026-03-26 15:20:58 +01:00
1 parent 2d3c87e41e
commit 0eacee0801
20 files changed
+147 -23

No files matched your search

+4
View File
@@ -871,6 +871,10 @@ PlotType ConvertPlotType(const std::optional<std::string>& input) {
if (input == "max_pixel_value") return PlotType::MaxValue;
if (input == "resolution_estimate") return PlotType::ResolutionEstimate;
if (input == "indexing_time") return PlotType::IndexingTime;
if (input == "refinement_time") return PlotType::RefinementTime;
if (input == "spot_finding_time") return PlotType::SpotFindingTime;
if (input == "integration_time") return PlotType::IntegrationTime;
if (input == "bragg_prediction_time") return PlotType::BraggPredictionTime;
if (input == "pixel_sum") return PlotType::PixelSum;
if (input == "processing_time") return PlotType::ImageProcessingTime;
if (input == "beam_center_x") return PlotType::RefinementBeamX;
-1
View File
@@ -91,7 +91,6 @@ components:
- spot_count_indexed
- spot_count_ice
- indexing_rate
- indexing_time
- indexing_unit_cell_length
- indexing_unit_cell_angle
- profile_radius
+3 -3
View File
@@ -848,7 +848,7 @@ User mask is not automatically applied - i.e. pixels with user mask will have a
</div></button></div><div><button class="sc-kzqdkY gnmLmb" disabled=""><strong class="sc-dSIIpw bpEYcE">404<!-- --> </strong><div class="sc-eeDRCY sc-eBMEME sc-dCFHLb gTGgei kekOtA kCaLQd"><p>No calibration recorded so far</p>
</div></button></div></div></div><div class="sc-iGgWBj sc-gsFSXq ibAZSi eDeKjd"><div class="sc-ejfMa-d bNUPQg"><button class="sc-EgOXT cFEcOl"><span type="get" class="sc-eZYNyq qGfV http-verb get">get</span><span class="sc-iEXKAA gUNSDu">/preview/pedestal.tiff</span><svg class="sc-cwHptR iVFMLx" style="margin-right:-25px" version="1.1" viewBox="0 0 24 24" x="0" xmlns="http://www.w3.org/2000/svg" y="0" aria-hidden="true"><polygon points="17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "></polygon></svg></button><div aria-hidden="true" class="sc-dlWCHZ kWacYr"><div class="sc-hHOBiw cndTNO"><div class="sc-eeDRCY sc-eBMEME gTGgei fbXBig"><p>Test Jungfraujoch system</p>
</div><div tabindex="0" role="button"><div class="sc-kWtpeL gEncxT"><span>http://localhost:5232</span>/preview/pedestal.tiff</div></div></div></div></div></div></div></div><div id="/paths/~1preview~1plot/get" data-section-id="/paths/~1preview~1plot/get" class="sc-dcJsrY cqVkUp"><div class="sc-kAyceB hBQWIZ"><div class="sc-fqkvVR oJKYx"><h2 class="sc-jXbUNg fWnwAh"><a class="sc-jlZhew kbdRLs" href="#/paths/~1preview~1plot/get" aria-label="/paths/~1preview~1plot/get"></a>Generate 1D plot from Jungfraujoch<!-- --> </h2><div><h5 class="sc-dAlyuH jbQuod">query<!-- --> Parameters</h5><table class="sc-dAbbOL ccPhmY"><tbody><tr class=""><td class="sc-dLMFU sc-eldPxv hZbWKe jXkfaY" kind="field" title="binning"><span class="sc-gFqAkR eRqgPI"></span><span class="property-name">binning</span></td><td class="sc-fPXMVe bAXEAa"><div><div><span class="sc-Nxspf sc-cfxfcM cXxAXt jrGEaR"></span><span class="sc-Nxspf sc-gFAWRd cXxAXt dYzdDr">integer</span></div><div><span class="sc-Nxspf cXxAXt"> <!-- -->Default:<!-- --> </span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">1</span></div> <div><div class="sc-eeDRCY sc-eBMEME gTGgei fbXBig"><p>Binning of frames for the plot (0 = default binning)</p>
</div></div></div></td></tr><tr class=""><td class="sc-dLMFU sc-eldPxv hZbWKe jXkfaY" kind="field" title="type"><span class="sc-gFqAkR eRqgPI"></span><span class="property-name">type</span><div class="sc-Nxspf sc-hRJfrW cXxAXt kYVhSL">required</div></td><td class="sc-fPXMVe bAXEAa"><div><div><span class="sc-Nxspf sc-cfxfcM cXxAXt jrGEaR"></span><span class="sc-Nxspf sc-gFAWRd cXxAXt dYzdDr">string</span></div><div><span class="sc-Nxspf cXxAXt"> <!-- -->Enum<!-- -->:</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;bkg_estimate&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;azint&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;azint_1d&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;spot_count&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;spot_count_low_res&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;spot_count_indexed&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;spot_count_ice&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;indexing_rate&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;indexing_time&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;indexing_unit_cell_length&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;indexing_unit_cell_angle&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;profile_radius&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;mosaicity&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;b_factor&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;error_pixels&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;saturated_pixels&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;image_collection_efficiency&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;receiver_delay&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;receiver_free_send_buf&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;strong_pixels&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;roi_sum&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;roi_mean&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;roi_max_count&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;roi_pixels&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;roi_weighted_x&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;roi_weighted_y&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;packets_received&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;max_pixel_value&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;resolution_estimate&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;pixel_sum&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;processing_time&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;beam_center_x&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;beam_center_y&quot;</span> </div> <div><div class="sc-eeDRCY sc-eBMEME gTGgei fbXBig"><p>Type of requested plot</p>
</div></div></div></td></tr><tr class=""><td class="sc-dLMFU sc-eldPxv hZbWKe jXkfaY" kind="field" title="type"><span class="sc-gFqAkR eRqgPI"></span><span class="property-name">type</span><div class="sc-Nxspf sc-hRJfrW cXxAXt kYVhSL">required</div></td><td class="sc-fPXMVe bAXEAa"><div><div><span class="sc-Nxspf sc-cfxfcM cXxAXt jrGEaR"></span><span class="sc-Nxspf sc-gFAWRd cXxAXt dYzdDr">string</span></div><div><span class="sc-Nxspf cXxAXt"> <!-- -->Enum<!-- -->:</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;bkg_estimate&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;azint&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;azint_1d&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;spot_count&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;spot_count_low_res&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;spot_count_indexed&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;spot_count_ice&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;indexing_rate&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;indexing_time&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;indexing_unit_cell_length&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;indexing_unit_cell_angle&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;profile_radius&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;mosaicity&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;b_factor&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;error_pixels&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;saturated_pixels&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;image_collection_efficiency&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;receiver_delay&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;receiver_free_send_buf&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;strong_pixels&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;roi_sum&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;roi_mean&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;roi_max_count&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;roi_pixels&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;roi_weighted_x&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;roi_weighted_y&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;packets_received&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;max_pixel_value&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;resolution_estimate&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;pixel_sum&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;processing_time&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;spot_finding_time&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;refinement_time&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;integration_time&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;beam_center_x&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;beam_center_y&quot;</span> </div> <div><div class="sc-eeDRCY sc-eBMEME gTGgei fbXBig"><p>Type of requested plot</p>
</div></div></div></td></tr><tr class=""><td class="sc-dLMFU sc-eldPxv hZbWKe jXkfaY" kind="field" title="fill"><span class="sc-gFqAkR eRqgPI"></span><span class="property-name">fill</span></td><td class="sc-fPXMVe bAXEAa"><div><div><span class="sc-Nxspf sc-cfxfcM cXxAXt jrGEaR"></span><span class="sc-Nxspf sc-gFAWRd cXxAXt dYzdDr">number</span><span class="sc-Nxspf sc-gFAWRd cXxAXt dYzdDr"> <!-- -->&lt;<!-- -->float<!-- -->&gt;<!-- --> </span></div> <div><div class="sc-eeDRCY sc-eBMEME gTGgei fbXBig"><p>Fill value for elements that were missed during data collection</p>
</div></div></div></td></tr><tr class=""><td class="sc-dLMFU sc-eldPxv hZbWKe jXkfaY" kind="field" title="experimental_coord"><span class="sc-gFqAkR eRqgPI"></span><span class="property-name">experimental_coord</span></td><td class="sc-fPXMVe bAXEAa"><div><div><span class="sc-Nxspf sc-cfxfcM cXxAXt jrGEaR"></span><span class="sc-Nxspf sc-gFAWRd cXxAXt dYzdDr">boolean</span></div><div><span class="sc-Nxspf cXxAXt"> <!-- -->Default:<!-- --> </span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">false</span></div> <div><div class="sc-eeDRCY sc-eBMEME gTGgei fbXBig"><p>If measurement has goniometer axis defined, plot X-axis will represent rotation angle
If measurement has grid scan defined, plot X-axis and Y-axis will represent grid position, Z will be used as the final value
@@ -860,7 +860,7 @@ For still measurement the number is ignored</p>
</div><div tabindex="0" role="button"><div class="sc-kWtpeL gEncxT"><span>http://localhost:5232</span>/preview/plot</div></div></div></div></div><div><h3 class="sc-kpDqfm eBBgSB"> <!-- -->Response samples<!-- --> </h3><div class="sc-bXCLTC dHowgL" data-rttabs="true"><ul class="react-tabs__tab-list" role="tablist"><li class="tab-success react-tabs__tab--selected" role="tab" id="tab_R_9pqq_0" aria-selected="true" aria-disabled="false" aria-controls="panel_R_9pqq_0" tabindex="0" data-rttab="true">200</li></ul><div class="react-tabs__tab-panel react-tabs__tab-panel--selected" role="tabpanel" id="panel_R_9pqq_0" aria-labelledby="tab_R_9pqq_0"><div><div class="sc-bbSZdi gCVTxk"><span class="sc-fjvvzt jWReSk">Content type</span><div class="sc-JrDLc iTKzPJ">application/json</div></div><div class="sc-uVWWZ gQROPU"><div class="sc-esYiGF dWQNJI"><div class="sc-koXPp efufqz"><button><div class="sc-fhzFiK kwZDms">Copy</div></button><button> Expand all </button><button> Collapse all </button></div><div tabindex="0" class="sc-eeDRCY gTGgei sc-fXSgeo bnrBiz"><div class="redoc-json"><code><button class="collapser" aria-label="collapse"></button><span class="token punctuation">{</span><span class="ellipsis"></span><ul class="obj collapsible"><li><div class="hoverable "><span class="property token string">"title"</span>: <span class="token string">&quot;string&quot;</span><span class="token punctuation">,</span></div></li><li><div class="hoverable "><span class="property token string">"unit_x"</span>: <span class="token string">&quot;image_number&quot;</span><span class="token punctuation">,</span></div></li><li><div class="hoverable "><span class="property token string">"size_x"</span>: <span class="token number">0.1</span><span class="token punctuation">,</span></div></li><li><div class="hoverable "><span class="property token string">"size_y"</span>: <span class="token number">0.1</span><span class="token punctuation">,</span></div></li><li><div class="hoverable "><span class="property token string">"plot"</span>: <button class="collapser" aria-label="collapse"></button><span class="token punctuation">[</span><span class="ellipsis"></span><ul class="array collapsible"><li><div class="hoverable collapsed"><button class="collapser" aria-label="expand"></button><span class="token punctuation">{</span><span class="ellipsis"></span><ul class="obj collapsible"><li><div class="hoverable collapsed"><span class="property token string">"title"</span>: <span class="token string">&quot;&quot;</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"x"</span>: <button class="collapser" aria-label="expand"></button><span class="token punctuation">[</span><span class="ellipsis"></span><ul class="array collapsible"><li><div class="hoverable collapsed"><span class="token number">0.1</span></div></li></ul><span class="token punctuation">]</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"y"</span>: <button class="collapser" aria-label="expand"></button><span class="token punctuation">[</span><span class="ellipsis"></span><ul class="array collapsible"><li><div class="hoverable collapsed"><span class="token number">0.1</span></div></li></ul><span class="token punctuation">]</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"z"</span>: <button class="collapser" aria-label="expand"></button><span class="token punctuation">[</span><span class="ellipsis"></span><ul class="array collapsible"><li><div class="hoverable collapsed"><span class="token number">0.1</span></div></li></ul><span class="token punctuation">]</span></div></li></ul><span class="token punctuation">}</span></div></li></ul><span class="token punctuation">]</span></div></li></ul><span class="token punctuation">}</span></code></div></div></div></div></div></div></div></div></div></div></div><div id="/paths/~1preview~1plot.bin/get" data-section-id="/paths/~1preview~1plot.bin/get" class="sc-dcJsrY cqVkUp"><div class="sc-kAyceB hBQWIZ"><div class="sc-fqkvVR oJKYx"><h2 class="sc-jXbUNg fWnwAh"><a class="sc-jlZhew kbdRLs" href="#/paths/~1preview~1plot.bin/get" aria-label="/paths/~1preview~1plot.bin/get"></a>Generate 1D plot from Jungfraujoch and send in raw binary format.
Data are provided as (32-bit) float binary array.
This format doesn&#x27;t transmit information about X-axis, only values, so it is of limited use for azimuthal integration.
<!-- --> </h2><div><h5 class="sc-dAlyuH jbQuod">query<!-- --> Parameters</h5><table class="sc-dAbbOL ccPhmY"><tbody><tr class=""><td class="sc-dLMFU sc-eldPxv hZbWKe jXkfaY" kind="field" title="type"><span class="sc-gFqAkR eRqgPI"></span><span class="property-name">type</span><div class="sc-Nxspf sc-hRJfrW cXxAXt kYVhSL">required</div></td><td class="sc-fPXMVe bAXEAa"><div><div><span class="sc-Nxspf sc-cfxfcM cXxAXt jrGEaR"></span><span class="sc-Nxspf sc-gFAWRd cXxAXt dYzdDr">string</span></div><div><span class="sc-Nxspf cXxAXt"> <!-- -->Enum<!-- -->:</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;bkg_estimate&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;azint&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;azint_1d&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;spot_count&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;spot_count_low_res&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;spot_count_indexed&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;spot_count_ice&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;indexing_rate&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;indexing_time&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;indexing_unit_cell_length&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;indexing_unit_cell_angle&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;profile_radius&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;mosaicity&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;b_factor&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;error_pixels&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;saturated_pixels&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;image_collection_efficiency&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;receiver_delay&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;receiver_free_send_buf&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;strong_pixels&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;roi_sum&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;roi_mean&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;roi_max_count&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;roi_pixels&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;roi_weighted_x&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;roi_weighted_y&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;packets_received&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;max_pixel_value&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;resolution_estimate&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;pixel_sum&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;processing_time&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;beam_center_x&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;beam_center_y&quot;</span> </div> <div><div class="sc-eeDRCY sc-eBMEME gTGgei fbXBig"><p>Type of requested plot</p>
<!-- --> </h2><div><h5 class="sc-dAlyuH jbQuod">query<!-- --> Parameters</h5><table class="sc-dAbbOL ccPhmY"><tbody><tr class=""><td class="sc-dLMFU sc-eldPxv hZbWKe jXkfaY" kind="field" title="type"><span class="sc-gFqAkR eRqgPI"></span><span class="property-name">type</span><div class="sc-Nxspf sc-hRJfrW cXxAXt kYVhSL">required</div></td><td class="sc-fPXMVe bAXEAa"><div><div><span class="sc-Nxspf sc-cfxfcM cXxAXt jrGEaR"></span><span class="sc-Nxspf sc-gFAWRd cXxAXt dYzdDr">string</span></div><div><span class="sc-Nxspf cXxAXt"> <!-- -->Enum<!-- -->:</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;bkg_estimate&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;azint&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;azint_1d&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;spot_count&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;spot_count_low_res&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;spot_count_indexed&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;spot_count_ice&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;indexing_rate&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;indexing_time&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;indexing_unit_cell_length&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;indexing_unit_cell_angle&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;profile_radius&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;mosaicity&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;b_factor&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;error_pixels&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;saturated_pixels&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;image_collection_efficiency&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;receiver_delay&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;receiver_free_send_buf&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;strong_pixels&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;roi_sum&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;roi_mean&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;roi_max_count&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;roi_pixels&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;roi_weighted_x&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;roi_weighted_y&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;packets_received&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;max_pixel_value&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;resolution_estimate&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;pixel_sum&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;processing_time&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;spot_finding_time&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;refinement_time&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;integration_time&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;beam_center_x&quot;</span> <span class="sc-Nxspf sc-ddjGPC cXxAXt jZOCAW">&quot;beam_center_y&quot;</span> </div> <div><div class="sc-eeDRCY sc-eBMEME gTGgei fbXBig"><p>Type of requested plot</p>
</div></div></div></td></tr><tr class="last "><td class="sc-dLMFU sc-eldPxv hZbWKe jXkfaY" kind="field" title="roi"><span class="sc-gFqAkR eRqgPI"></span><span class="property-name">roi</span></td><td class="sc-fPXMVe bAXEAa"><div><div><span class="sc-Nxspf sc-cfxfcM cXxAXt jrGEaR"></span><span class="sc-Nxspf sc-gFAWRd cXxAXt dYzdDr">string</span><span> <span class="sc-Nxspf sc-fxwrCY cXxAXt eMVOei"> <!-- -->non-empty<!-- --> </span></span></div> <div><div class="sc-eeDRCY sc-eBMEME gTGgei fbXBig"><p>Name of ROI for which plot is requested</p>
</div></div></div></td></tr></tbody></table></div><div><h3 class="sc-fMMURN egoxtT">Responses</h3><div><button class="sc-kzqdkY jgSwKD"><svg class="sc-cwHptR hWEnWx" version="1.1" viewBox="0 0 24 24" x="0" xmlns="http://www.w3.org/2000/svg" y="0" aria-hidden="true"><polygon points="17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "></polygon></svg><strong class="sc-dSIIpw bpEYcE">200<!-- --> </strong><div class="sc-eeDRCY sc-eBMEME sc-dCFHLb gTGgei kekOtA kCaLQd"><p>Everything OK.</p>
</div></button></div><div><button class="sc-kzqdkY bXzzUN"><svg class="sc-cwHptR cSkZlF" version="1.1" viewBox="0 0 24 24" x="0" xmlns="http://www.w3.org/2000/svg" y="0" aria-hidden="true"><polygon points="17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "></polygon></svg><strong class="sc-dSIIpw bpEYcE">400<!-- --> </strong><div class="sc-eeDRCY sc-eBMEME sc-dCFHLb gTGgei kekOtA kCaLQd"><p>Input parsing or validation error</p>
@@ -913,7 +913,7 @@ then image might be replaced in the buffer between calling /images and /image.cb
</div></button></div></div></div><div class="sc-iGgWBj sc-gsFSXq ibAZSi eDeKjd"><div class="sc-ejfMa-d bNUPQg"><button class="sc-EgOXT cFEcOl"><span type="get" class="sc-eZYNyq qGfV http-verb get">get</span><span class="sc-iEXKAA gUNSDu">/version</span><svg class="sc-cwHptR iVFMLx" style="margin-right:-25px" version="1.1" viewBox="0 0 24 24" x="0" xmlns="http://www.w3.org/2000/svg" y="0" aria-hidden="true"><polygon points="17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "></polygon></svg></button><div aria-hidden="true" class="sc-dlWCHZ kWacYr"><div class="sc-hHOBiw cndTNO"><div class="sc-eeDRCY sc-eBMEME gTGgei fbXBig"><p>Test Jungfraujoch system</p>
</div><div tabindex="0" role="button"><div class="sc-kWtpeL gEncxT"><span>http://localhost:5232</span>/version</div></div></div></div></div></div></div></div></div><div class="sc-dExYaf gZbfaQ"></div></div></div>
<script>
const __redoc_state = {"menu":{"activeItemIdx":-1},"spec":{"data":{"openapi":"3.0.3","info":{"title":"Jungfraujoch","description":"API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland).\nJungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU.\nJungfraujoch uses FPGA boards to acquire data at high data rates.\n\n# License Clarification\n\nWhile this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply**\nwhen this file is used solely to generate OpenAPI clients or when implementing applications that\ninteract with the API. Generated client code and applications using this API definition are not\nsubject to the GPL license requirements and may be distributed under terms of your choosing.\n\nThis exception is similar in spirit to the Linux Kernel's approach to userspace API headers and\nthe GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that\nuser programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not\nderivative works of the kernel and are not subject to the terms of the GPL.\n\nThis exception is intended to allow wider use of this API specification without imposing GPL\nrequirements on applications that merely interact with the API, regardless of whether they\ncommunicate through network calls or other mechanisms.\n","version":"1.0.0-rc.133","contact":{"name":"Filip Leonarski (Paul Scherrer Institute)","email":"filip.leonarski@psi.ch"},"license":{"name":"GPL-3.0","url":"https://www.gnu.org/licenses/gpl-3.0.html"}},"servers":[{"url":"http://localhost:5232","description":"Test Jungfraujoch system"}],"components":{"parameters":{"binning":{"in":"query","name":"binning","required":false,"schema":{"default":1,"type":"integer"},"description":"Binning of frames for the plot (0 = default binning)"},"experimental_coord":{"in":"query","name":"experimental_coord","required":false,"schema":{"type":"boolean","default":false},"description":"If measurement has goniometer axis defined, plot X-axis will represent rotation angle\nIf measurement has grid scan defined, plot X-axis and Y-axis will represent grid position, Z will be used as the final value\nFor still measurement the number is ignored\n"},"azint_unit":{"in":"query","name":"azint_unit","required":false,"schema":{"type":"string","enum":["Q_recipA","d_A","two_theta_deg"],"default":"Q_recipA"},"description":"Unit used for azim int.\n"},"fill_value":{"in":"query","name":"fill","required":false,"schema":{"type":"number","format":"float"},"description":"Fill value for elements that were missed during data collection\n"},"plot_type":{"in":"query","name":"type","required":true,"description":"Type of requested plot","schema":{"type":"string","enum":["bkg_estimate","azint","azint_1d","spot_count","spot_count_low_res","spot_count_indexed","spot_count_ice","indexing_rate","indexing_time","indexing_unit_cell_length","indexing_unit_cell_angle","profile_radius","mosaicity","b_factor","error_pixels","saturated_pixels","image_collection_efficiency","receiver_delay","receiver_free_send_buf","strong_pixels","roi_sum","roi_mean","roi_max_count","roi_pixels","roi_weighted_x","roi_weighted_y","packets_received","max_pixel_value","resolution_estimate","pixel_sum","processing_time","beam_center_x","beam_center_y"]}},"roi":{"in":"query","name":"roi","required":false,"schema":{"type":"string","minLength":1},"description":"Name of ROI for which plot is requested"},"image_id":{"in":"query","name":"id","required":false,"schema":{"type":"integer","format":"int64","default":-1,"minimum":-2},"description":"Image ID in the image buffer. Special values: -1 - last image in the buffer, -2: last indexed image in the buffer"},"saturation":{"in":"query","name":"saturation","required":false,"schema":{"type":"number","format":"float","minimum":-32767,"maximum":32767},"description":"Saturation value to set contrast in the preview image; if not provided, then autocontrast procedure is used"},"background":{"in":"query","name":"background","required":false,"schema":{"type":"number","format":"float","default":0,"minimum":-32767,"maximum":32767},"description":"Background value to set contrast in the preview image"},"show_spots":{"in":"query","name":"show_spots","schema":{"type":"boolean","default":true},"description":"Show spot finding results on the image"},"show_beam_center":{"in":"query","name":"show_beam_center","schema":{"type":"boolean","default":true},"description":"Show beam center on the image"},"show_roi":{"in":"query","name":"show_roi","schema":{"type":"boolean","default":false},"description":"Show ROI areas on the image"},"jpeg_quality":{"in":"query","name":"jpeg_quality","description":"Quality of JPEG image (100 - highest; 0 - lowest)","schema":{"type":"integer","format":"int64","default":100,"minimum":0,"maximum":100}},"show_user_mask":{"in":"query","name":"show_user_mask","schema":{"type":"boolean","default":falsLine truncated
const __redoc_state = {"menu":{"activeItemIdx":-1},"spec":{"data":{"openapi":"3.0.3","info":{"title":"Jungfraujoch","description":"API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland).\nJungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU.\nJungfraujoch uses FPGA boards to acquire data at high data rates.\n\n# License Clarification\n\nWhile this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply**\nwhen this file is used solely to generate OpenAPI clients or when implementing applications that\ninteract with the API. Generated client code and applications using this API definition are not\nsubject to the GPL license requirements and may be distributed under terms of your choosing.\n\nThis exception is similar in spirit to the Linux Kernel's approach to userspace API headers and\nthe GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that\nuser programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not\nderivative works of the kernel and are not subject to the terms of the GPL.\n\nThis exception is intended to allow wider use of this API specification without imposing GPL\nrequirements on applications that merely interact with the API, regardless of whether they\ncommunicate through network calls or other mechanisms.\n","version":"1.0.0-rc.133","contact":{"name":"Filip Leonarski (Paul Scherrer Institute)","email":"filip.leonarski@psi.ch"},"license":{"name":"GPL-3.0","url":"https://www.gnu.org/licenses/gpl-3.0.html"}},"servers":[{"url":"http://localhost:5232","description":"Test Jungfraujoch system"}],"components":{"parameters":{"binning":{"in":"query","name":"binning","required":false,"schema":{"default":1,"type":"integer"},"description":"Binning of frames for the plot (0 = default binning)"},"experimental_coord":{"in":"query","name":"experimental_coord","required":false,"schema":{"type":"boolean","default":false},"description":"If measurement has goniometer axis defined, plot X-axis will represent rotation angle\nIf measurement has grid scan defined, plot X-axis and Y-axis will represent grid position, Z will be used as the final value\nFor still measurement the number is ignored\n"},"azint_unit":{"in":"query","name":"azint_unit","required":false,"schema":{"type":"string","enum":["Q_recipA","d_A","two_theta_deg"],"default":"Q_recipA"},"description":"Unit used for azim int.\n"},"fill_value":{"in":"query","name":"fill","required":false,"schema":{"type":"number","format":"float"},"description":"Fill value for elements that were missed during data collection\n"},"plot_type":{"in":"query","name":"type","required":true,"description":"Type of requested plot","schema":{"type":"string","enum":["bkg_estimate","azint","azint_1d","spot_count","spot_count_low_res","spot_count_indexed","spot_count_ice","indexing_rate","indexing_time","indexing_unit_cell_length","indexing_unit_cell_angle","profile_radius","mosaicity","b_factor","error_pixels","saturated_pixels","image_collection_efficiency","receiver_delay","receiver_free_send_buf","strong_pixels","roi_sum","roi_mean","roi_max_count","roi_pixels","roi_weighted_x","roi_weighted_y","packets_received","max_pixel_value","resolution_estimate","pixel_sum","processing_time","spot_finding_time","refinement_time","integration_time","beam_center_x","beam_center_y"]}},"roi":{"in":"query","name":"roi","required":false,"schema":{"type":"string","minLength":1},"description":"Name of ROI for which plot is requested"},"image_id":{"in":"query","name":"id","required":false,"schema":{"type":"integer","format":"int64","default":-1,"minimum":-2},"description":"Image ID in the image buffer. Special values: -1 - last image in the buffer, -2: last indexed image in the buffer"},"saturation":{"in":"query","name":"saturation","required":false,"schema":{"type":"number","format":"float","minimum":-32767,"maximum":32767},"description":"Saturation value to set contrast in the preview image; if not provided, then autocontrast procedure is used"},"background":{"in":"query","name":"background","required":false,"schema":{"type":"number","format":"float","default":0,"minimum":-32767,"maximum":32767},"description":"Background value to set contrast in the preview image"},"show_spots":{"in":"query","name":"show_spots","schema":{"type":"boolean","default":true},"description":"Show spot finding results on the image"},"show_beam_center":{"in":"query","name":"show_beam_center","schema":{"type":"boolean","default":true},"description":"Show beam center on the image"},"show_roi":{"in":"query","name":"show_roi","schema":{"type":"boolean","default":false},"description":"Show ROI areas on the image"},"jpeg_quality":{"in":"query","name":"jpeg_quality","description":"Quality of JPEG image (100 - highest; 0 - lowest)","schema":{"type":"integer","format":"int64","default":100,"minimum":0,"maximum":100}},"show_user_mask":{"in":"query","name":"Line truncated
var container = document.getElementById('redoc');
Redoc.hydrate(__redoc_state, container);
+5 -1
View File
@@ -86,6 +86,11 @@ struct DataMessage {
std::optional<float> image_collection_efficiency;
std::optional<float> processing_time_s;
std::optional<float> spot_finding_time_s;
std::optional<float> indexing_time_s;
std::optional<float> refinement_time_s;
std::optional<float> bragg_prediction_time_s;
std::optional<float> integration_time_s;
std::vector<SpotToSave> spots;
std::optional<int64_t> spot_count;
@@ -104,7 +109,6 @@ struct DataMessage {
std::optional<UnitCell> indexing_unit_cell;
std::optional<int64_t> spot_count_indexed;
std::optional<float> indexing_time_s;
std::optional<float> profile_radius;
std::optional<float> mosaicity_deg;
+2 -2
View File
@@ -14,8 +14,8 @@ enum class PlotType {
IndexingRate, IndexingUnitCellLength,
IndexingUnitCellAngle, ErrorPixels, SaturatedPixels, ImageCollectionEfficiency, ReceiverDelay, ReceiverFreeSendBuf,
ROISum, ROIMean, ROIMaxCount, ROIPixels, ROIWeightedX, ROIWeightedY, PacketsReceived, MaxValue,
ResolutionEstimate, IndexingTime, ProfileRadius, Mosaicity, BFactor, PixelSum, StrongPixels,
ImageProcessingTime, RefinementBeamX, RefinementBeamY
ResolutionEstimate, ProfileRadius, Mosaicity, BFactor, PixelSum, StrongPixels,
RefinementBeamX, RefinementBeamY, ImageProcessingTime,
};
enum class PlotAzintUnit {
+4
View File
@@ -161,7 +161,11 @@ See [DECTRIS documentation](https://github.com/dectris/documentation/tree/main/s
| profile_radius | float | Profile radius of the image - describes distance of observed reflections from the Ewald sphere \[Angstrom^-1\] | | |
| mosaicity | float | Angular range of spots in image from a rotation scan \[degree\] | | |
| b_factor | float | Estimated B-factor (Angstrom^2) | | |
| spot_finding_time | float | Time spent on spot finding \[s\] | | |
| indexing_time | float | Time spent on indexing \[s\] | | |
| refinement_time | float | Time spent on refinement of indexing solution and experimental geometry \[s\] | | |
| bragg_prediction_time | float | Time spent on predicting Bragg spots \[s\] | | |
| integration_time | float | Time spent on Bragg integration \[s\] | | |
| processing_time | float | Total processing time \[s\] | | |
| xfel_pulse_id | uint64 | Bunch ID (for pulsed source, e.g., SwissFEL) | | X |
| xfel_event_code | uint64 | Event code (for pulsed source, e.g., SwissFEL) | | X |
+2
View File
@@ -6,6 +6,8 @@ This is an UNSTABLE release. The release has significant modifications and bug f
* jfjoch_broker: Use httplib for HTTP server instead of Pistache
* jfjoch_broker: Drop OpenSSL support
* jfjoch_broker: Base work for multi-lattice support in the future
* jfjoch_broker: Improve recording time of data analysis steps
* jfjoch_writer: Save per-image information about data analysis timing
* Update dependencies to more recent versions (spdlog, HDF5, Catch2, httplib)
### 1.0.0-rc.132
@@ -677,6 +677,14 @@ namespace {
message.indexing_lattice = CrystalLattice(tmp);
} else if (key == "indexing_time")
message.indexing_time_s = GetCBORFloat(value);
else if (key == "spot_finding_time")
message.spot_finding_time_s = GetCBORFloat(value);
else if (key == "integration_time")
message.integration_time_s = GetCBORFloat(value);
else if (key == "bragg_prediction_time")
message.bragg_prediction_time_s = GetCBORFloat(value);
else if (key == "refinement_time")
message.refinement_time_s = GetCBORFloat(value);
else if (key == "processing_time")
message.processing_time_s = GetCBORFloat(value);
else if (key == "profile_radius")
@@ -705,6 +705,10 @@ void CBORStream2Serializer::SerializeImageInternal(CborEncoder &mapEncoder, cons
CBOR_ENC(mapEncoder, "b_factor", message.b_factor);
CBOR_ENC(mapEncoder, "indexing_time", message.indexing_time_s);
CBOR_ENC(mapEncoder, "processing_time", message.processing_time_s);
CBOR_ENC(mapEncoder, "spot_finding_time", message.spot_finding_time_s);
CBOR_ENC(mapEncoder, "bragg_prediction_time", message.bragg_prediction_time_s);
CBOR_ENC(mapEncoder, "integration_time", message.integration_time_s);
CBOR_ENC(mapEncoder, "refinement_time", message.refinement_time_s);
CBOR_ENC(mapEncoder, "indexing_unit_cell", message.indexing_unit_cell);
CBOR_ENC(mapEncoder, "xfel_pulse_id", message.xfel_pulse_id);
CBOR_ENC(mapEncoder, "xfel_event_code", message.xfel_event_code);
+3
View File
@@ -38,6 +38,9 @@ export enum plot_type {
RESOLUTION_ESTIMATE = 'resolution_estimate',
PIXEL_SUM = 'pixel_sum',
PROCESSING_TIME = 'processing_time',
SPOT_FINDING_TIME = 'spot_finding_time',
REFINEMENT_TIME = 'refinement_time',
INTEGRATION_TIME = 'integration_time',
BEAM_CENTER_X = 'beam_center_x',
BEAM_CENTER_Y = 'beam_center_y',
}
@@ -1002,7 +1002,7 @@ export class DefaultService {
* @throws ApiError
*/
public static getPreviewPlot(
type: 'bkg_estimate' | 'azint' | 'azint_1d' | 'spot_count' | 'spot_count_low_res' | 'spot_count_indexed' | 'spot_count_ice' | 'indexing_rate' | 'indexing_time' | 'indexing_unit_cell_length' | 'indexing_unit_cell_angle' | 'profile_radius' | 'mosaicity' | 'b_factor' | 'error_pixels' | 'saturated_pixels' | 'image_collection_efficiency' | 'receiver_delay' | 'receiver_free_send_buf' | 'strong_pixels' | 'roi_sum' | 'roi_mean' | 'roi_max_count' | 'roi_pixels' | 'roi_weighted_x' | 'roi_weighted_y' | 'packets_received' | 'max_pixel_value' | 'resolution_estimate' | 'pixel_sum' | 'processing_time' | 'beam_center_x' | 'beam_center_y',
type: 'bkg_estimate' | 'azint' | 'azint_1d' | 'spot_count' | 'spot_count_low_res' | 'spot_count_indexed' | 'spot_count_ice' | 'indexing_rate' | 'indexing_time' | 'indexing_unit_cell_length' | 'indexing_unit_cell_angle' | 'profile_radius' | 'mosaicity' | 'b_factor' | 'error_pixels' | 'saturated_pixels' | 'image_collection_efficiency' | 'receiver_delay' | 'receiver_free_send_buf' | 'strong_pixels' | 'roi_sum' | 'roi_mean' | 'roi_max_count' | 'roi_pixels' | 'roi_weighted_x' | 'roi_weighted_y' | 'packets_received' | 'max_pixel_value' | 'resolution_estimate' | 'pixel_sum' | 'processing_time' | 'spot_finding_time' | 'refinement_time' | 'integration_time' | 'beam_center_x' | 'beam_center_y',
binning: number = 1,
fill?: number,
experimentalCoord: boolean = false,
@@ -1035,7 +1035,7 @@ export class DefaultService {
* @throws ApiError
*/
public static getPreviewPlotBin(
type: 'bkg_estimate' | 'azint' | 'azint_1d' | 'spot_count' | 'spot_count_low_res' | 'spot_count_indexed' | 'spot_count_ice' | 'indexing_rate' | 'indexing_time' | 'indexing_unit_cell_length' | 'indexing_unit_cell_angle' | 'profile_radius' | 'mosaicity' | 'b_factor' | 'error_pixels' | 'saturated_pixels' | 'image_collection_efficiency' | 'receiver_delay' | 'receiver_free_send_buf' | 'strong_pixels' | 'roi_sum' | 'roi_mean' | 'roi_max_count' | 'roi_pixels' | 'roi_weighted_x' | 'roi_weighted_y' | 'packets_received' | 'max_pixel_value' | 'resolution_estimate' | 'pixel_sum' | 'processing_time' | 'beam_center_x' | 'beam_center_y',
type: 'bkg_estimate' | 'azint' | 'azint_1d' | 'spot_count' | 'spot_count_low_res' | 'spot_count_indexed' | 'spot_count_ice' | 'indexing_rate' | 'indexing_time' | 'indexing_unit_cell_length' | 'indexing_unit_cell_angle' | 'profile_radius' | 'mosaicity' | 'b_factor' | 'error_pixels' | 'saturated_pixels' | 'image_collection_efficiency' | 'receiver_delay' | 'receiver_free_send_buf' | 'strong_pixels' | 'roi_sum' | 'roi_mean' | 'roi_max_count' | 'roi_pixels' | 'roi_weighted_x' | 'roi_weighted_y' | 'packets_received' | 'max_pixel_value' | 'resolution_estimate' | 'pixel_sum' | 'processing_time' | 'spot_finding_time' | 'refinement_time' | 'integration_time' | 'beam_center_x' | 'beam_center_y',
roi?: string,
): CancelablePromise<Blob> {
return __request(OpenAPI, {
+13
View File
@@ -92,6 +92,8 @@ void IndexAndRefine::RefineGeometryIfNeeded(DataMessage &msg, IndexAndRefine::In
if (!outcome.lattice_candidate)
return;
auto start_time = std::chrono::steady_clock::now();
XtalOptimizerData data{
.geom = outcome.experiment.GetDiffractionGeometry(),
.latt = *outcome.lattice_candidate,
@@ -133,6 +135,9 @@ void IndexAndRefine::RefineGeometryIfNeeded(DataMessage &msg, IndexAndRefine::In
msg.beam_corr_x = data.beam_corr_x;
msg.beam_corr_y = data.beam_corr_y;
}
auto end_time = std::chrono::steady_clock::now();
msg.refinement_time_s = std::chrono::duration_cast<std::chrono::duration<double>>(end_time - start_time).count();
}
void IndexAndRefine::QuickPredictAndIntegrate(DataMessage &msg,
@@ -184,7 +189,12 @@ void IndexAndRefine::QuickPredictAndIntegrate(DataMessage &msg,
.mosaicity_deg = std::fabs(mos_deg)
};
auto pred_start_time = std::chrono::steady_clock::now();
auto nrefl = prediction.Calc(outcome.experiment, latt, settings_prediction);
auto pred_end_time = std::chrono::steady_clock::now();
msg.bragg_prediction_time_s = std::chrono::duration<float>(pred_end_time - pred_start_time).count();
auto integration_start_time = std::chrono::steady_clock::now();
auto refl_ret = BraggIntegrate2D(outcome.experiment, image, prediction.GetReflections(), nrefl, msg.number);
constexpr size_t kMaxReflections = 10000;
@@ -212,6 +222,9 @@ void IndexAndRefine::QuickPredictAndIntegrate(DataMessage &msg,
CalcISigma(msg);
CalcWilsonBFactor(msg);
auto integration_end_time = std::chrono::steady_clock::now();
msg.integration_time_s = std::chrono::duration<float>(integration_end_time - integration_start_time).count();
}
void IndexAndRefine::ProcessImage(DataMessage &msg,
+14
View File
@@ -37,9 +37,14 @@ void MXAnalysisAfterFPGA::ReadFromFPGA(const DeviceOutput *output, const SpotFin
if (state == State::Disabled || !find_spots || !settings.enable) {
state = State::Disabled;
} else {
const auto t0 = std::chrono::steady_clock::now();
StrongPixelSet strong_pixel_set;
strong_pixel_set.ReadFPGAOutput(experiment, *output);
strong_pixel_set.FindSpots(experiment, settings, spots, module_number);
const auto t1 = std::chrono::steady_clock::now();
spot_finding_time_total += (t1 - t0);
spot_finding_timing_active = true;
state = State::Enabled;
}
}
@@ -97,6 +102,15 @@ void MXAnalysisAfterFPGA::Process(DataMessage &message, const SpotFindingSetting
if (spot_finding_settings.indexing)
indexer.ProcessImage(message, spot_finding_settings, message.image, *prediction);
}
if (spot_finding_timing_active) {
// total spot-finding time for the whole image
message.spot_finding_time_s = spot_finding_time_total.count() / 1e6;
// report/store ms here
spot_finding_time_total = std::chrono::duration<double, std::micro>{0.0};
spot_finding_timing_active = false;
}
spots.clear();
state = State::Idle;
}
+3
View File
@@ -26,6 +26,9 @@ class MXAnalysisAfterFPGA {
std::vector<uint32_t> arr_strong_pixel;
enum class State {Idle, Disabled, Enabled} state = State::Idle;
std::chrono::duration<double, std::micro> spot_finding_time_total{0.0};
bool spot_finding_timing_active = false;
public:
MXAnalysisAfterFPGA(const DiffractionExperiment& experiment, IndexAndRefine &indexer);
+3 -1
View File
@@ -158,9 +158,11 @@ void MXAnalysisWithoutFPGA::Analyze(DataMessage &output,
|| mask_low_res != settings.low_resolution_limit)
UpdateMaskResolution(settings);
const auto spot_finding_start_time = std::chrono::steady_clock::now();
const std::vector<DiffractionSpot> spots = spotFinder->Run(settings, mask_resolution);
SpotAnalyze(experiment, settings, spots, output);
const auto spot_finding_end_time = std::chrono::steady_clock::now();
output.spot_finding_time_s = std::chrono::duration<float>(spot_finding_end_time - spot_finding_start_time).count();
if (settings.indexing)
indexer.ProcessImage(output, settings,
+2 -2
View File
@@ -14,10 +14,10 @@ void Indexer::Setup(const DiffractionExperiment& experiment) {
IndexerResult Indexer::Run(const std::vector<Coord> &coord) {
IndexerResult ret;
auto start = std::chrono::high_resolution_clock::now();
auto start = std::chrono::steady_clock::now();
ret.lattice = RunInternal(coord, coord.size());
auto end = std::chrono::high_resolution_clock::now();
auto end = std::chrono::steady_clock::now();
std::chrono::duration<float> duration = end - start;
ret.indexing_time_s = duration.count();
return ret;
+37 -10
View File
@@ -99,14 +99,19 @@ void JFJochReceiverPlots::Setup(const DiffractionExperiment &experiment, const A
packets_received.Clear(r);
max_value.Clear(r);
resolution_estimate.Clear(r);
indexing_time.Clear(r);
profile_radius.Clear(r);
mosaicity_deg.Clear(r);
b_factor.Clear(r);
processing_time.Clear(r);
beam_center_x.Clear(r);
beam_center_y.Clear(r);
pixel_sum.Clear(r);
refinement_time.Clear(r);
spot_finding_time.Clear(r);
integration_time.Clear(r);
processing_time.Clear(r);
indexing_time.Clear(r);
bragg_prediction_time.Clear(r);
}
void JFJochReceiverPlots::Add(const DataMessage &msg, const AzimuthalIntegrationProfile &profile) {
@@ -131,6 +136,10 @@ void JFJochReceiverPlots::Add(const DataMessage &msg, const AzimuthalIntegration
max_value.AddElement(msg.number, msg.max_viable_pixel_value);
indexing_time.AddElement(msg.number, msg.indexing_time_s);
processing_time.AddElement(msg.number, msg.processing_time_s);
spot_finding_time.AddElement(msg.number, msg.spot_finding_time_s);
integration_time.AddElement(msg.number, msg.integration_time_s);
refinement_time.AddElement(msg.number, msg.refinement_time_s);
bragg_prediction_time.AddElement(msg.number, msg.bragg_prediction_time_s);
if (msg.indexing_unit_cell) {
indexing_uc_a.AddElement(msg.number, msg.indexing_unit_cell->a);
@@ -253,9 +262,6 @@ MultiLinePlot JFJochReceiverPlots::GetPlots(const PlotRequest &request) {
case PlotType::SaturatedPixels:
ret = saturated_pixels.GetMeanPlot(nbins, start, incr, request.fill_value);
break;
case PlotType::IndexingTime:
ret = indexing_time.GetMeanPlot(nbins, start, incr, request.fill_value);
break;
case PlotType::ProfileRadius:
ret = profile_radius.GetMeanPlot(nbins, start, incr, request.fill_value);
break;
@@ -333,9 +339,33 @@ MultiLinePlot JFJochReceiverPlots::GetPlots(const PlotRequest &request) {
case PlotType::PixelSum:
ret = pixel_sum.GetMeanPlot(nbins, start, incr, request.fill_value);
break;
case PlotType::ImageProcessingTime:
ret = processing_time.GetMeanPlot(nbins, start, incr, request.fill_value);
case PlotType::ImageProcessingTime: {
auto spot_finding = spot_finding_time.GetMeanPerBin(nbins, start, incr, request.fill_value);
spot_finding.title = "spot finding";
ret.AddPlot(spot_finding);
auto indexing = indexing_time.GetMeanPerBin(nbins, start, incr, request.fill_value);
indexing.title = "indexing";
ret.AddPlot(indexing);
auto integration = integration_time.GetMeanPerBin(nbins, start, incr, request.fill_value);
integration.title = "integration";
ret.AddPlot(integration);
auto refinement = refinement_time.GetMeanPerBin(nbins, start, incr, request.fill_value);
refinement.title = "refinement";
ret.AddPlot(refinement);
auto bragg_prediction = bragg_prediction_time.GetMeanPerBin(nbins, start, incr, request.fill_value);
bragg_prediction.title = "bragg prediction";
ret.AddPlot(bragg_prediction);
auto total = processing_time.GetMeanPerBin(nbins, start, incr, request.fill_value);
total.title = "total";
ret.AddPlot(total);
break;
}
case PlotType::RefinementBeamX:
ret = beam_center_x.GetMeanPlot(nbins, start, incr, request.fill_value);
break;
@@ -428,9 +458,6 @@ void JFJochReceiverPlots::GetPlotRaw(std::vector<float> &v, PlotType type, const
case PlotType::SaturatedPixels:
v = saturated_pixels.ExportArray();
break;
case PlotType::IndexingTime:
v = indexing_time.ExportArray();
break;
case PlotType::ProfileRadius:
v = profile_radius.ExportArray();
break;
+5 -1
View File
@@ -64,7 +64,6 @@ class JFJochReceiverPlots {
mutable std::shared_mutex roi_m;
std::map<std::string, ROIStatus> roi_status;
StatusVector indexing_time;
StatusVector profile_radius;
StatusVector mosaicity_deg;
StatusVector b_factor;
@@ -73,6 +72,11 @@ class JFJochReceiverPlots {
StatusVector beam_center_x;
StatusVector beam_center_y;
StatusVector spot_finding_time;
StatusVector indexing_time;
StatusVector refinement_time;
StatusVector integration_time;
StatusVector bragg_prediction_time;
StatusVector processing_time;
MultiLinePlot GetROIPlot(PlotType type, int64_t nbins, float start, float incr,
+26
View File
@@ -93,6 +93,13 @@ void HDF5DataFilePluginMX::OpenFile(HDF5File &data_file, const DataMessage &msg,
spot_count_ice.reserve(images_per_file);
spot_count_indexed.reserve(images_per_file);
spot_count_low_res.reserve(images_per_file);
indexing_time.reserve(images_per_file);
spot_finding_time.reserve(images_per_file);
integration_time.reserve(images_per_file);
refinement_time.reserve(images_per_file);
processing_time.reserve(images_per_file);
bragg_prediction_time.reserve(images_per_file);
}
void HDF5DataFilePluginMX::Write(const DataMessage &msg, uint64_t image_number) {
@@ -142,6 +149,13 @@ void HDF5DataFilePluginMX::Write(const DataMessage &msg, uint64_t image_number)
spot_count_ice[image_number] = msg.spot_count_ice_rings.value_or(0);
spot_count_low_res[image_number] = msg.spot_count_low_res.value_or(0);
indexing_time[image_number] = msg.indexing_time_s.value_or(NAN);
spot_finding_time[image_number] = msg.spot_finding_time_s.value_or(NAN);
integration_time[image_number] = msg.integration_time_s.value_or(NAN);
refinement_time[image_number] = msg.refinement_time_s.value_or(NAN);
processing_time[image_number] = msg.processing_time_s.value_or(NAN);
bragg_prediction_time[image_number] = msg.bragg_prediction_time_s.value_or(NAN);
if (indexing) {
indexed[image_number] = msg.indexing_result.value_or(0);
profile_radius[image_number] = msg.profile_radius.value_or(NAN);
@@ -192,6 +206,18 @@ void HDF5DataFilePluginMX::WriteFinal(HDF5File &data_file) {
}
}
if (!spot_finding_time.empty())
data_file.SaveVector("/entry/MX/spotFindingTime", spot_finding_time.vec())->Units("s");
if (!indexing_time.empty())
data_file.SaveVector("/entry/MX/indexingTime", indexing_time.vec())->Units("s");
if (!integration_time.empty())
data_file.SaveVector("/entry/MX/integrationTime", integration_time.vec())->Units("s");
if (!refinement_time.empty())
data_file.SaveVector("/entry/MX/refinementTime", refinement_time.vec())->Units("s");
if (!processing_time.empty())
data_file.SaveVector("/entry/MX/processingTime", processing_time.vec())->Units("s");
if (!bragg_prediction_time.empty())
data_file.SaveVector("/entry/MX/braggPredictionTime", bragg_prediction_time.vec())->Units("s");
if (!strong_pixel_count.empty())
data_file.SaveVector("/entry/MX/strongPixels", strong_pixel_count.vec());
+7
View File
@@ -49,6 +49,13 @@ class HDF5DataFilePluginMX : public HDF5DataFilePlugin {
AutoIncrVector<uint32_t> niggli_class;
AutoIncrVector<std::string> bravais_lattice;
AutoIncrVector<float> spot_finding_time;
AutoIncrVector<float> indexing_time;
AutoIncrVector<float> refinement_time;
AutoIncrVector<float> integration_time;
AutoIncrVector<float> processing_time;
AutoIncrVector<float> bragg_prediction_time;
public:
explicit HDF5DataFilePluginMX(const StartMessage& msg);
void OpenFile(HDF5File &data_file, const DataMessage& msg, size_t images_per_file) override;