diff --git a/broker/OpenAPIConvert.cpp b/broker/OpenAPIConvert.cpp index 52278dc6..9af4ec12 100644 --- a/broker/OpenAPIConvert.cpp +++ b/broker/OpenAPIConvert.cpp @@ -915,6 +915,9 @@ IndexingSettings Convert(const org::openapitools::server::model::Indexing_settin ret.IndexingThreads(input.getThreadCount()); ret.UnitCellDistTolerance(input.getUnitCellDistTolerance()); ret.IndexIceRings(input.isIndexIceRings()); + ret.RotationIndexing(input.isRotationIndexing()); + ret.RotationIndexingAngularStride_deg(input.getRotationIndexingAngularStrideDeg()); + ret.RotationIndexingMinAngularRange_deg(input.getRotationIndexingMinAngularRangeDeg()); return ret; } @@ -928,6 +931,9 @@ org::openapitools::server::model::Indexing_settings Convert(const IndexingSettin ret.setTolerance(input.GetTolerance()); ret.setThreadCount(input.GetIndexingThreads()); ret.setUnitCellDistTolerance(input.GetUnitCellDistTolerance()); + ret.setRotationIndexing(input.GetRotationIndexing()); + ret.setRotationIndexingAngularStrideDeg(input.GetRotationIndexingAngularStride_deg()); + ret.setRotationIndexingMinAngularRangeDeg(input.GetRotationIndexingMinAngularRange_deg()); org::openapitools::server::model::Geom_refinement_algorithm refinement; switch (input.GetGeomRefinementAlgorithm()) { diff --git a/broker/gen/model/Indexing_settings.cpp b/broker/gen/model/Indexing_settings.cpp index 1e78fafd..20ad94e1 100644 --- a/broker/gen/model/Indexing_settings.cpp +++ b/broker/gen/model/Indexing_settings.cpp @@ -30,6 +30,9 @@ Indexing_settings::Indexing_settings() m_Unit_cell_dist_tolerance = 0.05f; m_Viable_cell_min_spots = 10L; m_Index_ice_rings = false; + m_Rotation_indexing = false; + m_Rotation_indexing_min_angular_range_deg = 20.0f; + m_Rotation_indexing_angular_stride_deg = 0.5f; } @@ -194,7 +197,35 @@ bool Indexing_settings::validate(std::stringstream& msg, const std::string& path } } + + + /* Rotation_indexing_min_angular_range_deg */ { + const float& value = m_Rotation_indexing_min_angular_range_deg; + const std::string currentValuePath = _pathPrefix + ".rotationIndexingMinAngularRangeDeg"; + + if (value < static_cast(1.0)) + { + success = false; + msg << currentValuePath << ": must be greater than or equal to 1.0;"; + } + + } + + + /* Rotation_indexing_angular_stride_deg */ { + const float& value = m_Rotation_indexing_angular_stride_deg; + const std::string currentValuePath = _pathPrefix + ".rotationIndexingAngularStrideDeg"; + + + if (value < static_cast(0)) + { + success = false; + msg << currentValuePath << ": must be greater than or equal to 0;"; + } + + } + return success; } @@ -234,6 +265,15 @@ bool Indexing_settings::operator==(const Indexing_settings& rhs) const && (isIndexIceRings() == rhs.isIndexIceRings()) + && + + (isRotationIndexing() == rhs.isRotationIndexing()) + && + + (getRotationIndexingMinAngularRangeDeg() == rhs.getRotationIndexingMinAngularRangeDeg()) + && + + (getRotationIndexingAngularStrideDeg() == rhs.getRotationIndexingAngularStrideDeg()) ; @@ -258,6 +298,9 @@ void to_json(nlohmann::json& j, const Indexing_settings& o) j["unit_cell_dist_tolerance"] = o.m_Unit_cell_dist_tolerance; j["viable_cell_min_spots"] = o.m_Viable_cell_min_spots; j["index_ice_rings"] = o.m_Index_ice_rings; + j["rotation_indexing"] = o.m_Rotation_indexing; + j["rotation_indexing_min_angular_range_deg"] = o.m_Rotation_indexing_min_angular_range_deg; + j["rotation_indexing_angular_stride_deg"] = o.m_Rotation_indexing_angular_stride_deg; } @@ -274,6 +317,9 @@ void from_json(const nlohmann::json& j, Indexing_settings& o) j.at("unit_cell_dist_tolerance").get_to(o.m_Unit_cell_dist_tolerance); j.at("viable_cell_min_spots").get_to(o.m_Viable_cell_min_spots); j.at("index_ice_rings").get_to(o.m_Index_ice_rings); + j.at("rotation_indexing").get_to(o.m_Rotation_indexing); + j.at("rotation_indexing_min_angular_range_deg").get_to(o.m_Rotation_indexing_min_angular_range_deg); + j.at("rotation_indexing_angular_stride_deg").get_to(o.m_Rotation_indexing_angular_stride_deg); } @@ -365,6 +411,30 @@ void Indexing_settings::setIndexIceRings(bool const value) { m_Index_ice_rings = value; } +bool Indexing_settings::isRotationIndexing() const +{ + return m_Rotation_indexing; +} +void Indexing_settings::setRotationIndexing(bool const value) +{ + m_Rotation_indexing = value; +} +float Indexing_settings::getRotationIndexingMinAngularRangeDeg() const +{ + return m_Rotation_indexing_min_angular_range_deg; +} +void Indexing_settings::setRotationIndexingMinAngularRangeDeg(float const value) +{ + m_Rotation_indexing_min_angular_range_deg = value; +} +float Indexing_settings::getRotationIndexingAngularStrideDeg() const +{ + return m_Rotation_indexing_angular_stride_deg; +} +void Indexing_settings::setRotationIndexingAngularStrideDeg(float const value) +{ + m_Rotation_indexing_angular_stride_deg = value; +} } // namespace org::openapitools::server::model diff --git a/broker/gen/model/Indexing_settings.h b/broker/gen/model/Indexing_settings.h index b3b1c5dc..7f1655f2 100644 --- a/broker/gen/model/Indexing_settings.h +++ b/broker/gen/model/Indexing_settings.h @@ -114,6 +114,21 @@ public: /// bool isIndexIceRings() const; void setIndexIceRings(bool const value); + /// + /// + /// + bool isRotationIndexing() const; + void setRotationIndexing(bool const value); + /// + /// + /// + float getRotationIndexingMinAngularRangeDeg() const; + void setRotationIndexingMinAngularRangeDeg(float const value); + /// + /// + /// + float getRotationIndexingAngularStrideDeg() const; + void setRotationIndexingAngularStrideDeg(float const value); friend void to_json(nlohmann::json& j, const Indexing_settings& o); friend void from_json(const nlohmann::json& j, Indexing_settings& o); @@ -140,6 +155,12 @@ protected: bool m_Index_ice_rings; + bool m_Rotation_indexing; + + float m_Rotation_indexing_min_angular_range_deg; + + float m_Rotation_indexing_angular_stride_deg; + }; diff --git a/broker/jfjoch_api.yaml b/broker/jfjoch_api.yaml index 13293fae..14127db3 100644 --- a/broker/jfjoch_api.yaml +++ b/broker/jfjoch_api.yaml @@ -1728,6 +1728,9 @@ components: - unit_cell_dist_tolerance - index_ice_rings - viable_cell_min_spots + - rotation_indexing + - rotation_indexing_min_angular_range_deg + - rotation_indexing_angular_stride_deg properties: algorithm: $ref: "#/components/schemas/indexing_algorithm" @@ -1793,6 +1796,19 @@ components: description: | Include spots marked as ice rings in the indexing run. If `dataset_settings` doesn't have `detect_ice_rings` on, this option will have no effect on processing. + rotation_indexing: + type: boolean + default: false + rotation_indexing_min_angular_range_deg: + type: number + format: float + default: 20.0 + minimum: 1.0 + rotation_indexing_angular_stride_deg: + type: number + format: float + default: 0.5 + minimum: 0 instrument_metadata: type: object description: "Metadata for a measurement instrument" diff --git a/broker/redoc-static.html b/broker/redoc-static.html index b620ffe7..abeea7dd 100644 --- a/broker/redoc-static.html +++ b/broker/redoc-static.html @@ -767,11 +767,11 @@ This option is using non-linear least squares optimization to find unit cell and " class="sc-eVqvcJ sc-fszimp kIppRw drqpJr">

