Skip to content

BAM1020 Beta Attenuation Monitor

The BAM1020 is a beta attenuation monitor used for measuring PM2.5 mass concentrations in ambient air.

AeroViz.rawDataReader.script.BAM1020.Reader

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

Bases: AbstractReader

BAM1020 (Beta Attenuation Monitor) Data Reader

A specialized reader for BAM1020 data files, which measure PM2.5 mass concentration using beta attenuation technology.

See docs/api/instruments/mass/BAM1020.md for usage and docs/guide/reader-reference.md for the file layout, status codes and QC rules.

Attributes

nam class-attribute instance-attribute

nam = 'BAM1020'

MIN_CONC class-attribute instance-attribute

MIN_CONC = 0

MAX_CONC class-attribute instance-attribute

MAX_CONC = 500

Methods:

_raw_reader

_raw_reader(file)

Read and parse raw BAM1020 data files.

Parameters:

Name Type Description Default
file Path or str

Path to the BAM1020 data file.

required

Returns:

Type Description
DataFrame

Processed BAM1020 data with datetime index and PM2.5 concentration column.

_QC

_QC(_df)

Perform quality control on BAM1020 data.

QC Rules Applied
  1. Invalid Conc : Concentration outside valid range (0-500 ug/m3)
  2. Spike : Sudden value change (vectorized spike detection)

Raw format

  • File pattern: *.csv
  • Native frequency: 1h
  • Header layout: a single header row; the first column is the timestamp and becomes the index (read_csv(parse_dates=True, index_col=0, usecols=range(0, 21)) — the first 21 columns of the export: the timestamp plus 20 data columns)
  • Data columns: PM2.5 mass concentration and the instrument's own flow, RH, ambient temperature and status columns

Parse recipe

  1. Conc (mg/m3) is renamed to Conc.
  2. The literal value 1 in Conc is replaced with NA (a placeholder value; 0 is caught later by Invalid Conc).
  3. Every column that converts cleanly is coerced to numeric; textual metadata columns survive untouched.
  4. Conc is multiplied by 1000 (mg/m³ → µg/m³). The scaling is scoped to that column, so the other 19 columns survive unscaled.
  5. Duplicate and NaT indices are removed.

Measurement Parameters

The BAM1020 provides:

Parameter Unit Description
Conc μg/m³ PM2.5 mass concentration
Status - Instrument status codes
Flow L/min Sample flow rate
Temperature °C Internal temperature
Pressure hPa Atmospheric pressure

Status & error codes

None. The BAM's status column is carried through as data but is not evaluated by any rule — see status modes for the readers that do evaluate one.

QC rules

Rule Condition Severity
Invalid Conc Conc <= 0 (MIN_CONC) or Conc > 500 µg/m³ (MAX_CONC) error
Spike sudden change in Conc (spike_detection, max_change_rate=3.0) error

Output

L2 carries Conc plus the remaining source columns.

Column Unit Description
Conc μg/m³ PM2.5 mass concentration (converted from mg/m³)
remaining 19 columns as exported flow, RH, ambient temperature, status, … — unscaled

Files written per read are listed in RawDataReader Reference §1.

Notes

  • Beta attenuation technology provides real-time PM2.5 measurements
  • Regular calibration and maintenance are required for accurate results
  • Status codes indicate instrument health and measurement validity
  • Suitable for continuous ambient air quality monitoring