Skip to content

Navigation Menu

Sign in
Sign up

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

Open

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      AltStyle によって変換されたページ (->オリジナル) /