nxtomomill.converter.hdf5.acquisition.zseriesacquisition.ZSeriesBaseAcquisition#

class nxtomomill.converter.hdf5.acquisition.zseriesacquisition.ZSeriesBaseAcquisition(*args, **kwargs)[source]#

Bases: BaseAcquisition

A ‘z series acquisition’ is considered as a serie of _StandardAcquisition. Registered scan can be split according to translation_z value.

At the moment there is three version of z-series:

  1. version 1: each z is part of the same sequence. bliss .h5 will look like:
    • 1.1 tomo:zserie -> define the beginning of the sequence

    • 2.1 reference images1 (flats) -> start of the first z level

    • 3.1 projections 1 -7000 (flats)

    • 4.1 static images (alignment / return projections)

    • 5.1 reference images1 (flats)

    • 6.1 dark images

    • 7.1 reference images1 (flats) -> start of the second z level. using get_z to know the different levels

    • 8.1 projections 1 -7000 (flats)

    in this case an instance of ZSeriesBaseAcquisition will create N NXtomo (one nxtomo per sequence)

  2. version 2: each z is part of a new sequence. So each sequence will instantiate ZSeriesBaseAcquisition and each with a single z.
    • 1.1 tomo:zserie -> define the beginning of the sequence

    • 2.1 reference images1 (flats) -> start of the first z level

    • 3.1 projections 1 -7000 (flats)

    • 4.1 static images (alignment / return projections)

    • 5.1 reference images1 (flats)

    • 6.1 dark images

    • 7.1 tomo:zserie -> define the beginning of the sequence

    • 8.1 reference images1 (flats) -> start of the second z level. using get_z to know the different levels

    • 9.1 projections 1 -7000 (flats)

    in this case an instance of ZSeriesBaseAcquisition will create one NXtomo (one NXtomo per sequence)

#. version 3: same as version 2 but dark / flat can only be done in a at the beginning or at the end of the series. And we want to copy those. To keep compatibility and design this part is done in post-processing.

in this case an instance of ZSeriesBaseAcquisition will also create one NXtomo (one NXtomo per sequence)

The goal of this class is mostly to handle the version 1. For version 2 and 3 it will be instantiated but _acquisition will contain a single acquisition. But to manipulate the series in the case of version 2 and especially version 3 the converter will group them inside _z_series_v2_v3

__init__(*args, **kwargs)[source]#

Methods

__init__(*args, **kwargs)

get_axis_scale_types()

Return axis display for the detector data to be used by silx view

get_dark_flat_pos_info()

rtype

tuple

get_detector_roi()

get_expected_nx_tomo()

Return the expected number of nxtomo created for this acquisition.

get_standard_sub_acquisitions()

Return the tuple of all StandardAcquisition composing _acquisitions

get_translation_z_frm(root_node, n_frame, ...)

get_z(entry)

is_different_sequence(entry)

Can we have several entries 1.1, 1.2, 1.3.

is_part_of_same_series(other)

rtype

bool

read_entry()

register_step(url, entry_type[, copy_frames])

Add a bliss entry to the acquisition :type url: DataUrl :param url: :param entry_type:

to_NXtomos(request_input, input_callback[, ...])

rtype

tuple

write_as_nxtomo(shift_entry, ...[, ...])

This function will dump the acquisition to disk as an NXtomo

Attributes

configuration

raise_error_if_issue

Should we raise an error if we encounter or an issue or should we just log an error message

root_url

start_index

rtype

int

get_axis_scale_types()#

Return axis display for the detector data to be used by silx view

get_expected_nx_tomo()[source]#

Return the expected number of nxtomo created for this acquisition. This is required to get consistent entry and file name. At lest for automation

get_standard_sub_acquisitions()[source]#

Return the tuple of all StandardAcquisition composing _acquisitions

Return type

tuple

is_different_sequence(entry)#

Can we have several entries 1.1, 1.2, 1.3… to consider.

property raise_error_if_issue#

Should we raise an error if we encounter or an issue or should we just log an error message

register_step(url, entry_type, copy_frames=False)[source]#

Add a bliss entry to the acquisition :type url: DataUrl :param url: :param entry_type:

Return type

None

write_as_nxtomo(shift_entry, input_file_path, request_input, divide_into_sub_files, input_callback=None)#

This function will dump the acquisition to disk as an NXtomo

Parameters
  • shift_entry (int) – index of the entry to start saving new nxtomos.

  • input_file_path (str) – output file path

  • request_input (bool) – if True the conversion can ask user some missing metadata

  • divide_into_sub_files (bool) – if True then create one file per NXtomo

  • input_callback – function to call for users to provide missing metadata

Return type

tuple