Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make mda_folder.selectionField a class #111

Open
rodolakis opened this issue Apr 4, 2024 · 0 comments
Open

Make mda_folder.selectionField a class #111

rodolakis opened this issue Apr 4, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@rodolakis
Copy link
Collaborator

    def selectionField(self):
        """
        Retrieves the current field selection for plotting.
        - Returns a dictionary with selected positioner and detectors indices.
        - Format: {'X': positioner_index, 'Y': [detector_indices]}.
        - Returns None if no selection is made.
        """
        return self._selection_field

    def setSelectionField(self, new_selection=None):
        """
        Updates the current field selection for plotting.
        - Accepts a dictionary specifying new selection of positioner and detectors.
        - Resets to None if given an empty dictionary.
        - Format for new_selection: {'X': positioner_index, 'Y': [detector_indices]}.
        """
        # TODO - how to enfore selectionField structure? Turn it into a class!
        # what if new_selectionvdoes not have X or Y key, or any of those key return
        # a None value? or is {}?
        self._selection_field = new_selection if new_selection != {} else None
@rodolakis rodolakis added the enhancement New feature or request label Apr 4, 2024
@rodolakis rodolakis added this to the v1.0 milestone Apr 4, 2024
@rodolakis rodolakis self-assigned this Apr 4, 2024
@rodolakis rodolakis modified the milestones: v1.0, v1.1, v2.0 Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Upgrades
Development

No branches or pull requests

1 participant