Add management of `angle_offset` and `angle_range` for pcotomo
context
Allow users to provide parameters in order to define a start_angle_offset
and a angle_interval
to create NXtomo split from pcotomo.
If provided It will apply a subselection once the NXtomo will be created.
note: this will simply upgrade the image_control_key
to INVALID
TODO:
-
add NXtomo utils functions to do selections according to -
start_angle
andstop_angle
(see below API first point) -
start_angle_offset and
angle_interval` (see below API second point) -
add unit tests -
add documentation
-
-
add parameter in the HDF5Configuration file -
apply sub-selection when requested from PCOTomoAcquisition
-
add unit tests
-
-
update documentation -
test on a "real dataset"
more
fix #91 (closed)
API
NXtomo python API.
sub_select_selection_from_angle_range
first point: add function used to do a sub selection in a NXtomo according to rotation angle.
Only projections will be affected. If this needs to evolve then we could provide a frame_type
parameter (as a tuple) to know on which frame we should apply this selection.
To simplify (a lot) this will only affect the image_key
of the NXtomo. So the detector data will stay unmodified. This is not very intuitive but way simpler.
@staticmethod
def sub_select_selection_from_angle_range(
nx_tomo, start_angle: float, stop_angle: float, copy=True
):
"""
create a NXtomo like `nx_tomo` input but update `image_key_control` to INVALID for
all projections which does not fulfill the condition: start_angle < rotation_angle < stop_angle
Note: Darks and flat will not be affected by this sub selection
:param float start_angle_offset: offset to apply to start the selection. Expected in degree. Must be signed.
**The offset is always relative to the first projection angle value**
:param float angle_interval: interval covered by the selection
:param bool shift_angles: should we shift the angles of `-start_angle_offset` (once the selection is done)
:param bool copy: if True then copy the nx_tomo
"""
sub_select_from_angle_offset
second point: add This is the function required for #91 (closed) This is applying sub_select_selection_from_angle_range with some pre processing (determine start_angle and stop_angle) and it is also able to shift (projection) angles
@staticmethod
def sub_select_from_angle_offset(
nx_tomo, start_angle_offset: float, angle_interval: float, shift_angles: bool
):