|
|
@ -35,7 +35,7 @@ def _check_if_xdr_ready(data_frame): |
|
|
|
|
|
|
|
|
|
|
|
def _calc_overflow_info(data_frame, column=RAW_DATA_SPOT_MEAN, limit=0.5): |
|
|
|
def _calc_overflow_info(data_frame, column=RAW_DATA_SPOT_MEAN, limit=0.5): |
|
|
|
""" add overflow info, based on column and limit """ |
|
|
|
""" add overflow info, based on column and limit """ |
|
|
|
data_frame[CALC_SPOT_OVERFLOW] = data_frame[column] > limit |
|
|
|
data_frame.loc[:, CALC_SPOT_OVERFLOW] = data_frame[column] > limit |
|
|
|
return data_frame |
|
|
|
return data_frame |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -61,7 +61,8 @@ def _reduce_overflow(data_frame): |
|
|
|
def blend(data_frame, column=RAW_DATA_SPOT_MEAN, limit=0.5): |
|
|
|
def blend(data_frame, column=RAW_DATA_SPOT_MEAN, limit=0.5): |
|
|
|
""" 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) |
|
|
|
data_frame = _calc_overflow_info(data_frame, column, limit) |
|
|
|
if CALC_SPOT_OVERFLOW not in data_frame.columns: |
|
|
|
|
|
|
|
data_frame = _calc_overflow_info(data_frame, column, limit) |
|
|
|
return _reduce_overflow(data_frame) |
|
|
|
return _reduce_overflow(data_frame) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|