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

Add slider values & fix overflow errors #23

Merged
merged 5 commits into from
Mar 19, 2024

Conversation

LorenzLamm
Copy link
Contributor

@LorenzLamm LorenzLamm commented Mar 18, 2024

This PR adds values of the current depth of the slider to the interface (see attached screenshot). This was requested from people in our lab -- it is important to know how "far away" from the membrane the current projection actually is.

slider_values

I also encountered several overflow issues, as also mentioned here: #22

This was due to the tomogram consisting of signed integer values and then substracting the minimum value during normalization (see highlighted code). I converted tomograms to float when loading them to fix this.

normalized_values = (point_values - point_values.min()) / (
point_values.max() - point_values.min()
point_values.max() - point_values.min() + np.finfo(float).eps
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line was causing problems with the integer overflow. After converting tomograms to float, it should not be the case anymore.

Copy link
Member

@kephale kephale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kephale kephale merged commit 0bb11a3 into cellcanvas:main Mar 19, 2024
10 checks passed
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 this pull request may close these issues.

2 participants