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

Property ext_depth_of_field_plane_distance in Dataset accesses the wrong value #182

Open
ChristianMarzahl opened this issue Nov 29, 2024 · 0 comments · May be fixed by #183
Open

Property ext_depth_of_field_plane_distance in Dataset accesses the wrong value #182

ChristianMarzahl opened this issue Nov 29, 2024 · 0 comments · May be fixed by #183

Comments

@ChristianMarzahl
Copy link

Moin,

first of all thanks for you great work.

The property ext_depth_of_field_plane_distance returns the 0 indexes which is always True, but it should return index 2 which is the distance value of type float.

Issue:
def ext_depth_of_field_plane_distance(self) -> Optional[float]:

    @property
    def ext_depth_of_field_plane_distance(self) -> Optional[float]:
        """Return total focal depth used for extended depth of field."""
        return self._ext_depth_of_field[0]

Fixed:

    @property
    def ext_depth_of_field_plane_distance(self) -> Optional[float]:
        """Return total focal depth used for extended depth of field."""
        return self._ext_depth_of_field[2]

Source:
def _ext_depth_of_field(self) -> Tuple[bool, Optional[int], Optional[float]]:

    @cached_property
    def _ext_depth_of_field(self) -> Tuple[bool, Optional[int], Optional[float]]:
        """Return extended depth of field (enabled, number of focal planes,
        distance between focal planes) from dataset.

        Returns
        -------
        Tuple[bool, Optional[int], Optional[float]]
            If extended depth of field is used, and if used number of focal
            planes and distance between focal planes.
        """

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant