The main function of this module is to convert recored peak intensities to particle sizes and create a sizedistribution instance.
In [1]:
from atmPy.instruments.POPS import peaks,calibration
%matplotlib inline
hm.setRcParams(plt)
In [5]:
from importlib import reload
In [93]:
reload(peaks)
Out[93]:
Different file formats emerged during the development of POPS, which resulted in different functions with various optional parameters to read the files. Hopefully you will only need to use the following one which emerged in fall 2015.
In [94]:
filename = '/Users/htelg/prog/atm-py/examples/data/POPS_Peak.bin'
measurement = peaks.read_binary(filename)
To convert peak heights to particle sizes we first have to load a calibration file. Further information on calibration can be found here.
In [95]:
cal = calibration.read_csv('./data/POPS_calibration.csv')
Then we apply this calibration which adds an extra column to the data set containg the particle size.
In [96]:
measurement.apply_calibration()
Either use use the default bins or define your own.
In [101]:
bins = np.logspace(np.log10(120), np.log10(3000), 100)
sd = measurement.peak2sizedistribution(bins = bins)
Done! Now you can do what ever you can do with a sizedistribution instance (see here). E.g. save it, or plot it
In [102]:
sd.save_csv('./data/POPS_Peak.bin.dist')
In [103]:
sd.plot()
Out[103]: