ptypy.core.classes.POD#

class ptypy.core.classes.POD(ptycho=None, model=None, ID=None, views=None, geometry=None, **kwargs)#

Bases: Base

POD : Ptychographic Object Descriptor

A POD brings together probe view, object view and diff view. It also gives access to “exit”, a (coherent) exit wave, and to propagation objects to go from exit to diff space.

__init__(ptycho=None, model=None, ID=None, views=None, geometry=None, **kwargs)#
Parameters:
  • ptycho (Ptycho) – The instance of Ptycho associated with this pod.

  • model (ScanModel) – The instance of ScanModel (or it subclasses) which describes this pod.

  • ID (str or int) – The pod ID, If None it is managed by the ptycho.

  • views (dict or Param) – The views. See DEFAULT_VIEWS.

  • geometry (Geo) – Geometry class instance and attached propagator

Methods

__init__([ptycho, model, ID, views, geometry])

calc_mem_usage()

Attributes

ID

numID

owner

DEFAULT_VIEWS

Default set of Views used by a POD

active

Convenience property that describes whether this pod is active or not.

bw

Convenience property that returns backward propagator of attached Geometry instance.

diff

Convenience property that links to slice of diffraction Storage.

downsample

Convencience property that returns downsample function of attached Geometry instance.

exit

Convenience property that links to slice of exit wave Storage.

fw

Convenience property that returns forward propagator of attached Geometry instance.

mask

Convenience property that links to slice of masking Storage.

object

Convenience property that links to slice of object Storage.

probe

Convenience property that links to slice of probe Storage.

upsample

Convencience property that returns upsample function of attached Geometry instance.

geometry

Geo instance with propagators

pr_view

A reference to the (pr)obe-view.

DEFAULT_VIEWS = {'diff': None, 'exit': None, 'mask': None, 'obj': None, 'probe': None}#

Default set of Views used by a POD

property active#

Convenience property that describes whether this pod is active or not. Equivalent to self.di_view.active

property bw#

Convenience property that returns backward propagator of attached Geometry instance. Equivalent to self.geometry.propagator.bw.

property diff#

Convenience property that links to slice of diffraction Storage. Equivalent to self.di_view.data.

property downsample#

Convencience property that returns downsample function of attached Geometry instance. Equivalent to self.geometry.downsample.

property exit#

Convenience property that links to slice of exit wave Storage. Equivalent to self.pr_view.data.

property fw#

Convenience property that returns forward propagator of attached Geometry instance. Equivalent to self.geometry.propagator.fw.

geometry#

Geo instance with propagators

property mask#

Convenience property that links to slice of masking Storage. Equivalent to self.ma_view.data.

property object#

Convenience property that links to slice of object Storage. Usually equivalent to self.ob_view.data.

pr_view#

A reference to the (pr)obe-view. (ob)ject-, (ma)sk- and (di)ff-view are accessible in the same manner (self.xx_view).

property probe#

Convenience property that links to slice of probe Storage. Equivalent to self.pr_view.data.

property upsample#

Convencience property that returns upsample function of attached Geometry instance. Equivalent to self.geometry.upsample.