LSSTDESC / imSim

GalSim based Rubin Observatory image simulation package
https://lsstdesc.org/imSim
BSD 3-Clause "New" or "Revised" License
36 stars 15 forks source link

Consider a consistent use of units throughout the program. #48

Open cwwalter opened 7 years ago

cwwalter commented 7 years ago

@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.

dkirkby commented 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).

cwwalter commented 7 years ago

Semi related: How are all defaults recorded? Externally in documentation but hardcoded? Or also though this mechanism?

dkirkby commented 7 years ago

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.

cwwalter commented 3 days ago

@jmeyers314 is working on adding Astropy unit support to the GalSim config layer.

https://github.com/GalSim-developers/GalSim/pull/1311