In [1]:
from atmPy.aerosols.instruments.POPS import calibration
from atmPy.tools import plt_tools
import numpy as np
In [2]:
plt.rcParams['figure.dpi'] = 100
One can generate a calibration file based on the theoretical responds of the POPS instrument and a single point calibration.
In [60]:
reload(calibration)
Out[60]:
In [61]:
cal = calibration.generate_calibration(
single_pnt_cali_d=508,
single_pnt_cali_ior=1.6,
single_pnt_cali_int=1000,
noise_level = 12,
ior=2.95,
dr=[100, 5000],
no_pts=500,
no_cal_pts=60,
plot=True,
raise_error=True,
test=False,
)
This section shows how to read and save calibration data. In the process the data will be fit and a calibration function is created. Data and function can be plotted using the plot function mentioned below.
create a string where each line consist of a diameter value (in nm) and an amplitude (in digitizer bin) seperated by space.
Note, in the example below the secend column is the $log_{10}(amplitude)$. The following cell does the convertion!
In [54]:
reload(calibration)
Out[54]:
In [55]:
data = """130 1.73
140 1.85
150 1.99
173 2.28
200 2.53
233 2.77
270 2.96
315 3.04
365 3.165
420 3.213
490 3.355
570 3.56
660 3.72
770 3.795
890 3.86
1040 4.0
1200 4.05
1400 4.1
1600 4.18
1880 4.32
2180 4.44
2500 4.5"""
In [56]:
cal = calibration.read_str(data)
In [57]:
cal.plot()
Out[57]:
In [53]:
cal.plot()
Out[53]:
In [7]:
fname = './data/POPS_calibration.csv'
cal.save_csv(fname)
In [8]:
out = calibration.read_csv(fname)
In [49]:
f,a,df,gf = cal.plot()
This information is necessarey if data is provided prebinned e.g. when recorded through the serial interface.
In [17]:
out = calibration.get_interface_bins('/Users/htelg/data/POPS_calibrations/150529_MS1_DOS.csv', 16)
In [ ]: