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

Non-negative fluorescence output? #163

Open
ziw-liu opened this issue Mar 27, 2024 · 2 comments
Open

Non-negative fluorescence output? #163

ziw-liu opened this issue Mar 27, 2024 · 2 comments

Comments

@ziw-liu
Copy link
Contributor

ziw-liu commented Mar 27, 2024

Currently waveorder can output negative fluorescence intensity. This leads to inconveniences in visualization (auto-contrast will boost background noise) and downstream numeric processing. I can think of 2 ways to guarantee a non-negative output:

  1. Clip by 0.
  2. Shift the histogram to the right.

There could be a flag passed to 'apply inverse' to enable this behavior.

@talonchandler
Copy link
Collaborator

I think it sense to have clipping as a default-off option clip=False. My rough experience is that downstream consumers (people and algorithms) often expect smooth reconstructions on the scale of a few pixels, and clipping like this creates sharp edges that can create problems downstream.

Shifting the histogram avoids the sharp edges, but I think it will lead to different kinds of confusion---should the maximum value shift based on distant regions in the image?

@mattersoflight
Copy link
Member

@talonchandler @ziw-liu I agree that clipping should be avoided to avoid texture or high-spatial frequency artifacts. I would add a constant offset, just like we adjust the black level for a camera. It can be a parameter to apply inverse and we can default it to a small value that avoids negative output in most cases.

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

No branches or pull requests

3 participants