-
Notifications
You must be signed in to change notification settings - Fork 21
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
RCAL-950: CRDS Keywords & Misc #423
Merged
PaulHuwe
merged 7 commits into
spacetelescope:main
from
PaulHuwe:RCAL-950_CRDSKeywordsMisc
Nov 13, 2024
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
84089cd
Initial commit.
PaulHuwe 5b27ecd
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 2a54930
Merge branch 'main' of https://github.com/spacetelescope/roman_datamo…
PaulHuwe fae0ba2
Merge branch 'main' into RCAL-950_CRDSKeywordsMisc
PaulHuwe 62fe9f8
Added change log.
PaulHuwe b530c7b
Merge branch 'RCAL-950_CRDSKeywordsMisc' of https://github.com/PaulHu…
PaulHuwe 40c20e6
Fixed RAD pointing.
PaulHuwe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Corrected CRDS keywords. | ||
Updated for Build 17 release of the RAD software package. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -234,7 +234,7 @@ def mk_distortion(*, filepath=None, **kwargs): | |
return save_node(distortionref, filepath=filepath) | ||
|
||
|
||
def mk_epsf(*, shape=(3, 9, 361, 361), filepath=None, **kwargs): | ||
def mk_epsf(*, shape=(3, 6, 9, 361, 361), filepath=None, **kwargs): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we should set a global var with the default shape to prevent repetition? |
||
""" | ||
Create a dummy ePSF instance (or file) with arrays and valid values | ||
for attributes required by the schema. | ||
|
@@ -252,15 +252,15 @@ def mk_epsf(*, shape=(3, 9, 361, 361), filepath=None, **kwargs): | |
------- | ||
roman_datamodels.stnode.EpsfRef | ||
""" | ||
if len(shape) != 4: | ||
shape = (3, 9, 361, 361) | ||
warnings.warn("Input shape must be 4D. Defaulting to (3, 9, 361, 361)") | ||
if len(shape) != 5: | ||
shape = (3, 6, 9, 361, 361) | ||
warnings.warn("Input shape must be 5D. Defaulting to (3, 6, 9, 361, 361)") | ||
|
||
epsfref = stnode.EpsfRef() | ||
epsfref["meta"] = mk_ref_epsf_meta(**kwargs.get("meta", {})) | ||
|
||
epsfref["psf"] = kwargs.get("psf", np.zeros(shape, dtype=np.float32)) | ||
epsfref["extended_psf"] = kwargs.get("extended_psf", np.zeros(shape[2:], dtype=np.float32)) | ||
epsfref["extended_psf"] = kwargs.get("extended_psf", np.zeros(shape[-2:], dtype=np.float32)) | ||
|
||
return save_node(epsfref, filepath=filepath) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Just out of curiosity, is there a way to fetchversion
andcontext
from CRDS so that we don't have to hardcode it here?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 just found out about
stpipe.crds_client
'sget_svn_version()
andget_context_used()
. Is there a reason for not using them?