Skip to content
Snippets Groups Projects

DetectorAssembler: go to ERROR if trying to match without geometry

Merged David Hammer requested to merge detectorassembler-error-without-geometry into master
2 files
+ 25
10
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -19,12 +19,6 @@ class BaseCorrectionAddon:
"""Will be given the node from extend_device_schema, no prefix needed here"""
pass
@property
def geometry(self):
"""Helper to get current geometry (host device should be monitoring a geometry
device)"""
return self._device._geometry
def post_correction(
self, train_id, processed_data, cell_table, pulse_table, output_hash
):
@@ -43,3 +37,16 @@ class BaseCorrectionAddon:
for an example of caching and reinstanting complex kernels using many parameters
when any change."""
pass
@property
def geometry(self):
"""Helper to get current geometry from host device. If addon will do expensive
precomputation only when geometry changes, use the on_new_geometry hook to
trigger this."""
return self._device._geometry
def on_new_geometry(self, geometry):
"""Hook which is called whenever the host device receives a new geometry from
the geometry device. Useful to know when geometry changes in case you plan to
do expensive precomputation based on it (ex. azimuthal integration)."""
pass
Loading