Skip to content

BC1054 Black Carbon Monitor

The BC1054 is a multi-wavelength aethalometer that measures black carbon concentrations at ten different wavelengths.

AeroViz.rawDataReader.script.BC1054.Reader

Reader(path: Path | str, reset: bool | str = False, qc: bool | str = True, **kwargs)

Bases: AbstractReader

BC1054 Black Carbon Monitor Data Reader

A specialized reader for BC1054 data files, which measure black carbon concentrations using light absorption at 10 wavelengths.

See docs/api/instruments/aethalometers/BC1054.md for usage and docs/guide/instrument-qc.md for the file layout, status codes and QC rules.

Attributes

nam class-attribute instance-attribute

nam = 'BC1054'

BC_COLUMNS class-attribute instance-attribute

BC_COLUMNS = ['BC1', 'BC2', 'BC3', 'BC4', 'BC5', 'BC6', 'BC7', 'BC8', 'BC9', 'BC10']

ABS_COLUMNS class-attribute instance-attribute

ABS_COLUMNS = ['abs_370', 'abs_430', 'abs_470', 'abs_525', 'abs_565', 'abs_590', 'abs_660', 'abs_700', 'abs_880', 'abs_950']

CAL_COLUMNS class-attribute instance-attribute

CAL_COLUMNS = ['abs_550', 'AAE', 'eBC']

MIN_BC class-attribute instance-attribute

MIN_BC = 0

MAX_BC class-attribute instance-attribute

MAX_BC = 20000

MIN_AAE class-attribute instance-attribute

MIN_AAE = 0.7

MAX_AAE class-attribute instance-attribute

MAX_AAE = 2.0

INSTRUMENT_TIME_COLUMN class-attribute instance-attribute

INSTRUMENT_TIME_COLUMN = 'Instrument_Time'

CLOCK_TOLERANCE_S class-attribute instance-attribute

CLOCK_TOLERANCE_S = 60

ERROR_STATES class-attribute instance-attribute

ERROR_STATES = [1, 2, 4, 8, 16, 32, 64, 256, 512, 1024, 2048, 65536]

Methods:

_raw_reader

_raw_reader(file)

Read and parse raw BC1054 data files.

Returns all columns from the raw file. Column selection is deferred to _QC() and _process() stages.

_check_clock_offset

_check_clock_offset(_df, file) -> None

Report a disagreement between the logger clock and the instrument's.

A file with both columns has two different clocks in it:

Raw_Time not a Met One field — it does not appear anywhere in the BC 1054 manual — so it comes from whatever logged or downloaded the file, and runs on that host's clock. Time the manual's own definition: "the date and timestamp for the data record. The timestamp is end of the minute." That comes from the instrument's internal RTC, which an operator sets by hand (manual §3.5.7, "The CLOCK Setup Screen") and which can therefore be wrong.

Both are kept. The index stays on Raw_Time because the measurement happened at the wall-clock instant regardless of what the instrument believed the time was, and because in the corpus it is the well-behaved one: strictly increasing, no duplicates. The instrument clock is not — one fixture repeats timestamps and jumps 14 h 42 m mid-file, and another sits a constant 12 h 04 m behind for all 1440 rows of a day, the signature of an RTC set 12 hours out (AM/PM) plus drift.

That offset used to vanish silently: the column was dropped right here. Losing it also loses the only evidence that an instrument's clock needs resetting, so it is now recorded and reported.

_format_offset staticmethod

_format_offset(seconds: float) -> str

Seconds as 12h04m / 60s, whichever reads better.

_QC

_QC(_df)

Perform quality control on BC1054 raw data.

QC Rules Applied (raw data only)
  1. Duplicate : Consecutive duplicate rows removed
  2. Status Error : Invalid instrument status codes
  3. Invalid BC : BC concentration outside 0-20000 ng/m³
  4. Insufficient : Less than 50% hourly data completeness

Note: AAE validation is done in _process() after calculation.

_process

_process(_df)

