-
Notifications
You must be signed in to change notification settings - Fork 26
JP-3622 Update refpix step for NIR detectors to use convolution kernel #321
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
Merged
tapastro
merged 21 commits into
spacetelescope:main
from
penaguerrero:conv_kernel_model
Dec 20, 2024
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
d8593c1
initial changes for convolution kernel at refpix
penaguerrero 6fc2b3d
Merge branch 'main' into conv_kernel_model
penaguerrero 1eed540
adding convolution kernel model to init
penaguerrero f3f0dfc
Merge branch 'main' into conv_kernel_model
penaguerrero f7765d0
Merge branch 'main' into conv_kernel_model
penaguerrero d1c67da
Merge branch 'main' into conv_kernel_model
penaguerrero de8c3e7
Merge branch 'main' into conv_kernel_model
penaguerrero d1fc7b0
Merge branch 'main' into conv_kernel_model
penaguerrero 63462e2
Merge branch 'main' into conv_kernel_model
penaguerrero 1d3f3fe
adding pr number and changes
penaguerrero 236415a
Merge branch 'main' into conv_kernel_model
penaguerrero f66a0e4
Merge branch 'main' into conv_kernel_model
penaguerrero f917469
Merge branch 'main' into conv_kernel_model
penaguerrero 96a1de8
Merge branch 'main' into conv_kernel_model
penaguerrero 752344c
Update src/stdatamodels/jwst/datamodels/schemas/conv_kernel.schema.yaml
penaguerrero 49c67bb
Update src/stdatamodels/jwst/datamodels/schemas/conv_kernel.schema.yaml
penaguerrero 4ab95e5
Merge branch 'main' into conv_kernel_model
penaguerrero 636b2f3
Update src/stdatamodels/jwst/datamodels/schemas/core.schema.yaml
braingram b7e50f9
addressing changes in PR
penaguerrero 35f2ecf
Merge branch 'main' into conv_kernel_model
penaguerrero 788f7bd
Merge branch 'main' into conv_kernel_model
penaguerrero 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 hidden or 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 @@ | ||
Adding datamodel schema for jwst refpix convolution kernel. | ||
This file contains hidden or 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 hidden or 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
16 changes: 16 additions & 0 deletions
16
src/stdatamodels/jwst/datamodels/schemas/sirs_kernel.schema.yaml
This file contains hidden or 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,16 @@ | ||
%YAML 1.1 | ||
--- | ||
$schema: "http://stsci.edu/schemas/asdf/asdf-schema-1.0.0" | ||
id: "http://stsci.edu/schemas/jwst_datamodel/sirs_kernel.schema" | ||
allOf: | ||
- $ref: referencefile.schema | ||
- type: object | ||
patternProperties: | ||
"^(nrca1|nrca2|nrca3|nrca4|nrcalong|nrcb1|nrcb2|nrcb3|nrcb4|nrcblong|nrs1|nrs2|mirimage|mirifulong|mirifushort|nis)$": | ||
type: object | ||
properties: | ||
gamma: | ||
datatype: float64 | ||
zeta: | ||
datatype: float64 | ||
required: [gamma, zeta] |
This file contains hidden or 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,32 @@ | ||
from .reference import ReferenceFileModel | ||
|
||
|
||
__all__ = ['SIRSKernelModel'] | ||
|
||
|
||
class SIRSKernelModel(ReferenceFileModel): | ||
""" | ||
A data model for the NIR Optimized Convolution Kernel Fourier Coefficients, | ||
also called Simple Improved Reference Subtraction (SIRS). | ||
|
||
Parameters | ||
__________ | ||
data : numpy table | ||
The reference waves to correct for 1/f at the REFPIX step for NIR data. | ||
A table-like object containing the Fourier Coefficients for the | ||
optimized convolution kernel. The format is the same for all NIR files | ||
- Detector name: str | ||
- gamma: float32 1D array | ||
- zeta: float32 1D array | ||
""" | ||
schema_url = "http://stsci.edu/schemas/jwst_datamodel/sirs_kernel.schema" | ||
reftype = "sirskernel" | ||
|
||
def __init__(self, init=None, **kwargs): | ||
super(SIRSKernelModel, self).__init__(init=init, **kwargs) | ||
|
||
def on_save(self, path=None): | ||
self.meta.reftype = self.reftype | ||
|
||
def validate(self): | ||
super(SIRSKernelModel, self).validate() | ||
Oops, something went wrong.
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.
Probably worth explicitly specifying it as the SIRSKernelModel here as well.