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

can we generalize speckle _process so that bincount can be used on floats? #65

Open
ambarb opened this issue Mar 31, 2021 · 2 comments
Open
Labels
_commonspeckle part of V2, but strictly related to a common repo (speckle + maybe scattering) discussion V2 required to move towards share XPCS/speckle analysis for CHX/CSX V3 lower priority, could be before V2 or after V2

Comments

@ambarb
Copy link
Collaborator

ambarb commented Mar 31, 2021

See the issue below, as they are related, but this is to address a specific question of
np.histogram versus np.bincount raised in
#52

np.histogram is used for image based data because image normalization process creates floats (this is the case for csxtools get_fccd_images()). Some discussion of the various options would be good. Please add other options if I have missed one. We can consider multiple approaches too, but probably need to prioritize

  1. have 2 _process subfunctions: one for integer data (like Eiger detector) and one for float data
  2. convert floats to integers in a way that we agree.
  3. require input (whether images (aka full np.array) or compressed data) must be integers

@danielballan and others?

@ambarb ambarb added _commonspeckle part of V2, but strictly related to a common repo (speckle + maybe scattering) discussion V2 required to move towards share XPCS/speckle analysis for CHX/CSX V3 lower priority, could be before V2 or after V2 labels Mar 31, 2021
@ambarb
Copy link
Collaborator Author

ambarb commented Apr 1, 2021

we discussed in meeting.

Best coarse of action is to use only np.bincount so we will strive to merge code for image and compressed data. if pixel number type is float; raise exception and report reason (float not int) and thee recommend conversion method.

OPTION 3

@ambarb
Copy link
Collaborator Author

ambarb commented Jun 21, 2021

but leave in the option to run on floats anyway after furhter discussion of complications iwth converting to ccd imaged data to integers if you are in an intermediate regime (like 4 photon events in a single pixel)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
_commonspeckle part of V2, but strictly related to a common repo (speckle + maybe scattering) discussion V2 required to move towards share XPCS/speckle analysis for CHX/CSX V3 lower priority, could be before V2 or after V2
Projects
None yet
Development

No branches or pull requests

2 participants