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

Whitespace is not always stripped in Spectral Library table #5

Closed
teutoburg opened this issue Sep 19, 2023 · 1 comment · Fixed by #8
Closed

Whitespace is not always stripped in Spectral Library table #5

teutoburg opened this issue Sep 19, 2023 · 1 comment · Fixed by #8

Comments

@teutoburg
Copy link
Contributor

Some spectral types are not found in the name column because trailing whitespaces are not stripped upon loading the table.

import pyckles
pickles = pyckles.SpectralLibrary("pickles", return_style="synphot")
"M25V" in pickles.table["name"]  # returns False
"M25V   " in pickles.table["name"]  # returns True

This leads to an AttributeError when trying to access via pickles["M25V"]. This issue not only exists for "M25V", but also for a number of classes ending in "_R" and "_W".

@hugobuddel
Copy link
Contributor

Linking to workaround that needs to be fixed once this bug is fixed: AstarVienna/ScopeSim_Templates@6cb4a2a

@teutoburg teutoburg moved this from 🆕 New to 📋 Backlog in ScopeSim-development Oct 30, 2023
@teutoburg teutoburg linked a pull request Aug 9, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in ScopeSim-development Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants