ptypy.core.geometry.Geo#
- class ptypy.core.geometry.Geo(owner=None, ID=None, pars=None, **kwargs)#
Bases:
BaseHold and keep consistent the information about experimental parameters.
Keeps also reference to the Propagator and updates this reference when resolution, pixel size, etc. is changed in Geo. Reference to
io.paths.recons.- interact#
If set to True, changes to properties like
energy(),lam(),shape()orpsize()will cause a call toupdate().- Type:
bool (True)
Default geometry parameters. See also
scan.geometry- __init__(owner=None, ID=None, pars=None, **kwargs)#
- Parameters:
owner (Base or subclass) – Instance of a subclass of
Baseor None. That is usuallyPtychofor a Geo instance.ID (str or int) – Identifier. Use
ID=Nonefor automatic ID assignment.pars (dict or Param) – The configuration parameters. See Geo.DEFAULT. Any other kwarg will update internal p dictionary if the key exists in Geo.DEFAULT.
Methods
__init__([owner, ID, pars])calc_mem_usage()downsample(a)Downsample the array a (float)
update([update_propagator])Update the internal pixel sizes, giving precedence to the sample pixel size (resolution) if self.psize_is_fixed is True.
upsample(c)Upsample the array c (float or complex).
Attributes
IDnumIDownerDEFAULTPropagation distance in meters (read-only)
Get or set the energy (in keV).
Get or set the wavelength (in meters).
Product of wavelength and propagation distance (read-only)
Propagator, created on-the-fly if needed (read-only)
Get or set the pixel size in the propagated plane (in meters).
Get or set the pixel size in the image plane (in meters).
Get or set the frame dimensions.
- property distance#
Propagation distance in meters (read-only)
- downsample(a)#
Downsample the array a (float)
- property energy#
Get or set the energy (in keV). If self.interact is True, recompute dependent quantities accordingly.
- property lam#
Get or set the wavelength (in meters).
If self.interact is True, recompute dependent quantities accordingly. Changing wavelengths never changes the image extent (self.sh).
- property lz#
Product of wavelength and propagation distance (read-only)
- property propagator#
Propagator, created on-the-fly if needed (read-only)
- property psize#
Get or set the pixel size in the propagated plane (in meters).
If self.interact is True, recompute dependent quantities accordingly.
- property resolution#
Get or set the pixel size in the image plane (in meters).
If self.interact is True, recompute dependent quantities accordingly.
- property shape#
Get or set the frame dimensions.
If self.interact is True, recompute dependent quantities accordingly.
- update(update_propagator=True)#
Update the internal pixel sizes, giving precedence to the sample pixel size (resolution) if self.psize_is_fixed is True.
- upsample(c)#
Upsample the array c (float or complex).