Skip to content

Commit

Permalink
add schema and model for nrm reference file (#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram authored Feb 28, 2024
1 parent e91f81f commit cdb4163
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Bug Fixes
Changes to API
--------------

-
- Add ``NRMModel`` for new NIRISS NRM reference file [#253]

Other
-----
Expand Down
2 changes: 2 additions & 0 deletions src/stdatamodels/jwst/datamodels/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
from .multislit import MultiSlitModel
from .multispec import MultiSpecModel
from .nirspec_flat import NirspecFlatModel, NirspecQuadFlatModel
from .nrm import NRMModel
from .outlierpars import OutlierParsModel
from .outlierifuoutput import OutlierIFUOutputModel
from .pathloss import PathlossModel, MirLrsPathlossModel
Expand Down Expand Up @@ -98,6 +99,7 @@
'AmiLgModel',
'AmiLgFitModel',
'AmiOIModel',
'NRMModel',
'FgsImgApcorrModel', 'MirImgApcorrModel', 'NrcImgApcorrModel', 'NisImgApcorrModel',
'MirLrsApcorrModel', 'MirMrsApcorrModel', 'NrcWfssApcorrModel', 'NisWfssApcorrModel',
'NrsMosApcorrModel', 'NrsFsApcorrModel', 'NrsIfuApcorrModel',
Expand Down
16 changes: 16 additions & 0 deletions src/stdatamodels/jwst/datamodels/nrm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from .reference import ReferenceFileModel


__all__ = ['NRMModel']


class NRMModel(ReferenceFileModel):
"""
A data model for Non-Redundant Mask.
Parameters
__________
nrm : numpy float32 array
Non-Redundant Mask
"""
schema_url = "http://stsci.edu/schemas/jwst_datamodel/nrm.schema"
9 changes: 9 additions & 0 deletions src/stdatamodels/jwst/datamodels/schemas/core.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2028,6 +2028,15 @@ properties:
type: string
fits_keyword: R_MRSPT
blend_table: True
nrm:
title: Non-Redundant mask reference file information
type: object
properties:
name:
title: Non-Redundant mask reference file name
type: string
fits_keyword: R_NRM
blend_table: True
ote:
title: Nirspec OTE Model reference file information
type: object
Expand Down
15 changes: 15 additions & 0 deletions src/stdatamodels/jwst/datamodels/schemas/nrm.schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/fits-schema/fits-schema"
id: "http://stsci.edu/schemas/jwst_datamodel/nrm.schema"
title: Non-Redundant Mask data model
allOf:
- $ref: referencefile.schema
- $ref: keyword_exptype.schema
- type: object
properties:
nrm:
title: Non-Redundant Mask
fits_hdu: NRM
ndim: 2
datatype: float32
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ def flatten(xs):
'mrsptcorr': dm.MirMrsPtCorrModel,
'msa': dm.MSAModel,
'msaoper': None,
'nrm': dm.NRMModel,
'ote': dm.OTEModel,
'persat': dm.PersistenceSatModel,
'psfmask': dm.PsfMaskModel,
Expand Down

0 comments on commit cdb4163

Please sign in to comment.