adhoc_ada

This module’s scope covers operations related to ADHOC ADA files.

class tuna.io.adhoc_ada.ada(array=None, file_name=None)[source]

This class’s responsibility is to read files in ADHOC format ADA.

The ADHOC file formats were developed for use with the ADHOC software solution, developed at LAM by Jacques Boulesteix.

Its constructor has the following signature:

Parameters:

  • array : numpy.ndarray : defaults to None

    An array containing the image data; this parameter is useful to convert a known array to a photon table.

  • file_name : string : defaults to None

    To obtain data from a file, it must contain the path to a valid ADT file, which will contain the metadata and the names for the individual ADA files.

Example usage:

import tuna
raw = tuna.io.ada ( file_name = "tuna/tuna/test/unit/unit_io/G093/G093.ADT" )
raw.read ( )
raw.get_array ( )
raw.get_metadata ( )
get_array()[source]

This method’s goal is to return the input array.

Returns:

  • self.__array : numpy.ndarray

    The array containing the current data.

get_metadata()[source]

This method’s goal is to return the metadata structure.

Returns:

  • self.__metadata : dictionary

    A dictionary containing the metadata as read from the file.

get_photons()[source]

This method’s goal is to Return a photon table corresponding to the data read.

Returns:

  • self.__photons : dictionary

    A dictionary containing a row for each photon count.

read()[source]

This method’s goal is to validate input and start the reading procedure.