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

adding phase dependence to prop. effects #359

Merged
merged 8 commits into from
Apr 25, 2023

Conversation

jpierel14
Copy link
Contributor

@benjaminrose PR to add phase dependence to propagation effects. I don't think this should cause any issues (I've tested phase-dependent, wavelength-dependent, and phase+wavelength-dependent effects), but happy to discuss.

@benjaminrose benjaminrose added this to the v2.10 milestone Mar 27, 2023
@benjaminrose
Copy link
Member

It looks like there are some errors in the testing. I know some are on SNCosmo's side but @jpierel14 does the p39 tests pass locally?

@benjaminrose
Copy link
Member

Justin and I talked a bit offline. We noted that making phase be the first parameter (though logical if we were just starting) breaks backwards compatibility (see failing tests). Likely it is best to make phase an optional argument rather than a required positional argument.

@benjaminrose
Copy link
Member

benjaminrose commented Apr 10, 2023

@jpierel14 do you know why propagate is defined so many times?

To get this merged, I think we should

  • add a test
  • shift phase to an optional parameter to keep backwards compatibility (def propagate(self, wave, flux, phase=None):)
  • also see if there is a need to refactor how propagate is defined. We might fix that here, or it might be its own issue.

@benjaminrose
Copy link
Member

The code style error is an easy fix, and I will do that. Let me also review the changes to look for maintainability problems. Other than that, it looks like we are on the right path to adding this new feature.

sncosmo/models.py Outdated Show resolved Hide resolved
@jpierel14
Copy link
Contributor Author

@benjaminrose Okay new try

@jpierel14
Copy link
Contributor Author

Look at all those check marks

@benjaminrose
Copy link
Member

I have a few documentation additions. I was going to do them myself, but I con't have push access to your repo. I'll just push them to main after I merge this in.

@jpierel14
Copy link
Contributor Author

Sounds good, thanks a lot!

@benjaminrose benjaminrose merged commit 9a61b64 into sncosmo:master Apr 25, 2023
11 checks passed
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.

None yet

2 participants