Enable a yaml template to reuse in several config files#86
Enable a yaml template to reuse in several config files#86arunkannawadi wants to merge 17 commits intomainfrom
Conversation
|
there are a lot of paths that we probably want to change in here configs |
…tes, and updated the tds.yaml and was.yaml as example use cases
…om tds.yaml and was.yaml
55e93f9 to
487c6be
Compare
Cargo-cult some structure from imSim for familiarity and reference.
b7d0ebe to
05ff3a3
Compare
roman_imsim/utils.py
Outdated
| """ | ||
| config = galsim.config.ReadConfig(config_file)[0] | ||
| # if a yaml template is used, update the config accordingly; otherwise, do nothing | ||
| galsim.config.ProcessTemplate(config, base=config) |
There was a problem hiding this comment.
We probably want to use ProcessAllTemplates here.
The default is to point to the paths on DCC. Users running it elsewhere will have to point to the appropriate directories.
|
I have followed the structure adopted in LSSTDESC/imSim to register a template, and find absolute paths more robustly so these can be run from anywhere. @aguinot - for your PR, you just need to update the noise in the template. |
|
End-to-end testing logs: https://github.com/DukeCosmology/roman_imsim/actions/runs/22410753779/job/64883268287 |
|
Hey, |
|
The |
|
Sorry for the basic questions:
|
|
I should change the name of the default.yaml. it is incomplete intentionally and is not runnable. You can see how it is used in was.yaml and even in hack.yaml to see how to use a registered template. |
|
In the https://github.com/DukeCosmology/roman_imsim_testdata/blob/config_template/hack.yaml |
| # These are all by default turned on, but you can turn any of them off if desired: | ||
| ignore_noise: True | ||
| stray_light: False | ||
| thermal_background: False | ||
| reciprocity_failure: False | ||
| dark_current: False | ||
| nonlinearity: False | ||
| ipc: False | ||
| read_noise: False | ||
| sky_subtract: False |
There was a problem hiding this comment.
| sky_subtract: False | |
| # noise: | |
| # # These are all by default turned on, but you can turn any of them off if desired: | |
| # type: RomanNoise | |
| # mjd: { type: ObSeqData, field: mjd } | |
| # stray_light: True | |
| # thermal_background: True | |
| # reciprocity_failure: True | |
| # dark_current: True | |
| # nonlinearity: True | |
| # ipc: True | |
| # read_noise: True | |
| # sky_subtract: True | |
| noise: | |
| type: NoNoise |
Update to the new NoiseBuilder
There was a problem hiding this comment.
Hmm, I am not sure my suggestion will replace all lines 🤔
There was a problem hiding this comment.
I am confused what's happening here. I thought the suggestion from earlier was to remove all of the comments?
There was a problem hiding this comment.
Well if you remove the commented stuff you don't see how to specify the noise. If you set the RomanNoise with all other keywords to False you still get background noise. If you want no noise you either have to not set any noise at all or use the explicit NoNoise builder
|
I think you will probably need to rebase before merging. |
|
Waiting on CI to be fixed and rebase on |
|
the CI is in a working state now -- I think we can take a look at this again once rebased. Because there isn't a branch of the same name on |
No description provided.