OPC.
integrate
(self, distribution, dmin=0.0, dmax=1.0, weight='number', rh=0.0, \*\*kwargs)¶Integrate the distribution according to the OPC for any [weight].
By default, this method returns the total number of particles between 0-1 microns. It can be used to calculate PM values at any breakpoint. When calculating a PM value for a breakpoint that falls within a bin, a simple percentage of the bin is used. For example, if you calculate PM1 and the bin that contains 1-micron actually covers 0.5 to 1.5 microns, then 1/2 the mass from that bin will count towards the PM1 value.
The aerosol distribution to be evaluated.
The minimum particle diameter [microns] to integrate from.
The maximum particle diameter [microns] to integrate to.
Choose how to weight the pdf. Default is number.
The relative humidity in percent (0-100).
The total [weight] between dmin and dmax. By default, the total number of particles (i.e. weight=’number’) are returned.
Examples
Calculate the total number of particles between 0-1 microns for the Urban distribution.
>>> opc = opcsim.OPC(n_bins=5)
>>> opc.calibrate(material="psl")
>>> d = opcsim.load_distribution("urban")
>>> ntot = opc.integrate(d, dmin=0., dmax=1., weight="number", rh=0.)
Calculate PM1 for the Urban Distribution when RH = 0%
>>> opc = opcsim.OPC(n_bins=5)
>>> opc.calibrate(material="psl")
>>> d = opcsim.load_distribution("urban")
>>> ntot = opc.integrate(d, dmin=0., dmax=1., weight="mass", rh=0., rho=1.5)
Calculate PM2.5 for the Urban Distribution when RH = 50%
>>> opc = opcsim.OPC(n_bins=5)
>>> opc.calibrate(material="psl")
>>> d = opcsim.load_distribution("urban")
>>> ntot = opc.integrate(d, dmin=0., dmax=2.5, weight="mass", rh=50., rho=1.5)