Browse Source

changed name of RAW_DATA_COLUMN_SET to PARSED_DATA_COLUMN_SET

xmlparsing
Holger Frey 3 years ago
parent
commit
6ee257bc1e
  1. 2
      sensospot_data/columns.py
  2. 4
      sensospot_data/parser.py

2
sensospot_data/columns.py

@ -40,7 +40,7 @@ META_DATA_EXPOSURE_ID = "Exposure.Id"
META_DATA_PARAMETERS_CHANNEL = "Parameters.Channel" META_DATA_PARAMETERS_CHANNEL = "Parameters.Channel"
META_DATA_PARAMETERS_TIME = "Parameters.Time" META_DATA_PARAMETERS_TIME = "Parameters.Time"
RAW_DATA_COLUMN_SET = { PARSED_DATA_COLUMN_SET = {
RAW_DATA_POS_X, RAW_DATA_POS_X,
RAW_DATA_POS_Y, RAW_DATA_POS_Y,
RAW_DATA_BKG_MEAN, RAW_DATA_BKG_MEAN,

4
sensospot_data/parser.py

@ -13,7 +13,7 @@ from .columns import (
RAW_DATA_POS_ID, RAW_DATA_POS_ID,
META_DATA_WELL_ROW, META_DATA_WELL_ROW,
META_DATA_WELL_NAME, META_DATA_WELL_NAME,
RAW_DATA_COLUMN_SET, PARSED_DATA_COLUMN_SET,
META_DATA_EXPOSURE_ID, META_DATA_EXPOSURE_ID,
META_DATA_WELL_COLUMN, META_DATA_WELL_COLUMN,
RAW_DATA_NORMALIZATION_MAP, RAW_DATA_NORMALIZATION_MAP,
@ -66,7 +66,7 @@ def _extract_measurement_info(data_file):
def _cleanup_data_columns(data_frame): def _cleanup_data_columns(data_frame):
""" renames some data columns for consistency and drops unused columns """ """ renames some data columns for consistency and drops unused columns """
renamed = data_frame.rename(columns=RAW_DATA_COLUMNS_RENAME_MAP) renamed = data_frame.rename(columns=RAW_DATA_COLUMNS_RENAME_MAP)
surplus_columns = set(renamed.columns) - RAW_DATA_COLUMN_SET surplus_columns = set(renamed.columns) - PARSED_DATA_COLUMN_SET
return renamed.drop(columns=surplus_columns) return renamed.drop(columns=surplus_columns)

Loading…
Cancel
Save