Library Reference - Import Tools — Bonsu - The Interactive Phase Retrieval Suite 3.3 documentation

# Library Reference - Import Tools

## Array to Memory

Provides a means to load a NumPy array from disk directly into a memory by using either of the 10 keywords `memory0`, `memory1`, … , `memory9` as a string in place of a NumPy file path. See Array Creation and Storage for furthr details.

Parameters:

Input file

  User provided path string to the input NumPy file.

Output File

  User provided choice of memory keyword.

## HDF5 to Numpy

Provides a means to browse and import data within a Hierarchical Data Format (HDF) file. HDF5 is supported via the python H5Py package.

Parameters:

Input HDF file

  User provided path string to the input HDF file.

HDF key path

  Comma separated list of HDF keys found within the `input HDF file`.

Output File

  User provided path string for the output NumPy file.

## Image to Numpy

Provides a means to import image data into NumPy format. Accepted formats include Portable Network Graphics (PNG), JPEG, Portable PixMap (PPM) and Tagged Image File (TIF) format. Output Numpy arrays are three dimensional with unit length in the third dimension.

Parameters:

Input Image file

  User provided path string to the input image file.

Output File

  User provided path string for the output NumPy file.

## Load Co-ordinates

Initialises or replaces the internally stored `Co-ordinates data` with the supplied array.

Parameters:

Input file

  User provided path string to the input NumPy file.

## Load PSF

Initialises or replaces the internally stored `Point Spread Function data` with the supplied array. This is typically used before a partial coherence phase retrieval algorithm commences.

Parameters:

Input file

  User provided path string to the input NumPy file.

## SPE to Numpy

Provides a means to import data from SPE format into NumPy format. During conversion, additional information is provided and appears in the Log.

Parameters:

Input SPE file

  User provided path string to the input SPE file.

Output File

  User provided path string for the output NumPy file.