openaq.utils.mass_to_mix

openaq.utils.mass_to_mix(value, param, unit='ppb', **kwargs)[source]

Convert units from ug/m3 to ppb or ppm. The conversion assumes an ambient pressure of 1 atmosphere and ambient temperature of 25 degC.

Parameters:
  • value (float) – the concentration in ug/m3
  • param (string) – the parameter to convert {‘co’, ‘no’, ‘no2’, ‘so2’, ‘o3’}
  • unit (string) – the desired output unit {‘ppb’, ‘ppm’}
Returns:

value

Example:
>>> import openaq
>>> conc_ugm3 = 100
>>> conc_ppb = openaq.utils.mass_to_mix(conc_ugm3, param='co', unit='ppb')
>>> conc_ppb
114.5