tomoscan.esrf.scan.fscan.FscanDataset#

class tomoscan.esrf.scan.fscan.FscanDataset(fname, entry=None, detector_name=None, on_missing_metadata='raise')#

Bases: object

A simple class for parsing ESRF-Fscan datasets https://gitlab.esrf.fr/bliss/fscan

__init__(fname, entry=None, detector_name=None, on_missing_metadata='raise')#

Build a Dataset object. Each object is tied to only one entry.

Parameters
  • fname – Path to the HDF5 file.

  • entry – HDF5 entry. If not provided, the first entry is taken.

  • detector_name – Detector name

  • on_missing_metadata – behavior when let missing metadata. Valid values are ‘print’ or ‘raise’

Methods

__init__(fname[, entry, detector_name, ...])

Build a Dataset object.

get_all_stacks_sizes()

Go through all LIMA files and retrieve dataset size (nb frame)

get_stack_size([use_file_n])

Get dataset stack size of one LIMA file (size can be different, if cancel for example)

get_virtual_sources([remove_nonexisting, ...])

Return a dict with the virtual sources of the current dataset.

Attributes

exposure_time

Get the exposure time in seconds

guess_detector_name_if_missing

property exposure_time#

Get the exposure time in seconds

get_all_stacks_sizes()#

Go through all LIMA files and retrieve dataset size (nb frame)

get_stack_size(use_file_n=0)#

Get dataset stack size of one LIMA file (size can be different, if cancel for example)

Parameters

use_file_n (int) – Which file to take to get stack size. Default is first file.

get_virtual_sources(remove_nonexisting=True, force_recompute=False)#

Return a dict with the virtual sources of the current dataset.

Parameters
  • remove_nonexisting (bool) – Whether to check that each target file actually exists, and possibly remove the non-existing files

  • force_recompute (bool) – if False and already get virtual sources in cache return them