|
|
@ -5,7 +5,7 @@ from .columns import ( |
|
|
|
RAW_DATA_POS_ID, |
|
|
|
RAW_DATA_POS_ID, |
|
|
|
CALC_SPOT_OVERFLOW, |
|
|
|
CALC_SPOT_OVERFLOW, |
|
|
|
META_DATA_WELL_ROW, |
|
|
|
META_DATA_WELL_ROW, |
|
|
|
RAW_DATA_SPOT_MEAN, |
|
|
|
RAW_DATA_SPOT_SAT, |
|
|
|
META_DATA_WELL_COLUMN, |
|
|
|
META_DATA_WELL_COLUMN, |
|
|
|
SETTINGS_EXPOSURE_TIME, |
|
|
|
SETTINGS_EXPOSURE_TIME, |
|
|
|
SETTINGS_EXPOSURE_CHANNEL, |
|
|
|
SETTINGS_EXPOSURE_CHANNEL, |
|
|
@ -33,7 +33,7 @@ def _check_if_xdr_ready(data_frame): |
|
|
|
raise ValueError("XDR: Exposure time contains NaNs") |
|
|
|
raise ValueError("XDR: Exposure time contains NaNs") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _calc_overflow_info(data_frame, column=RAW_DATA_SPOT_MEAN, limit=0.5): |
|
|
|
def _calc_overflow_info(data_frame, column=RAW_DATA_SPOT_SAT, limit=2): |
|
|
|
""" add overflow info, based on column and limit """ |
|
|
|
""" add overflow info, based on column and limit """ |
|
|
|
data_frame.loc[:, CALC_SPOT_OVERFLOW] = data_frame[column] > limit |
|
|
|
data_frame.loc[:, CALC_SPOT_OVERFLOW] = data_frame[column] > limit |
|
|
|
return data_frame |
|
|
|
return data_frame |
|
|
@ -64,7 +64,7 @@ def _reduce_overflow(data_frame): |
|
|
|
return result_frame.reset_index() |
|
|
|
return result_frame.reset_index() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def blend(data_frame, column=RAW_DATA_SPOT_MEAN, limit=0.5): |
|
|
|
def blend(data_frame, column=RAW_DATA_SPOT_SAT, limit=2): |
|
|
|
""" creates an extended dynamic range, eliminating overflowing spots """ |
|
|
|
""" creates an extended dynamic range, eliminating overflowing spots """ |
|
|
|
_check_if_xdr_ready(data_frame) |
|
|
|
_check_if_xdr_ready(data_frame) |
|
|
|
if CALC_SPOT_OVERFLOW not in data_frame.columns: |
|
|
|
if CALC_SPOT_OVERFLOW not in data_frame.columns: |
|
|
@ -96,8 +96,8 @@ def normalize_values(data_frame, normalized_time=None): |
|
|
|
def create_xdr( |
|
|
|
def create_xdr( |
|
|
|
data_frame, |
|
|
|
data_frame, |
|
|
|
normalized_time=None, |
|
|
|
normalized_time=None, |
|
|
|
column=RAW_DATA_SPOT_MEAN, |
|
|
|
column=RAW_DATA_SPOT_SAT, |
|
|
|
limit=0.5, |
|
|
|
limit=2, |
|
|
|
): |
|
|
|
): |
|
|
|
"""normalize measurement exposures |
|
|
|
"""normalize measurement exposures |
|
|
|
|
|
|
|
|
|
|
|