@@ -359,7 +359,7 @@ class Measurements:
359359 emission_wavelength : float | None
360360 excitation_wavelength : float | None
361361 focus_height : float | None
362- device_control_custom_info : dict [str , Any ] | None = None
362+ device_control_custom_info : dict [str , Any ]
363363 custom_info : dict [str , Any ] | None = None
364364
365365 @staticmethod
@@ -425,9 +425,19 @@ def create(
425425 "sequence executed by" : measurement_info .custom_info .get (
426426 "sequence executed by" , None
427427 ),
428+ "filter set" : data .get (str , "filter set" ),
429+ "generate bright field" : data .get (bool , "generate bright field" ),
430+ "digital phase contrast" : data .get (bool , "digital phase contrast" ),
431+ "generate dpc" : data .get (bool , "generate dpc" ),
428432 },
429433 custom_info = data .get_unread (
430- skip = {"tech" , "software version" , "barcode" , "operation" , "nan" }
434+ skip = {
435+ "tech" , "software version" , "barcode" , "operation" , "nan" ,
436+ "excitation power [%]" ,
437+ "channel" ,
438+ "exposure time [ms]" ,
439+ "additional focus offset [mm]" ,
440+ }
431441 ),
432442 )
433443
@@ -566,6 +576,16 @@ def _create_measurement(data: Data, well_position: str, well_value: str) -> Meas
566576def _create_optical_measurement (
567577 data : Data , well_position : str , channel : Channel
568578) -> Measurement :
579+ device_control_custom_info = {
580+ ** data .measurements .device_control_custom_info ,
581+ "additional focus offset [mm]" : channel .additional_focus_offset ,
582+ }
583+ if channel .name != "BRIGHTFIELD" :
584+ to_remove = ["generate bright field" , "digital phase contrast" , "generate dpc" ]
585+ for key in to_remove :
586+ device_control_custom_info .pop (key , None )
587+
588+
569589 return Measurement (
570590 type_ = data .background_info .experiment_type .measurement_type ,
571591 identifier = random_uuid_str (),
@@ -584,7 +604,7 @@ def _create_optical_measurement(
584604 illumination_setting_unit = "%" ,
585605 transmitted_light_setting = channel .transmitted_light ,
586606 fluorescent_tag_setting = channel .fluorescent_tag ,
587- device_control_custom_info = data . measurements . device_control_custom_info ,
607+ device_control_custom_info = device_control_custom_info ,
588608 custom_info = data .measurements .custom_info ,
589609 )
590610
0 commit comments