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

Fix get_channel_energy_values for SOHO/EPHIN electrons #49

Closed
jgieseler opened this issue Nov 15, 2023 · 2 comments
Closed

Fix get_channel_energy_values for SOHO/EPHIN electrons #49

jgieseler opened this issue Nov 15, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@jgieseler
Copy link
Member

jgieseler commented Nov 15, 2023

get_channel_energy_values() is causing problems for SOHO/EPHIN electrons, before and after the change in data product on Oct 4, 2017. The return array has a length of 4 or 5, depending on time. But actually it should be be 3 or 4. The problems lie in

SEPpy/seppy/tools/__init__.py

Lines 2270 to 2274 in 2ff9cb8

if self.sensor.lower() == "ephin":
# Choose only the 4 first channels / descriptions, since I only know of
# E150, E300, E1300 and E3000. The rest are unknown to me.
# Go up to index 5, because index 1 is 'deactivated bc. of failure mode D'
energy_ranges = [val for val in self.current_energies.values()][:5]

and

SEPpy/seppy/tools/__init__.py

Lines 2335 to 2339 in 2ff9cb8

# Sometimes there is no hyphen, but then it's not a range of energies
try:
lower_bound, temp = energy_str.split('-')
except ValueError:
continue

First, it's truncated wrongly. Second, after the change of the data product, one channel info changed to 'deactivated bc. of failure mode D', which cause that channel to be skipped in the second code example above.

@jgieseler jgieseler added the bug Something isn't working label Nov 15, 2023
@jgieseler
Copy link
Member Author

Has this been fixed with jgieseler@5d9eb6b?

@Christian-Palmroos
Copy link
Contributor

The pull request 52 (#52) should address this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants