nabu.pipeline.datadump module

class nabu.pipeline.datadump.DataDumpManager(process_config, sub_region, margin=None, logger=None)[source]

Bases: object

A helper class for managing data dumps, with the aim of saving/resuming the processing from a given step.

Initialize a DataDump object.

Parameters:
  • process_config (ProcessConfig) – ProcessConfig object

  • sub_region (tuple of int) – Series of integers defining the sub-region being processed. The form is ((start_angle, end_angle), (start_z, end_z), (start_x, end_x))

  • margin (tuple of int, optional) – Margin, used when processing data, in the form ((up, down), (left, right)). Each item can be None. Using a margin means that a given chunk of data will eventually be cropped as data[:, up:-down, left:-right]

  • logger (Logger, optional) – Logging object

get_data_dump(step_name)[source]

Get information on where to write a given processing step.

Parameters:

step_name (str) – Name of the processing step

Returns:

writer_configurator – An object with information on where to write the data for the given processing step.

Return type:

WriterConfigurator

get_read_dump_subregion()[source]
dump_data_to_file(step_name, data)[source]