-
Notifications
You must be signed in to change notification settings - Fork 13
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
Ultra l1c bin data #829
base: dev
Are you sure you want to change the base?
Ultra l1c bin data #829
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few comments about implementation things and recommendations on functions to look at to see if they might help.
return az, el | ||
|
||
|
||
def bin_space( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might consider checking out the 2d histogram function. I believe it would be ideal for this binning:
https://numpy.org/doc/stable/reference/generated/numpy.histogram2d.html
energy_bin_edges = build_energy_bins() | ||
|
||
# Find the appropriate bin index. | ||
energy_bin_idx = np.searchsorted(energy_bin_edges, energy, side="right") - 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason not to use np.histogram
here? https://numpy.org/doc/stable/reference/generated/numpy.histogram.html#numpy.histogram
|
||
Returns | ||
------- | ||
az_midpoint : np.ndarray |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that I am missing something. Is there a reason that this function doesn't just produce the 2d histogram data?
Returns | ||
------- | ||
energy_start : np.ndarray | ||
Start of energy bin. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question here... When I think of a function that "bins" data, it returns a histogram rather than the bin center location for each input.
Change Summary
Overview
Add spatial and energy binning equations.
Updated Files
Testing