nabu.app.histogram module

class nabu.app.histogram.VolumesHistogram(fnames, output_file, chunk_size_slices=100, chunk_size_GB=None, nbins=1000000.0, logger=None, backend='cuda')[source]

Bases: object

A class for extracting or computing histograms of one or several volumes.

Initialize a VolumesHistogram object.

Parameters:
  • fnames (list of str) – List of paths to HDF5 files. To specify an entry for each file name, use the “?” separator: /path/to/file.h5?entry0001

  • output_file (str) – Path to the output file

  • write_histogram_if_computed (bool, optional) – Whether to write histograms that are computed to a file. Some volumes might be missing their histogram. In this case, the histogram is computed, and the result is written to a dedicated file in the same directory as ‘output_file’. Default is True.

available_backends = {'cuda': <class 'nabu.processing.histogram_cuda.CudaVolumeHistogram'>, 'numpy': <class 'nabu.processing.histogram.VolumeHistogram'>}
get_histogram_single_volume(fname, entry, write_histogram_if_computed=True, return_config=False)[source]
get_histogram(return_config=False)[source]
merge_histograms_configurations(configs)[source]
write_histogram(hist, config=None)[source]
nabu.app.histogram.histogram_cli()[source]