nxtomomill.converter.hdf5.acquisition.multitomo.MultiTomoAcquisition#
- class nxtomomill.converter.hdf5.acquisition.multitomo.MultiTomoAcquisition(root_url, configuration, detector_sel_callback, start_index)[source]#
Bases:
StandardAcquisitionA multitomo is an acquisition that we want to split into several NXtomos.
It is contain in a bliss scan and looks like the following at bliss side:
scan “description”, title can be tomo:pcotomo ro tomo:multitomo for example
Optional scan dark
Optional scan flat
scan “projections”
Optional scan flat
The scan “projections” contains several “tomo” with a parameter evolving with time like heat or pressure. The idea is that we want to split those into several NXtomo. Those NXtomo must duplicate dark and flat scans For example if scan “projections” contains nb_loop = 2 and nb_loop = 3 we must create nb_loop*nb_loop == 6 NXtomo as output.
Split of those can are done in postprocessing on the to_NXtomos function
Methods
__init__(root_url, configuration, ...)camera_is_valid(det_name)check_tomo_n()concatenate_pint_quantities(quantities)concatenation dedicated to acquisition.
Return axis display for the detector data to be used by silx view
get_detector_roi()Return the expected number of nxtomo created for this acquisition.
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_PATHSconfigurationdata_typedim_1dim_2expo_timeimage_key_controlReturn the dict of all known machine currents.
lr_flippedn_framesn_frames_actual_bliss_scanShould we raise an error if we encounter or an issue or should we just log an error message
root_urlrotation_angleReturn the '_sample_x' attribute.
Return the '_sample_y' attribute.
start_index- rtype:
int
translation_ytranslation_zud_flippedx_flippedy_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()[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_multitomo_version(url)[source]#
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 acquisitionentry_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)[source]#
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)[source]#
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 pathrequest_input (
bool) – if True the conversion can ask user some missing metadatadivide_into_sub_files (
bool) – if True then create one file per NXtomoinput_callback – function to call for users to provide missing metadata
- Return type:
tuple