-
Notifications
You must be signed in to change notification settings - Fork 0
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
Make ACA penalty limit optional #384
Conversation
spec, chandra_models_version = get_xija_model_spec( | ||
"aca", version=chandra_models_version | ||
) | ||
spec_txt, info = chandra_models.get_data("chandra_models/xija/aca/aca_spec.json") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd assumed the plan was to update get_xija_model_spec file to use chandra_models.get_data to have a unified approach via that strategy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but that is out of scope for this PR. Also, using the direct interface in ska_helpers
makes more sense here since there is no real use of xija
itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes -- though for me I was bringing it up because starcheck was getting the ACA model version and the limits from proseco here via characteristics.py, but getting the aca model spec with get_xija_model_spec. That leads to a disconnect in that application due to the interface change here (in scope). It probably makes sense for starcheck to either join proseco in using ska_helpers.chandra_models.get_data to get the aca model or to stop using proseco.characteristics as a convenient source of limit reading. Or update get_xija_model_spec to use ska_helpers.chandra_models.get_data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should mention that get_xija_model_spec()
does not work on FOT Windows machines. it returns an error about not being able to read from remote repository when executing the line repo = git.Repo.clone_from(repo_path, repo_path_local)
. I have confirmed that this occurs from the python environment directly, and is not related to the pyexec interface. I think we don't run into this issue now only because MATLAB provides all the necessary inputs, so this code doesn't run when called from MATLAB. Except it did in my testing of removing this parameter (before I started using this PR).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though James I was working under the impression that part of the problem with get_xija_model_spec was that right now the windows environment had a broken git .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That could be the root of the issue. I'm not sure exactly what or how the git is broken in the python environment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We had previously seen what we guessed was a conda bug making a broken git. It was a non-issue because the windows environment wasn't using git for anything but will hope it is fixed upstream or will work around it for the next testing release (if that is coming into play).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the WIP and am marking this approved.
Description
Make the ACA penalty limit from the chandra_models
aca_spec.json
file be optional. This also makes the ACA planning limit optional for proseco, though it is still needed in other tools.If not provided there is no penalty limit and the effective CCD temperature is the same as the actual (predicted) temperature. In this case the
t_ccd_penalty_limit
attribute of an ACA catalog isNone
.This PR also transitions to using
ska_helpers.chandra_models
to get the chandra_models data. This is helpful to enable testing using theCHANDRA_MODELS_REPO_DIR
andCHANDRA_MODELS_DEFAULT_VERSION
env vars.Interface impacts
CHANDRA_MODELS_REPO_DIR
andCHANDRA_MODELS_DEFAULT_VERSION
env vars now work with proseco for selection of the aca thermal model for limits. Those vars already worked to define the acquisition model used within proseco via chandra_aca.Testing
Unit tests
Independent check of unit tests by Jean
Functional tests
chandra_models update
Starting from chandra_models version 3.49, I made a new branch
no-penalty-limit
and editedchandra_models/xija/aca/aca_spec.json
to remove the penalty limit.Simple test