lair.background.phase_shift_corrected_baseline#

lair.background.phase_shift_corrected_baseline(data, n=3600, q=0.01)[source]#

Derive a baseline concentration using a low quantile approach to minimize phase shift effects. This method uses forward-looking and backward-looking windows to better represent the lowest observed concentrations during periods of rapid change.

Note

Original developed by Ben Fasoli for the Google Street View project. See supplementary material in: https://doi.org/10.1016/j.atmosenv.2023.119995

Parameters:
  • data (pd.Series) – Signal time series with local datetime index.

  • n (int) – Window size in seconds.

  • q (float) – Quantile to extract from signal.

  • timezone (str, optional) – Timezone to convert the datetime index to.

Returns:

pd.Series – Baseline concentration

Return type:

Series