Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • nxtomomill nxtomomill
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 32
    • Issues 32
    • List
    • Boards
    • Service Desk
    • Milestones
  • Jira
    • Jira
  • Merge requests 5
    • Merge requests 5
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • tomotools
  • nxtomomillnxtomomill
  • Merge requests
  • !100

Add management of `angle_offset` and `angle_range` for pcotomo

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged payno requested to merge fix_91 into master Apr 06, 2022
  • Overview 0
  • Commits 12
  • Pipelines 13
  • Changes 11

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 and stop_angle (see below API first point)
    • start_angle_offsetandangle_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.

first point: add sub_select_selection_from_angle_range

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
        """

second point: add sub_select_from_angle_offset

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
    ):
Edited Aug 09, 2022 by payno
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix_91