Open cwwalter opened 7 years ago
Here is an example from this YAML simulation config file, for reference:
dark_current: 3.0 electron/(hour pixel**2)
Another astropy technology that is useful to leverage for flexible configuration is astropy.table
, which allows you to accept tabular config data in any format they support (FITS, HDF5, various ASCII formats).
Semi related: How are all defaults recorded? Externally in documentation but hardcoded? Or also though this mechanism?
These are the defaults. You can modify them three ways:
Only a restricted subset of config parameters can be changed via the last method, in order to simplify the object initialization logic and prevent expensive re-initialization operations.
@jmeyers314 is working on adding Astropy unit support to the GalSim config layer.
@dkirkby showed me examples from DESI where units are specified for everything including in the configuration files.
It looked very useful/powerful. We could consider this too. Doing it early would be better as it would get harder and harder to do as more gets added to the program. David may point to examples.