Parsing the numerical output from Sensovation SensoSpot image analysis.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

99 lines
3.1 KiB

""" Column name definitions """
# original, unmodified column names
RAW_DATA_POS_X = "Pos.X"
RAW_DATA_POS_Y = "Pos.Y"
RAW_DATA_BKG_MEAN = "Bkg.Mean"
RAW_DATA_SPOT_MEAN = "Spot.Mean"
RAW_DATA_BKG_MEDIAN = "Bkg.Median"
RAW_DATA_SPOT_MEDIAN = "Spot.Median"
RAW_DATA_BKG_STDDEV = "Bkg.StdDev"
RAW_DATA_SPOT_STDDEV = "Spot.StdDev"
RAW_DATA_BKG_SUM = "Bkg.Sum"
RAW_DATA_SPOT_SUM = "Spot.Sum"
RAW_DATA_BKG_AREA = "Bkg.Area"
RAW_DATA_SPOT_AREA = "Spot.Area"
RAW_DATA_POS_NOM_X = "Pos.Nom.X"
RAW_DATA_POS_NOM_Y = "Pos.Nom.Y"
# replacement column names
RAW_DATA_POS_ID = "Pos.Id"
RAW_DATA_SPOT_FOUND = "Spot.Found"
RAW_DATA_SPOT_DIAMETER = "Spot.Diameter"
RAW_DATA_SPOT_SAT = "Spot.Saturation"
RAW_DATA_COLUMNS_RENAME_MAP = {
" ID ": RAW_DATA_POS_ID,
"Found": RAW_DATA_SPOT_FOUND,
"Dia.": RAW_DATA_SPOT_DIAMETER,
"Spot.Sat. (%)": RAW_DATA_SPOT_SAT,
}
# meta data extracted from filename
META_DATA_WELL_ROW = "Well.Row"
META_DATA_WELL_COLUMN = "Well.Column"
META_DATA_EXPOSURE_ID = "Exposure.Id"
# parsed measurement parameter information (optional, from parameters folder)
META_DATA_PARAMETERS_CHANNEL = "Parameters.Channel"
META_DATA_PARAMETERS_TIME = "Parameters.Time"
RAW_DATA_COLUMN_SET = {
RAW_DATA_POS_X,
RAW_DATA_POS_Y,
RAW_DATA_BKG_MEAN,
RAW_DATA_SPOT_MEAN,
RAW_DATA_BKG_MEDIAN,
RAW_DATA_SPOT_MEDIAN,
RAW_DATA_BKG_STDDEV,
RAW_DATA_SPOT_STDDEV,
RAW_DATA_BKG_SUM,
RAW_DATA_SPOT_SUM,
RAW_DATA_BKG_AREA,
RAW_DATA_SPOT_AREA,
RAW_DATA_SPOT_SAT,
RAW_DATA_POS_NOM_X,
RAW_DATA_POS_NOM_Y,
RAW_DATA_POS_ID,
RAW_DATA_SPOT_FOUND,
RAW_DATA_SPOT_DIAMETER,
META_DATA_WELL_ROW,
META_DATA_WELL_COLUMN,
META_DATA_EXPOSURE_ID,
META_DATA_PARAMETERS_CHANNEL,
META_DATA_PARAMETERS_TIME,
}
# settings for nominal exposure info
SETTINGS_EXPOSURE_CHANNEL = "Exposure.Channel"
SETTINGS_EXPOSURE_TIME = "Exposure.Time"
# calculated value for dynamic range normalization
CALC_SPOT_OVERFLOW = "Calc.Spot.Overflow"
# settings for normalized exposure time
SETTINGS_NORMALIZED_EXPOSURE_TIME = "Settings.Normalized.Exposure.Time"
# normalized columns
n_prefix = "Calc.Normalized."
CALC_NORMALIZED_BKG_MEAN = f"{n_prefix}{RAW_DATA_BKG_MEAN}"
CALC_NORMALIZED_SPOT_MEAN = f"{n_prefix}{RAW_DATA_SPOT_MEAN}"
CALC_NORMALIZED_BKG_MEDIAN = f"{n_prefix}{RAW_DATA_BKG_MEDIAN}"
CALC_NORMALIZED_SPOT_MEDIAN = f"{n_prefix}{RAW_DATA_SPOT_MEDIAN}"
CALC_NORMALIZED_BKG_STDDEV = f"{n_prefix}{RAW_DATA_BKG_STDDEV}"
CALC_NORMALIZED_SPOT_STDDEV = f"{n_prefix}{RAW_DATA_SPOT_STDDEV}"
CALC_NORMALIZED_BKG_SUM = f"{n_prefix}{RAW_DATA_BKG_SUM}"
CALC_NORMALIZED_SPOT_SUM = f"{n_prefix}{RAW_DATA_SPOT_SUM}"
# what columns to convert for normalization
RAW_DATA_NORMALIZATION_MAP = {
RAW_DATA_BKG_MEAN: CALC_NORMALIZED_BKG_MEAN,
RAW_DATA_SPOT_MEAN: CALC_NORMALIZED_SPOT_MEAN,
RAW_DATA_BKG_MEDIAN: CALC_NORMALIZED_BKG_MEDIAN,
RAW_DATA_SPOT_MEDIAN: CALC_NORMALIZED_SPOT_MEDIAN,
RAW_DATA_BKG_STDDEV: CALC_NORMALIZED_BKG_STDDEV,
RAW_DATA_SPOT_STDDEV: CALC_NORMALIZED_SPOT_STDDEV,
RAW_DATA_BKG_SUM: CALC_NORMALIZED_BKG_SUM,
RAW_DATA_SPOT_SUM: CALC_NORMALIZED_SPOT_SUM,
}