NSLS2 / NSLS2/pyCHX

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

Open
#65 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

_commonspeckle discussion V2 V3
Dominant language
Jupyter Notebook
Stars
8
Forks
12
Avg merge
2h 53m
Merged PRs (30d)
6

Description

See the issue below, as they are related, but this is to address a specific question of
np.histogram versus np.bincount raised in
https://github.com/NSLS-II/pyCHX/issues/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?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading linked issue #52 and locating the _process subfunctions that use np.histogram or np.bincount. Compare the three proposed approaches for integer and float image data, then confirm the chosen behavior and scope with maintainers. Done means the agreed approach is implemented and its behavior for image and compressed data is covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.