@@ -262,6 +262,7 @@ def __init__(self, cmap=None, parent=None):
262262 self .canvas = parent .image_tab_widget .active_canvas
263263 self .detector_images = {}
264264 self .atlas_coords = None
265+ self ._image_plate = None
265266
266267 # Disable these by default.
267268 # If we disable these in Qt Designer, there are some weird bugs
@@ -596,6 +597,16 @@ def detector_selected(self, selected):
596597 finally :
597598 self .cmap .block_updates (False )
598599
600+ @property
601+ def image_plate (self ):
602+ return self ._image_plate
603+
604+ @image_plate .setter
605+ def image_plate (self , ip ):
606+ self ._image_plate = ip
607+ if self .it is not None :
608+ self .it .detector = ip
609+
599610 def image_plate_selected (self , selected ):
600611 # Don't allow the color map range to change while we are changing
601612 # image plates. Otherwise, it gets reset to something like "1 - 6".
@@ -725,8 +736,8 @@ def load_detector_images(self):
725736 # TD_TC000-000_FIDDLE_CAMERA-02-DB_SHOT_RAW-FIDDLE-CAMERA_N240717-001-999.h5
726737 # ->
727738 # TD_TC000-000_FIDDLE_CAMERA-*-DB_SHOT_RAW-FIDDLE-CAMERA_N240717-001-*.h5
728- image = re .sub ("CAMERA-\d{2}-" , "CAMERA-*-" , selected_file )
729- files = re .sub ("-\d{3}.h" , "-*.h" , image )
739+ image = re .sub (r "CAMERA-\d{2}-" , "CAMERA-*-" , selected_file )
740+ files = re .sub (r "-\d{3}.h" , "-*.h" , image )
730741
731742 # Sort matched files. We know that those ending in -999 are data files.
732743 # Dark files may have different values at the end (-003, -005, etc.) so
0 commit comments