OPC.
calibrate
(self, material, method='spline', mie_kws={}, fit_kws={})¶Calibrate the OPC assuming a specific material.
By calibration, we mean a method used to relate the peak height, which is related to the scattering cross-section (Cscat) to the particle size. At its simplest, we use this function to determine which bin a particle belongs to based on its Cscat value. Once calibrated, a calibration function is saved as a digitizer which will take as an input a Cscat value and return the bin number of the OPC it belongs to.
Either a string containing the material available in the lookup table, or the complex refractive index. The option for lookup values are: [‘ammonium_sulfate’, ‘bc’, ‘psl’]. Since the refractive index is wavelength dependant, it is recommended you define the refractive index at your OPC’s wavelength if you are looking for the best results.
The method to use for creating a calibration curve. Options include (1) ‘spline’ which removes any non-monotonicly increasing points from the Cscat to Dp curve; or (2) ‘linear’ fits a linear model (in log-log space) between Cscat and Dp.
Optional dictionary containing keyword arguments that is sent directly to opcsim.mie.cscat when computing the scattering cross section values used in the optimization.
Optional dictionary containing keyword arguments that is sent directly to scipy.optimize.curve_fit when generating a fit using the ‘fit_linear’ approach. Please see the scipy.optimize.curve_fit docs for more details.
Examples
Calibrate an OPC using PSL’s
>>> opc = opcsim.OPC(n_bins=5)
>>> opc.calibrate(material="psl", method="spline")
Calibrate an OPC using a custom material
>>> opc = opcsim.OPC(n_bins=5)
>>> opc.calibrate(material=complex(1.9, 0.4), method="spline")
Calibrate an OPC where the calibration curve is a fitted line (PSL’s)
>>> opc = opcsim.OPC(n_bins=5)
>>> opc.calibrate(material="psl", method="linear")