Skip to content

Commit

Permalink
addressing changes in PR
Browse files Browse the repository at this point in the history
  • Loading branch information
penaguerrero committed Nov 26, 2024
1 parent 636b2f3 commit b7e50f9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
6 changes: 3 additions & 3 deletions src/stdatamodels/jwst/datamodels/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from .barshadow import BarshadowModel
from .combinedspec import CombinedSpecModel
from .contrast import ContrastModel
from .conv_kernel import ConvKernelModel
from .cube import CubeModel
from .dark import DarkModel
from .darkMIRI import DarkMIRIModel
Expand Down Expand Up @@ -65,6 +64,7 @@
from .rscd import RSCDModel
from .saturation import SaturationModel
from .segmap import SegmentationMapModel
from .sirs_kernel import SIRSKernelModel
from .slit import SlitModel, SlitDataModel
from .pastasossmodel import PastasossModel
from .sossextractmodel import SossExtractModel
Expand Down Expand Up @@ -103,7 +103,7 @@
'NrsMosApcorrModel', 'NrsFsApcorrModel', 'NrsIfuApcorrModel',
'AsnModel',
'BarshadowModel', 'CameraModel', 'CollimatorModel',
'CombinedSpecModel', 'ContrastModel', 'ConvKernelModel','CubeModel',
'CombinedSpecModel', 'ContrastModel', 'CubeModel',
'DarkModel', 'DarkMIRIModel',
'DisperserModel', 'DistortionModel', 'DistortionMRSModel',
'EmiModel',
Expand Down Expand Up @@ -141,7 +141,7 @@
'ReferenceFileModel', 'ReferenceCubeModel', 'ReferenceImageModel', 'ReferenceQuadModel',
'RegionsModel', 'ResetModel',
'ResolutionModel', 'MiriResolutionModel',
'RSCDModel', 'SaturationModel', 'SlitDataModel', 'SlitModel', 'SpecModel',
'RSCDModel', 'SaturationModel', 'SIRSKernelModel', 'SlitDataModel', 'SlitModel', 'SpecModel',
'SegmentationMapModel',
'SossExtractModel',
'SossWaveGridModel',
Expand Down
4 changes: 2 additions & 2 deletions src/stdatamodels/jwst/datamodels/schemas/core.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1795,9 +1795,9 @@ properties:
type: object
properties:
name:
title: NIR Optimized Convolution Kernel reference file name
title: NIR Simple Improved Reference Subtraction
type: string
fits_keyword: R_CONVKL
fits_keyword: R_SIRSKL
blend_table: True
cubepar:
title: IFU cube reference file information
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/asdf/asdf-schema-1.0.0"
id: "http://stsci.edu/schemas/jwst_datamodel/conv_kernel.schema"
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|guider1|guider2)$":
"^(nrca1|nrca2|nrca3|nrca4|nrcalong|nrcb1|nrcb2|nrcb3|nrcb4|nrcblong|nrs1|nrs2|mirimage|mirifulong|mirifushort|nis)$":
type: object
properties:
gamma:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
from .reference import ReferenceFileModel


__all__ = ['ConvKernelModel']
__all__ = ['SIRSKernelModel']


class ConvKernelModel(ReferenceFileModel):
class SIRSKernelModel(ReferenceFileModel):
"""
A data model for the NIR Optimized Convolution Kernel Fourier Coefficients.
A data model for the NIR Optimized Convolution Kernel Fourier Coefficients,
also called Simple Improved Reference Subtraction (SIRS).
Parameters
__________
Expand All @@ -18,14 +19,14 @@ class ConvKernelModel(ReferenceFileModel):
- gamma: float32 1D array
- zeta: float32 1D array
"""
schema_url = "http://stsci.edu/schemas/jwst_datamodel/conv_kernel.schema"
reftype = "conv_kernel"
schema_url = "http://stsci.edu/schemas/jwst_datamodel/sirs_kernel.schema"
reftype = "sirskernel"

def __init__(self, init=None, **kwargs):
super(ConvKernelModel, self).__init__(init=init, **kwargs)
super(SIRSKernelModel, self).__init__(init=init, **kwargs)

def on_save(self, path=None):
self.meta.reftype = self.reftype

Check warning on line 29 in src/stdatamodels/jwst/datamodels/sirs_kernel.py

View check run for this annotation

Codecov / codecov/patch

src/stdatamodels/jwst/datamodels/sirs_kernel.py#L29

Added line #L29 was not covered by tests

def validate(self):
super(ConvKernelModel, self).validate()
super(SIRSKernelModel, self).validate()

Check warning on line 32 in src/stdatamodels/jwst/datamodels/sirs_kernel.py

View check run for this annotation

Codecov / codecov/patch

src/stdatamodels/jwst/datamodels/sirs_kernel.py#L32

Added line #L32 was not covered by tests

0 comments on commit b7e50f9

Please sign in to comment.