Skip to content

Update spectra.py#9

Merged
lanery merged 3 commits intomainfrom
rl/generic-reader
Feb 25, 2025
Merged

Update spectra.py#9
lanery merged 3 commits intomainfrom
rl/generic-reader

Conversation

@lanery
Copy link
Copy Markdown
Collaborator

@lanery lanery commented Feb 24, 2025

This PR adds a class method for a "generic" reader that assumes the convention that many vendors abide by in which the first column of a CSV file is the wavenumber data and the second column is the intensity data.

The motivation for this is more or less because it's cumbersome to keep adding custom readers for spectrometers when the vast majority of them are structured very similarly and could easily be read with pandas.read_csv(filename, **kwargs).

- add a class method for a "generic" reader that assumes the convention that many vendors abide by in which the first column of a csv file is the wavenumber data and the second column is the intensity data
@lanery lanery requested a review from ekiefl February 24, 2025 22:47
Copy link
Copy Markdown
Contributor

@ekiefl ekiefl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems sensible. Can you populate the docstring with what you essentially wrote in the PR description?

@lanery
Copy link
Copy Markdown
Collaborator Author

lanery commented Feb 25, 2025

This too seems sensible.

- add docstring
- actually use the wavenumber and intensity index arguments to choose the appropriate columns
@lanery lanery requested a review from ekiefl February 25, 2025 00:36
@lanery lanery merged commit f515955 into main Feb 25, 2025
4 checks passed
@lanery lanery deleted the rl/generic-reader branch February 25, 2025 00:53
lanery added a commit that referenced this pull request Jul 9, 2025
patch Dependabot alerts
- #9
- #10
- #11
- #13
- #14
@lanery lanery mentioned this pull request Jul 9, 2025
2 tasks
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

Successfully merging this pull request may close these issues.

2 participants