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

STIPS should handle configuration in a centralized way #149

Open
york-stsci opened this issue Oct 5, 2021 · 0 comments
Open

STIPS should handle configuration in a centralized way #149

york-stsci opened this issue Oct 5, 2021 · 0 comments

Comments

@york-stsci
Copy link
Collaborator

At the moment, it is possible to configure STIPS operation in one of two ways:

  • Create or copy a stips_config.yaml file, set the values you want, and point STIPS to the file
  • When creating a SceneModule, an ObservationModule, an AstroImage (etc.), provide keyword arguments named after the
    configuration parameters.

In terms of configuration, STIPS operates according to the following priority:

  • keywords supplied when creating a class
  • stips_config.yaml file in the directory in which STIPS is being run
  • stips_config.yaml file pointed to by the environment variable "stips_config"
  • stips_config.yaml file in the stips_data directory
  • stips_config.yaml file kept inside STIPS in stips.data

I don't think there's anything wrong with either these ways of specifying configurations, or with this order of priorities, but in developing STIPS v2 I've consistently run into problems with (e.g.) a configuration parameter set in creating an ObservationModule that doesn't propagate to the detector(s) created by that module. As such, it would probably be overall easier and more consistent if STIPS did something like Pandeia, and actually had a "configuration" module/class that set its values based on the above methods, and that could be passed to, and referenced by, sub-parts of STIPS as they're created. This would also, potentially, allow for configuration values to be better transmitted to (e.g.) parallel creation processes run within an AstroImage, and allow for individual functions (e.g. add_catalogue, add_error, etc.) to include changed parameters that would apply to these specific functions.

This is probably a big enough change to be a point release rather than a patch release.

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

1 participant