Relative distance tolerance for unit cell vs. reference; Lattices outside given tolerance will be ignored

viable_cell_min_spots
required
integer <int64> >= 5
Default: 10

Minimum number of indexed spots required for a cell to be considered viable

-
index_ice_rings
required
boolean
Default: false
index_ice_rings
required
boolean
Default: false

Include spots marked as ice rings in the indexing run. If dataset_settings doesn't have detect_ice_rings on, this option will have no effect on processing.

-

Responses

Request samples

Content type
application/json
{
  • "algorithm": "FFBIDX",
  • "fft_max_unit_cell_A": 250,
  • "fft_min_unit_cell_A": 10,
  • "fft_high_resolution_A": 2,
  • "fft_num_vectors": 16384,
  • "tolerance": 0.5,
  • "thread_count": 1,
  • "geom_refinement_algorithm": "BeamCenter",
  • "unit_cell_dist_tolerance": 0.05,
  • "viable_cell_min_spots": 10,
  • "index_ice_rings": false
}

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Get indexing configuration

http://localhost:5232/config/indexing

Request samples

Content type
application/json
{
  • "algorithm": "FFBIDX",
  • "fft_max_unit_cell_A": 250,
  • "fft_min_unit_cell_A": 10,
  • "fft_high_resolution_A": 2,
  • "fft_num_vectors": 16384,
  • "tolerance": 0.5,
  • "thread_count": 1,
  • "geom_refinement_algorithm": "BeamCenter",
  • "unit_cell_dist_tolerance": 0.05,
  • "viable_cell_min_spots": 10,
  • "index_ice_rings": false,
  • "rotation_indexing": false,
  • "rotation_indexing_min_angular_range_deg": 20,
  • "rotation_indexing_angular_stride_deg": 0.5
}

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Get indexing configuration

