Skip to content

add methods to save and load computed darks / flats.

payno requested to merge provide_dark_flat_helpers into master

Overview

  • during save: several urls can be provided in order save the results at different places (requested by nabu and tomwer)
  • DataUrl in this particular case can handle patterns like '{entry}', '{index}' and '{index_zfill4}' in order to handle all use cases (EDF + HDF5)
  • during load several urls can also be provided in order to look at some specific locations
  • add an option to returns darks and flats as DataUrl

API

Now users that want to provide / modify dark and-or flats on a scan will be able to do:

from tomwer.core.scan.hdf5scan import HDF5TomoScan

scan = HDF5TomoScan("master_file.nx", "my_entry")
dark_frame = numpy.ones((100, 100))
scan.save_reduced_darks(
    {
        0: dark_frame
    }
)

flat_frame_1 = numpy.ones((100, 100))
flat_frame_1000 = numpy.zeros((100, 100))
scan.save_reduced_flats(
    {
        1: flat_frame_1,
        1000: flat_frame_1000,
    }
)

Edited by payno

Merge request reports

Loading