-
Notifications
You must be signed in to change notification settings - Fork 107
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
Add initial_image input type #1237
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just a have few points around my own curiosity; nothing for you to address in code.
tests/config_input/sn.yaml
Outdated
|
||
|
||
modules: | ||
- numpy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed for the np.exp(-time/50)
bit down below? I know import numpy as np
is canonical, but I'm a little surprised np.exp
works instead of numpy.exp
given this line. Just curious how this works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. I'm not sure why this is here. I think it must be a relic from something that since changed. I removed it.
But to answer your question about np.exp, we automatically import numpy, both as numpy and as np, so those are always available without anything special on the part of the user.
pixel_scale: 0.2 | ||
# No noise, which is unrealistic, but makes the test easier. | ||
|
||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. This is kind of a different way of doing templates where everything is self-contained in one file. The first document is the base for everything else. Then each other document starts with that as a template and adds modifications. It's described in some detail in demo6.yaml. Then also used by demos 8, 9, 12.
This PR adds the ability for the config processing to read in an initial image from a file and draw additional things onto that. The implementation is pretty simple:
My test for this is to simulate a supernova time series. It draws a single reference image, and then draws a point source with variable flux 12 times. The SN appears between the 3rd and 4th image. And then it decays exponentially.