Can be done anytime

Responses

Response samples

Content type
application/json
{
  • "algorithm": "FFBIDX",
  • "fft_max_unit_cell_A": 250,
  • "fft_min_unit_cell_A": 10,
  • "fft_high_resolution_A": 2,
  • "fft_num_vectors": 16384,
  • "tolerance": 0.5,
  • "thread_count": 1,
  • "geom_refinement_algorithm": "BeamCenter",
  • "unit_cell_dist_tolerance": 0.05,
  • "viable_cell_min_spots": 10,
  • "index_ice_rings": false
}

Change file writer settings

http://localhost:5232/config/indexing

Response samples

Content type
application/json
{
  • "algorithm": "FFBIDX",
  • "fft_max_unit_cell_A": 250,
  • "fft_min_unit_cell_A": 10,
  • "fft_high_resolution_A": 2,
  • "fft_num_vectors": 16384,
  • "tolerance": 0.5,
  • "thread_count": 1,
  • "geom_refinement_algorithm": "BeamCenter",
  • "unit_cell_dist_tolerance": 0.05,
  • "viable_cell_min_spots": 10,
  • "index_ice_rings": false,
  • "rotation_indexing": false,
  • "rotation_indexing_min_angular_range_deg": 20,
  • "rotation_indexing_angular_stride_deg": 0.5
}

Change file writer settings

This can only be done when detector is Idle, Error or Inactive states.

Request Body schema: application/json
overwrite
boolean
Default: false

Inform jfjoch_write to overwrite existing files. Otherwise files would be saved with .h5.{timestamp}.tmp suffix.

@@ -1187,7 +1187,7 @@ This can only be done when detector is Idle, Error or " class="sc-eVqvcJ sc-fszimp sc-etsjJW kIppRw jnwENr ljKHqG">

Everything OK

Response samples

Content type
application/json
{
  • "detector": {
    },
  • "detector_list": {
    },
  • "detector_settings": {
    },
  • "image_format_settings": {
    },
  • "instrument_metadata": {
    },
  • "file_writer_settings": {
    },
  • "data_processing_settings": {
    },
  • "measurement": {
    },
  • "broker": {
    },
  • "fpga": [
    ],
  • "calibration": [
    ],
  • "zeromq_preview": {
    },
  • "zeromq_metadata": {
    },
  • "dark_mask": {
    },
  • "pixel_mask": {
    },
  • "roi": {
    },
  • "az_int": {
    },
  • "buffer": {
    },
  • "indexing": {
    }
}

Get data collection statistics

http://localhost:5232/statistics

Response samples

Content type
application/json
{
  • "detector": {
    },
  • "detector_list": {
    },
  • "detector_settings": {
    },
  • "image_format_settings": {
    },
  • "instrument_metadata": {
    },
  • "file_writer_settings": {
    },
  • "data_processing_settings": {
    },
  • "measurement": {
    },
  • "broker": {
    },
  • "fpga": [
    ],
  • "calibration": [
    ],
  • "zeromq_preview": {
    },
  • "zeromq_metadata": {
    },
  • "dark_mask": {
    },
  • "pixel_mask": {
    },
  • "roi": {
    },
  • "az_int": {
    },
  • "buffer": {
    },
  • "indexing": {
    }
}

Get data collection statistics

Results of the last data collection

Responses