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

Binning using step size #297

Open
balerion opened this issue Nov 21, 2023 · 4 comments
Open

Binning using step size #297

balerion opened this issue Nov 21, 2023 · 4 comments
Labels
duplicate This issue or pull request already exists

Comments

@balerion
Copy link
Collaborator

balerion commented Nov 21, 2023

Is your feature request related to a problem? Please describe.
I would prefer inserting the bin size instead of the bin number when defining the binning

Describe the solution you'd like
Having an option for the bin size instead

Describe alternatives you've considered
wrapper functions would be ok but it makes the code unnecessarily difficult to read in notebooks

@rettigl
Copy link
Member

rettigl commented Nov 21, 2023

We decided for the current functionality because this is the way most scanning programs work I know of. Also, if you provide bin size you potentially cannot fill the whole bin range.
As a workaround, you can provide bins as an array, so using np.arange with the stepsize should give you what you want. Consider that you should provide bin centers.

@steinnymir
Copy link
Member

This workaround is how binning is being performed at flash now, and is not optimal. However, the request is about adding the option of defining your bins prioritizing the step size, which is a reasonable request.

I think when there is a feature request, which does not break previous functionality, it is not our place to judge how good of an idea it is for our experience, but rather we should consider if we can provide this to improve user experience for others too.

@rettigl
Copy link
Member

rettigl commented Nov 22, 2023

I think when there is a feature request, which does not break previous functionality, it is not our place to judge how good of an idea it is for our experience, but rather we should consider if we can provide this to improve user experience for others too.

I don't oppose this idea, I just wanted to explain the decision for the current functionality and point out a workaround. Please feel free to implement this.

@rettigl
Copy link
Member

rettigl commented Nov 22, 2023

Related to #123

@rettigl rettigl added the duplicate This issue or pull request already exists label Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants