ptypy.core.classes#

Container management.

This module defines flexible containers for the various quantities needed for ptychographic reconstructions.

Container class

A high-level container that keeps track of sub-containers (Storage) and Views onto them. A container can copy itself to produce a buffer needed for calculations. Some basic Mathematical operations are implemented at this level as in place operations. In general, operations on arrays should be done using the Views, which simply return numpy arrays.

Storage class

The sub-container, wrapping a numpy array buffer. A Storage defines a system of coordinate (for now only a scaled translation of the pixel coordinates, but more complicated affine transformation could be implemented if needed). The sub-class DynamicStorage can adapt the size of its buffer (cropping and/or padding) depending on the Views.

View class

A low-weight class that contains all information to access a 2D piece of a Storage within a Container. The basic idea is that the View access is controlled by a physical position and its frame, such that one is not bothered by memory/array addresses when accessing data.

This file is part of the PTYPY package.

copyright:

Copyright 2014 by the PTYPY team, see AUTHORS.

license:

see LICENSE for details.

Functions

get_class(ID)

Determine ptypy class from unique ID

shift(v, sp)

Placeholder for future subpixel shifting method.

valid_ID(obj)

check if ID of object obj is compatible with the current format

Classes

Base([owner, ID, BeOwner])

Container([owner, ID, data_type, data_dims, ...])

High-level container class.

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

POD : Ptychographic Object Descriptor

Storage(container[, ID, data, shape, fill, ...])

Inner container handling access to data arrays.

View(container[, ID, accessrule])

A 'window' on a Container.