Calculate absorption coefficients and validate derived parameters.

Processing Steps
  1. Calculate absorption coefficients at each wavelength
  2. Calculate AAE (Absorption Ångström Exponent)
  3. Calculate eBC (equivalent Black Carbon)
  4. Validate AAE range and update QC_Flag

Data Format

  • File format: CSV file
  • Sampling frequency: 1 minute
  • File naming pattern: *.csv
  • Data structure:
    • Datetime index
    • BC1-BC10 columns with units (ng/m³)
    • Status column for instrument state

Measurement Parameters

The BC1054 provides black carbon measurements at ten wavelengths:

Column Wavelength Description
BC1 370 nm UV channel
BC2 430 nm Violet channel
BC3 470 nm Blue channel
BC4 525 nm Green channel
BC5 565 nm Yellow-Green channel
BC6 590 nm Yellow channel
BC7 660 nm Red channel
BC8 700 nm Deep Red channel
BC9 880 nm Near-IR channel (reference)
BC10 950 nm IR channel

Data Processing

Data Reading

  • Processes CSV files with datetime index
  • Standardizes column names (removes spaces and units)
  • Maps to consistent BC1-BC10 format
  • Includes Status column for quality control
  • Handles duplicate timestamps

Quality Control

The BC1054 reader uses the declarative QCFlagBuilder system with the following rules:

+-----------------------------------------------------------------------+
|                            _QC() Pipeline                             |
+-----------------------------------------------------------------------+
|                                                                       |
|  [Pre-process] Remove consecutive duplicate rows                      |
|       |        Calculate absorption coefficients, AAE, eBC            |
|       v                                                               |
|  +---------------------+    +---------------------+                   |
|  | Rule: Status Error  |    | Rule: Invalid BC    |                   |
|  +---------------------+    +---------------------+                   |
|  | Bitwise status      |    | BC <= 0 OR          |                   |
|  | code filtering      |    | BC > 20000 ng/m³    |                   |
|  +---------------------+    +---------------------+                   |
|           |                          |                                |
|           v                          v                                |
|  +---------------------+    +---------------------+                   |
|  | Rule: Invalid AAE   |    | Rule: Insufficient  |                   |
|  +---------------------+    +---------------------+                   |
|  | AAE < -2.0 OR       |    | < 50% hourly data   |                   |
|  | AAE > -0.7          |    | completeness        |                   |
|  +---------------------+    +---------------------+                   |
|                                                                       |
+-----------------------------------------------------------------------+

QC Rules Applied

Rule Condition Description
Status Error Bitwise status code check Invalid instrument status codes detected
Invalid BC BC ≤ 0 OR BC > 20000 ng/m³ BC concentration outside valid range
Invalid AAE AAE < -2.0 OR AAE > -0.7 Angstrom exponent outside valid range
Insufficient < 50% hourly data Less than 50% hourly data completeness

Error Status Codes

Code Description
1 Power Failure
2 Digital Sensor Link Failure
4 Tape Move Failure
8 Maintenance
16 Flow Failure
32 Automatic Tape Advance
64 Detector Failure
256 Sensor Range
512 Nozzle Move Failure
1024 SPI Link Failure
2048 Calibration Audit
65536 Tape Move

Output Data

The processed data contains the following columns:

Column Unit Description
BC1-BC10 ng/m³ Black carbon at 10 wavelengths
abs_370-950 Mm⁻¹ Absorption coefficients
abs_550 Mm⁻¹ Interpolated absorption at 550nm
AAE - Absorption Angstrom Exponent
eBC ng/m³ Equivalent black carbon

QC_Flag Handling

  • The intermediate file (_read_bc1054_qc.pkl/csv) contains the QC_Flag column
  • The final output has invalid data set to NaN and QC_Flag column removed

Notes

  • Provides real-time multi-wavelength measurements
  • Enables detailed source apportionment with 10 channels
  • Consecutive duplicate rows are removed during QC
  • Automatic tape advance system