nxtomomill.converter.hdf5.acquisition.pcotomoacquisition.PCOTomoAcquisition#
- class nxtomomill.converter.hdf5.acquisition.pcotomoacquisition.PCOTomoAcquisition(root_url, configuration, detector_sel_callback, start_index)[source]#
Bases:
StandardAcquisitionA PCOTomo acquisition is an acquisition that can look like that at bliss side:
scan “descritpion”, title can be tomo:pcotomo 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()get_already_defined_params(key)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.
get_nb_loop(url)- rtype:
int | None
get_nb_tomo(url)- rtype:
int | None
get_nb_turns(url)- rtype:
int | None
get_pcotomo_version(url)return the pcotomo version according to the provider version (aka bliss)
get_translation_z_frm(root_node, n_frame, ...)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:
DataUrl | None
read_entry()register_step(url[, entry_type, copy_frames])- type url:
DataUrl
to_NXtomos(request_input, input_callback[, ...])- rtype:
tuple
to_NXtomos_pcotomo_v1(request_input, ...[, ...])The first version of 'to_NXtomos' for the first way of storing pcotomo information.
to_NXtomos_pcotomo_v2(request_input, ...[, ...])The second version of 'to_NXtomos' for the second way of storing pcotomo information.
write_as_nxtomo(shift_entry, ...[, ...])This function will dump the acquisition to disk as an NXtomo
Attributes
configurationdata_typedim_1dim_2expo_timeimage_key_controlReturn the dict of all know machine electric current.
n_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_zx_flippedy_flipped- 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_pcotomo_version(url)[source]#
return the pcotomo 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_electric_current: dict | None#
Return the dict of all know machine electric current. Key is the time stamp, value is the electric current
- Return type:
dict | None
- 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 (AcquisitionStep | None) – type of the entry if know. Overwise will be ‘evaluated’
- Return type:
None
- property sample_x#
Return the ‘_sample_x’ attribute.
- property sample_y#
Return the ‘_sample_y’ attribute.
- to_NXtomos_pcotomo_v1(request_input, input_callback, check_tomo_n=True)[source]#
The first version of ‘to_NXtomos’ for the first way of storing pcotomo 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_pcotomo_v2(request_input, input_callback, check_tomo_n=True)[source]#
The second version of ‘to_NXtomos’ for the second way of storing pcotomo 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