photonpacket.frameseries module

photonpacket.frameseries.emptyframe(shape)[source]
class photonpacket.frameseries.frameseries(photons, idxs, shape, cut=True, dtype=<class 'numpy.uint16'>)[source]

Bases: object

Methods

accumautocoinc()

Accumulate autocoincidences

accumframes([first, nframes])

Accumulate all photons from frames ranging from first to first+nframes defaults to all frames

append(fs)

Append antoher frameseries to current frameseries

copy()

Copies the frameseries in memory and returns new object

cuttoshape(shape)

Cut frames to shape

delneighbours([r, metric])

Find photon pairs that are too close to each other and remove second photon from the frame args: radius, metric (c.f.

delsubsequent([Nf])

Delete Nf frames after photon is detected in one

delsubsmask([Nf])

Get the mask corresponding to delsubsequent function; does not alter the object

dtype

alias of numpy.uint16

from_dict(d)

Create frameseries object from dictionary

len()

Get total length fo series of frames Nframes

plot([samples])

Plot the series as a time series of photon number after resampling

rescale(scale, centerpoint)

Rescale coordinate system

rescalediv(factor)

rescale photon positions by factor = old_div / new_div

rotate(angle, centerpoint)

Rotate coordinate system

shift(n)

Shift frames

store(fname)

Store pickled frameseries

timeseries([samples])

Get photon numbers as resampled time series

transform(transform)

Affine tranformation of photons.

delframes

fs_frames

g2

imshow

maskframes

mean

std

thmodes

var

N = array([], dtype=float64)
Nframes = 0
accumautocoinc()[source]

Accumulate autocoincidences

accumframes(first=0, nframes='all', **kwargs)[source]

Accumulate all photons from frames ranging from first to first+nframes defaults to all frames

‘kwargs’ : minphotons, maxphotons (filters out frames), nphotons

Returns
accumnumpy.ndarray
append(fs)[source]

Append antoher frameseries to current frameseries

copy()[source]

Copies the frameseries in memory and returns new object

cuttoshape(shape)[source]

Cut frames to shape

shape :

delframes(max_photons=20)[source]
delneighbours(r=5, metric='euclidean')[source]

Find photon pairs that are too close to each other and remove second photon from the frame args: radius, metric (c.f. scipy.spatial.distance.pdist)

delsubsequent(Nf=10)[source]

Delete Nf frames after photon is detected in one

delsubsmask(Nf=10)[source]

Get the mask corresponding to delsubsequent function; does not alter the object

dtype

alias of numpy.uint16

classmethod from_dict(d)[source]

Create frameseries object from dictionary

photons : numpy.ndarray

idxs : numpy.ndarray

shape : tuple

cut : bool

dtype : data-type

class fs_frames(fs)[source]

Bases: object

Methods

asarray

asarray()[source]
g2(uncert=False)[source]
idxs = array([], dtype=float64)
imshow(**kwargs)[source]
len()[source]

Get total length fo series of frames Nframes

maskframes(frame_mask)[source]
mean(uncert=False)[source]
photons = array([], dtype=float64)
plot(samples=1000)[source]

Plot the series as a time series of photon number after resampling

rescale(scale, centerpoint)[source]

Rescale coordinate system

factor :

axis :

rescalediv(factor)[source]

rescale photon positions by factor = old_div / new_div

rotate(angle, centerpoint)[source]

Rotate coordinate system

angle :

shape = ()
shift(n)[source]

Shift frames

n :

std(uncert=False)[source]
store(fname)[source]

Store pickled frameseries

fnamestring

file name

thmodes(uncert=False)[source]
timeseries(samples=1000)[source]

Get photon numbers as resampled time series

transform(transform)[source]

Affine tranformation of photons.

transformtuple

(a,b,c,d,e,f), where ((a,b), (c,d)) is transformation matrix and (e,f) is the added vector

var(uncert=False)[source]
photonpacket.frameseries.fsconcat(fslist)[source]

Concatenate frameseries

photonpacket.frameseries.fsmerge(fslist)[source]

Merge frame-by-frame

photonpacket.frameseries.fsplot(fslist, samples=1000)[source]

Plot mutltiple frameseries as photon number time series

photonpacket.frameseries.loadfs(fname)[source]

Load frameseries from file

class photonpacket.frameseries.singleframe(photons, idxs, shape, cut=True, dtype=<class 'numpy.uint16'>)[source]

Bases: photonpacket.frameseries.frameseries

Methods

accumautocoinc()

Accumulate autocoincidences

accumframes([first, nframes])

Accumulate all photons from frames ranging from first to first+nframes defaults to all frames

append(fs)

Append antoher frameseries to current frameseries

copy()

Copies the frameseries in memory and returns new object

cuttoshape(shape)

Cut frames to shape

delneighbours([r, metric])

Find photon pairs that are too close to each other and remove second photon from the frame args: radius, metric (c.f.

delsubsequent([Nf])

Delete Nf frames after photon is detected in one

delsubsmask([Nf])

Get the mask corresponding to delsubsequent function; does not alter the object

dtype

alias of numpy.uint16

from_dict(d)

Create frameseries object from dictionary

len()

Get total length fo series of frames Nframes

plot([samples])

Plot the series as a time series of photon number after resampling

rescale(scale, centerpoint)

Rescale coordinate system

rescalediv(factor)

rescale photon positions by factor = old_div / new_div

rotate(angle, centerpoint)

Rotate coordinate system

shift(n)

Shift frames

store(fname)

Store pickled frameseries

timeseries([samples])

Get photon numbers as resampled time series

transform(transform)

Affine tranformation of photons.

delframes

fs_frames

g2

imshow

maskframes

mean

scatter

std

thmodes

var

scatter()[source]