In [10]:
from atmPy.instruments.POPS import calibration
from atmPy.tools import plt_tools
%matplotlib inline
plt_tools.setRcParams(plt)
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 [2]:
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 [6]:
cal = calibration.read_str(data)
In [7]:
fname = './data/POPS_calibration.csv'
cal.save_csv(fname)
In [8]:
out = calibration.read_csv(fname)
In [11]:
f,a,df,gf = cal.plot_calibration()
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 [ ]: