photonpacket.region module

class photonpacket.region.circle(r, r0)[source]

Bases: photonpacket.region.region

Circle region

Attributes
logic

Methods

getcounts(fs)

Get total photon number in each frame

getframeseries(fs[, reshape, dtype])

Select photon in region and obtain frameseries

reshape(frame)

Reshape frame to have (0,0) bottom-left corner

getmask

isinregion

plot

r2dist

corner = array([], dtype=float64)
getmask(frame)[source]
isinregion(R)[source]
plot(reshaped=False, **kwargs)[source]
r = 0
r2dist(R)[source]
shape = []
x0 = 0
y0 = 0
class photonpacket.region.ellpise(a, b, r0, angle)[source]

Bases: photonpacket.region.region

Ellipse region

Attributes
logic

Methods

getcounts(fs)

Get total photon number in each frame

getframeseries(fs[, reshape, dtype])

Select photon in region and obtain frameseries

reshape(frame)

Reshape frame to have (0,0) bottom-left corner

getmask

isinregion

plot

r2dist

a = 0
angle = 0
b = 0
corner = array([], dtype=float64)
frames = []
getmask(frame)[source]
isinregion(R)[source]
plot()[source]
r2dist(R)[source]
shape = []
x0 = 0
y0 = 0
class photonpacket.region.halfcircle(r, angle, r0)[source]

Bases: photonpacket.region.region

Halfcircle region Not implemented

Attributes
logic

Methods

getcounts(fs)

Get total photon number in each frame

getframeseries(fs[, reshape, dtype])

Select photon in region and obtain frameseries

reshape(frame)

Reshape frame to have (0,0) bottom-left corner

getmask

isinregion

plot

r2dist

corner = array([], dtype=float64)
frames = []
getmask(frame)[source]
isinregion(R)[source]
plot()[source]
r1 = 0
r2dist(R)[source]
shape = []
x0 = 0
y0 = 0
class photonpacket.region.line(x0, x1)[source]

Bases: photonpacket.region.region

1d line

Attributes
logic

Methods

getcounts(fs)

Get total photon number in each frame

getframeseries(fs[, reshape, dtype])

Select photon in region and obtain frameseries

reshape(frame)

Reshape frame to have (0,0) bottom-left corner

getmask

isinregion

plot

corner = array([], dtype=float64)
getmask(frame)[source]
isinregion(R)[source]
plot(color='r', **kwargs)[source]
shape = []
x0 = 0
x1 = 0
class photonpacket.region.paramregion(fcomp, **kwargs)[source]

Bases: photonpacket.region.region

Represtents abstract region in the space of additional photon paramters accesible via file loading with non-standard ‘mode’ args:

fcomp - comparison function applied to an ARRAY of specified parameter values, yields true inside region

Attributes
logic

Methods

getcounts(fs)

Get total photon number in each frame

getframeseries(fs[, reshape, dtype])

Select photon in region and obtain frameseries

reshape(frame)

Reshape frame to have (0,0) bottom-left corner

fcomp

getmask

isinregion

plot

fcomp()
getmask(frame)[source]
paramid = 2
plot()[source]
class photonpacket.region.rect(r0, r1)[source]

Bases: photonpacket.region.region

Rectangle region

Attributes
logic

Methods

getcounts(fs)

Get total photon number in each frame

getframeseries(fs[, reshape, dtype])

Select photon in region and obtain frameseries

reshape(frame)

Reshape frame to have (0,0) bottom-left corner

getmask

isinregion

plot

corner = array([], dtype=float64)
getmask(frame)[source]
isinregion(R)[source]
plot(color='r', **kwargs)[source]
shape = []
x0 = 0
x1 = 0
y0 = 0
y1 = 0
class photonpacket.region.rect2(rc, rab)[source]

Bases: photonpacket.region.rect

Rectangle defined by center

Attributes
logic

Methods

getcounts(fs)

Get total photon number in each frame

getframeseries(fs[, reshape, dtype])

Select photon in region and obtain frameseries

reshape(frame)

Reshape frame to have (0,0) bottom-left corner

getmask

isinregion

plot

class photonpacket.region.region(component_regions, logic)[source]

Bases: object

Attributes
logic

Methods

getcounts(fs)

Get total photon number in each frame

getframeseries(fs[, reshape, dtype])

Select photon in region and obtain frameseries

reshape(frame)

Reshape frame to have (0,0) bottom-left corner

getmask

isinregion

plot

component_regions = ()
corner = array([0, 0])
getcounts(fs)[source]

Get total photon number in each frame

fs : photonpacket.frameseries

Returns
countsnumpy.ndarray

1D array of counts

getframeseries(fs, reshape=False, dtype=None)[source]

Select photon in region and obtain frameseries

fs : photonpacket.frameseries

reshape : bool

getmask(frame)[source]
isinregion()[source]
logic = None
plot(**kwargs)[source]
reshape(frame)[source]

Reshape frame to have (0,0) bottom-left corner

frane : numpy.ndarray

Returns
countsnumpy.ndarray

photon frame

shape = array([0, 0])
class photonpacket.region.ring(r1, r2, r0)[source]

Bases: photonpacket.region.region

Ring region

Attributes
logic

Methods

getcounts(fs)

Get total photon number in each frame

getframeseries(fs[, reshape, dtype])

Select photon in region and obtain frameseries

reshape(frame)

Reshape frame to have (0,0) bottom-left corner

getmask

isinregion

plot

r2dist

corner = array([], dtype=float64)
getmask(frame)[source]
isinregion(R)[source]
plot(reshaped=False)[source]
r1 = 0
r2 = 0
r2dist(R)[source]
shape = []
x0 = 0
y0 = 0
class photonpacket.region.square(a, rc)[source]

Bases: photonpacket.region.rect

Square region

Attributes
logic

Methods

getcounts(fs)

Get total photon number in each frame

getframeseries(fs[, reshape, dtype])

Select photon in region and obtain frameseries

reshape(frame)

Reshape frame to have (0,0) bottom-left corner

getmask

isinregion

plot