nabu.resources.dataset_analyzer module¶
- class nabu.resources.dataset_analyzer.DatasetAnalyzer(location, extra_options=None, logger=None)[source]¶
Bases:
object
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 = '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.
- class nabu.resources.dataset_analyzer.EDFDatasetAnalyzer(location, extra_options=None, logger=None)[source]¶
Bases:
DatasetAnalyzer
EDF 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:
DatasetAnalyzer
HDF5 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_0_180_radios(dataset_info, return_indices=False)[source]¶
Get the radios at 0 degres and 180 degrees.
- Parameters:
dataset_info (DatasetAnalyzer instance) – Data structure with the dataset information
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