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

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

Open
cwwalter opened this issue Jan 13, 2017 · 4 comments
Open

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

cwwalter opened this issue Jan 13, 2017 · 4 comments

Comments

@cwwalter
Copy link
Member

@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
Copy link
Member

dkirkby commented Jan 13, 2017

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
Copy link
Member Author

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

@dkirkby
Copy link
Member

dkirkby commented Jan 15, 2017

These are the defaults. You can modify them three ways:

  • Copy and edit the yaml file.
  • Use an API to modify config data in memory after reading the yaml file.
  • Modify attributes of the simulation objects created after the config phase.

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
Copy link
Member Author

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

GalSim-developers/GalSim#1311

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants