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

Passband integration #52

Merged
merged 21 commits into from
Aug 8, 2024
Merged

Passband integration #52

merged 21 commits into from
Aug 8, 2024

Conversation

OliviaLynn
Copy link
Member

Closes #6

Calculates normalized transmission tables along a grid of wavelengths with a 1 Angstrom step. We require users to match this grid with their input (or provide a model such as SplineModel that can generate wavelengths along an arbitrary grid).

When Kostya and I had initially discussed the strategy for this, we said (for now) the user should be in charge of matching the grid or providing such a model.

However, at some point we might want to add the ability to interpolate our normalized transmission tables to match an arbitrary user-generated grid.

@OliviaLynn OliviaLynn marked this pull request as ready for review July 30, 2024 19:11
Copy link
Contributor

@hombit hombit left a comment

Choose a reason for hiding this comment

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

Thank you! Large concern I have is about Passbands class instead of multiple instances of Passband class

src/tdastro/astro_utils/passbands.py Outdated Show resolved Hide resolved
src/tdastro/astro_utils/passbands.py Outdated Show resolved Hide resolved
src/tdastro/astro_utils/passbands.py Show resolved Hide resolved
src/tdastro/astro_utils/passbands.py Outdated Show resolved Hide resolved
src/tdastro/astro_utils/passbands.py Outdated Show resolved Hide resolved
tests/tdastro/astro_utils/test_passbands.py Show resolved Hide resolved
tests/tdastro/astro_utils/test_passbands.py Show resolved Hide resolved
tests/tdastro/astro_utils/test_passbands.py Outdated Show resolved Hide resolved
src/tdastro/astro_utils/passbands.py Show resolved Hide resolved
src/tdastro/astro_utils/passbands.py Show resolved Hide resolved
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

src/tdastro/astro_utils/passbands.py Show resolved Hide resolved
src/tdastro/astro_utils/passbands.py Outdated Show resolved Hide resolved
src/tdastro/astro_utils/passbands.py Outdated Show resolved Hide resolved
src/tdastro/astro_utils/passbands.py Show resolved Hide resolved
src/tdastro/astro_utils/passbands.py Outdated Show resolved Hide resolved
tests/tdastro/astro_utils/test_passbands.py Show resolved Hide resolved
tests/tdastro/astro_utils/test_passbands.py Show resolved Hide resolved
tests/tdastro/astro_utils/test_passbands.py Outdated Show resolved Hide resolved
tests/tdastro/astro_utils/test_passbands.py Outdated Show resolved Hide resolved
src/tdastro/astro_utils/passbands.py Outdated Show resolved Hide resolved
src/tdastro/astro_utils/passbands.py Show resolved Hide resolved
src/tdastro/astro_utils/passbands.py Show resolved Hide resolved
@OliviaLynn OliviaLynn mentioned this pull request Aug 6, 2024
True if the transmission table is successfully loaded, False otherwise.
"""
try:
self.transmission_tables[band_name] = np.loadtxt(file_path)
Copy link
Contributor

Choose a reason for hiding this comment

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

A consideration for a future PR. I think you might be able to simplify the user's workflow a bit if you always normalize the table as soon as it is loaded (instead of having the user manually call calculate_normalized_system_response_tables().

Copy link
Contributor

@mi-dai mi-dai left a comment

Choose a reason for hiding this comment

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

Another thought about interface for future - I think we would like to have something like

passbands = Passbands()
sourcemodel.bandflux(passbands,times)

instead of calling the method from passbands.

@OliviaLynn OliviaLynn merged commit 6b3eee6 into main Aug 8, 2024
4 checks passed
@OliviaLynn OliviaLynn deleted the issue/6/bandpass branch August 8, 2024 15:30
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.

Bandbass Integration
4 participants