nxtomomill.converter.hdf5.acquisition.backandforth.BackAndForthAcquisition#

class nxtomomill.converter.hdf5.acquisition.backandforth.BackAndForthAcquisition(root_url, configuration, detector_sel_callback, start_index)[source]#

Bases: MultiTomoAcquisition

Back and forth acquisition is very similar to multi-tomo.

In multi-tomo, the acquisition of projections begins when the rotation speed has reached an ‘optimal’ value.

value.

In back-and-forth acquisition, projections will be acquired in one rotation direction, then in the opposite direction, and so on.

From the nxtomomill perspective, the constraints and processing remain the same. Nevertheless for clarity (and possible future evolution) a dedicated class has been created.

__init__(root_url, configuration, detector_sel_callback, start_index)#

Methods

__init__(root_url, configuration, ...)

camera_is_valid(det_name)

check_tomo_n()

concatenate_pint_quantities(quantities)

concatenation dedicated to acquisition.

get_axis_scale_types()

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

get_detector_roi()

get_expected_nx_tomo()

Return the expected number of nxtomo created for this acquisition.

get_multitomo_version(url)

return the multitomo version according to the provider version (aka bliss)

get_nb_loop(url)

rtype:

Optional[int]

get_nb_tomo(url)

rtype:

Optional[int]

get_nb_turns(url)

rtype:

Optional[int]

get_pcotomo_version(url)

get_translation_z_frm(root_node, n_frame, ...)

rtype:

Quantity

is_different_sequence(entry)

Can we have several entries 1.1, 1.2, 1.3.

is_part_of_same_series(other)

rtype:

bool

parent_root_url()

rtype:

Optional[DataUrl]

read_entry()

register_step(url[, entry_type, copy_frames])

type url:

DataUrl

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

rtype:

tuple

to_NXtomos_multitomo_v1(request_input, ...)

The first version of 'to_NXtomos' for the first way of storing multitomo information.

to_NXtomos_multitomo_v2(request_input, ...)

The second version of 'to_NXtomos' for the second way of storing multi-tomo information.

to_NXtomos_pcotomo_v1(request_input, ...[, ...])

rtype:

tuple

to_NXtomos_pcotomo_v2(request_input, ...[, ...])

rtype:

tuple

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

This function will dump the acquisition to disk as an NXtomo

Attributes

TITLE_PATHS

configuration

data_type

dim_1

dim_2

expo_time

image_key_control

known_machine_current

Return the dict of all known machine currents.

lr_flipped

n_frames

n_frames_actual_bliss_scan

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

rotation_angle

sample_x

Return the '_sample_x' attribute.

sample_y

Return the '_sample_y' attribute.

start_index

rtype:

int

translation_y

translation_z

ud_flipped

x_flipped

y_flipped

static concatenate_pint_quantities(quantities)#

concatenation dedicated to acquisition. quantities items can be None or a quantity

get_axis_scale_types()#

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

get_expected_nx_tomo()#

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_multitomo_version(url)#

return the multitomo version according to the provider version (aka bliss)

is_different_sequence(entry)#

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

property known_machine_current: dict | None#

Return the dict of all known machine currents. Key is the time stamp, value is the machine current

Return type:

Optional[dict]

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=None, copy_frames=False)#
Parameters:
  • url (DataUrl) – entry to be registered and contained in the acquisition

  • entry_type (Optional[AcquisitionStep]) – type of the entry if know. Overwise will be ‘evaluated’

Return type:

None

property sample_x#

Return the ‘_sample_x’ attribute. In ESRF coordinate

property sample_y#

Return the ‘_sample_y’ attribute. In ESRF coordinate

to_NXtomos_multitomo_v1(request_input, input_callback, check_tomo_n=True)#

The first version of ‘to_NXtomos’ for the first way of storing multitomo information. In this version we expect to have: * nb_loop: define the number of turn * nb_tomo: define the number of ‘sequence’ per turn. One sequence will generate one NXtomo

Return type:

tuple

to_NXtomos_multitomo_v2(request_input, input_callback, check_tomo_n=True)#

The second version of ‘to_NXtomos’ for the second way of storing multi-tomo information. In this version we expect to have: * nb_turns: number of NXtomo to generate * proj_n: number of projections per NXtomo * scan_range: rotation angle scope

Return type:

tuple

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