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

vdf_projection() for single timestep always uses shifted energy edges #24

Open
harryclewis opened this issue Dec 6, 2024 · 0 comments

Comments

@harryclewis
Copy link

harryclewis commented Dec 6, 2024

Hi Louis,

Lines 112-115 in vdf_projection.py, within the function _init(), there is a confusing bit of code:

if step_table.data:
    energy_edges = energy1_edges
 else:
    energy_edges = energy1_edges

I think this is looking at whether the interleaved energy bins are shifted (1) or not (0) for the single timestep, and using the correct energy_edges in this case. Additionally, step-table is not an xArray, so the .data is not needed. This causes the code to throw an error.

My suggested amendment:

if step_table:
     energy_edges = energy1_edges
else:
    energy_edges = energy0_edges

I hope this helps. Disregard if I am mistaken.

Harry

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

1 participant