Flagging#

class pia.flagging.Flagging(lev0_data, lev1_data, cirrus_mode)#

Bases: EvalData

Performs QA/QC tests on the instrument and meta data and creates a log-file with warnings.

Parameters:
  • lev0_data (instance of class Lev0Data)

  • lev1_data (instance of class Lev1Data)

  • cirrus_mode (bool) – whether the measurements were made in cirrus regime or not

assign_run_mode()#

Assigns run id and run mode (1,2,3) to instrument data according to run times.

create_log_file()#

Creates and saves a log file with error messages from QA/QC tests

export_data()#

Exports data-wise and run-wise flags.

qc_tests(cirrus_mode)#

QA/QC tests on instrument data.

Parameters:

cirrus_mode (bool) – whether the measurements were made in cirrus regime or not

Returns:

  • flags_run (pd.DataFrame) – flags for each run

  • flags_data (pd.DataFrame) – flags for each data point

unique_values(data)#

Creates as list of unique flags per data set and counts the appearance.

Parameters:

data (pd.DataFrame) – Grouped flags for each run mode

Returns:

values_counter

Return type:

Counter