Get#

class prose.blocks.utils.Get(*attributes, name: str = 'get', arrays: bool = True, **getters)#

Retrieve and store properties from an Image.

If a list of paths is provided to a Sequence, each image is created at the beginning of the sequence, and deleted at the end, so that computed data stored as prose.Image properties are deleted at each iteration. Using the Get blocks provides a way to retain any daa stored in images before they are deleted.

When a sequence is finished, this block has a values property, a dictionary where all retained properties are accessible by name, and consist of a list with a length corresponding to the number of images processed. The parameters of this dictionary are the args and kwargs provided to the block (see Example).

If Image is constructed from a FITS image, header values can be retrieved using the syntax “keyword:KEY” (see example todo)

Parameters:
  • *attributes (str) – names of properties to retain

  • name (str, optional) – name of the block, by default “get”

  • arrays (bool, optional) – whether to convert each array of data as a numpy array , by default True

  • **getters (function) – name and functions

Example

TODO