photonpacket.stat1d module

photonpacket.stat1d.centralmoment(s, m)[source]
photonpacket.stat1d.g2(s, uncert=False)[source]

Second order autocorrelation

photonpacket.stat1d.mean(s, uncert=False)[source]

Calculate the mean photon number

Parameters
sphotonpacket.frameseriesq or np.ndarray

Series of photon frames or photon counts

Returns
double

Mean photon number

Notes

The mean photon number is calculated as

\langle n \rangle = \sum_i^N n_i / N

where n_i is the total number of photons in frame i and N is the total number of frames in the series.

Examples

>>> fs.mean()
0.553
photonpacket.stat1d.qmandel(fs)[source]

Q_M Mandel Q parameter TODO: implement

photonpacket.stat1d.rawmoment(s, m, uncert=False)[source]
photonpacket.stat1d.std(s, uncert=False)[source]
photonpacket.stat1d.subbinomal(fs)[source]

Calculate the sub-binomial paramter

Parameters
fsphotonpacket.frameseries

Series of photon frames

Returns
double

The sub-binomial parameter

Notes

The sub-binomial parameter was introduced in [1]

References

1
  1. Sperling, W. Vogel, and G. S. Agarwal, “Sub-binomial light”, Phys. Rev. Lett. 109, 093601 (2012).

Examples

>>> fs.subbinomial()
1
photonpacket.stat1d.thmodes(fs, uncert=False)[source]

Calculate the number of modes estimated assuming the photons are distributed thermally

Parameters
fsphotonpacket.frameseries

Series of photon frames

Returns
double

Estimated number of thermal modes

See also

qmandel

Related Mandel Q Parameter

Notes

Number of thermal modes may be estimated as:

M = \langle n \rangle^2 / (\Delta^2 n - \langle n \rangle)

where \langle n \rangle is the mean photon number and \Delta^2 n is photon number variance.

Examples

>>> fs.thmodes()
1
photonpacket.stat1d.var(s, uncert=False)[source]