nabu.resources.dataset_analyzer module¶
- class nabu.resources.dataset_analyzer.DatasetAnalyzer(location, extra_options=None, logger=None)[source]¶
 Bases:
objectInitialize a Dataset analyzer.
- Parameters:
 location (str) – Dataset location (directory or file name)
extra_options (dict, optional) – Extra options on how to interpret the dataset.
logger (logging object, optional) – Logger. If not set, messages will just be printed in stdout.
- kind = 'none'¶
 Base class for datasets analyzers.
- property energy¶
 Return the energy in kev.
- property distance¶
 Return the sample-detector distance in meters.
- property pixel_size¶
 Return the pixel size in microns.
- property rotation_angles¶
 Return the rotation angles in radians.
- property is_halftomo¶
 Indicates whether the current dataset was performed with half acquisition.
- property detector_tilt¶
 Return the detector tilt in degrees
- property projections_srcurrent¶
 Return the synchrotron electric current for each projection.
- property flats_srcurrent¶
 Return the synchrotron electric current for each flat image.
- class nabu.resources.dataset_analyzer.EDFDatasetAnalyzer(location, extra_options=None, logger=None)[source]¶
 Bases:
DatasetAnalyzerEDF Dataset analyzer for legacy ESRF acquisitions
Initialize a Dataset analyzer.
- Parameters:
 location (str) – Dataset location (directory or file name)
extra_options (dict, optional) – Extra options on how to interpret the dataset.
logger (logging object, optional) – Logger. If not set, messages will just be printed in stdout.
- kind = 'edf'¶
 Base class for datasets analyzers.
- property hdf5_entry¶
 Return the HDF5 entry of the current dataset. Not applicable for EDF (return None)
- class nabu.resources.dataset_analyzer.HDF5DatasetAnalyzer(location, extra_options=None, logger=None)[source]¶
 Bases:
DatasetAnalyzerHDF5 dataset analyzer
Initialize a Dataset analyzer.
- Parameters:
 location (str) – Dataset location (directory or file name)
extra_options (dict, optional) – Extra options on how to interpret the dataset.
logger (logging object, optional) – Logger. If not set, messages will just be printed in stdout.
- kind = 'hdf5'¶
 Base class for datasets analyzers.
- property z_translation¶
 
- property x_translation¶
 
- property dataset_hdf5_url¶
 
- property hdf5_entry¶
 Return the HDF5 entry of the current dataset
- nabu.resources.dataset_analyzer.analyze_dataset(dataset_path, extra_options=None, logger=None)[source]¶
 
- nabu.resources.dataset_analyzer.get_radio_pair(dataset_info, radio_angles: tuple, return_indices=False)[source]¶
 Get closest radios at radio_angles[0] and radio_angles[1] angles must be in angles
- Parameters:
 dataset_info (DatasetAnalyzer instance) – Data structure with the dataset information
radio_angles (tuple) – tuple of two elements: angles (in radian) to get
return_indices (bool, optional) – Whether to return radios indices along with the radios array.
- Returns:
 res – If return_indices is True, return a tuple (radios, indices). Otherwise, return an array with the radios.
- Return type:
 array or tuple