Skip to content

Commit 14a85a2

Browse files
committed
Add a combinedspecmodel to help with multiple order support
1 parent bcefeff commit 14a85a2

3 files changed

Lines changed: 37 additions & 2 deletions

File tree

src/stdatamodels/jwst/datamodels/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from .apcorr import NrsMosApcorrModel, NrsIfuApcorrModel, NrsFsApcorrModel
1313
from .asn import AsnModel
1414
from .barshadow import BarshadowModel
15-
from .combinedspec import CombinedSpecModel
15+
from .combinedspec import CombinedSpecModel, WFSSCombinedSpecModel
1616
from .contrast import ContrastModel
1717
from .cube import CubeModel
1818
from .dark import DarkModel
@@ -252,6 +252,7 @@
252252
"WaveMapModel",
253253
"WaveMapSingleModel",
254254
"WfssBkgModel",
255+
"WFSSCombinedSpecModel",
255256
"WFSSMultiCombinedSpecModel",
256257
"WFSSMultiExposureSpecModel",
257258
"WFSSMultiSpecModel",

src/stdatamodels/jwst/datamodels/combinedspec.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from .model_base import JwstDataModel
22

33

4-
__all__ = ["CombinedSpecModel"]
4+
__all__ = ["CombinedSpecModel", "WFSSCombinedSpecModel"]
55

66

77
class CombinedSpecModel(JwstDataModel):
@@ -15,3 +15,14 @@ class CombinedSpecModel(JwstDataModel):
1515
"""
1616

1717
schema_url = "http://stsci.edu/schemas/jwst_datamodel/combinedspec.schema"
18+
19+
20+
class WFSSCombinedSpecModel(JwstDataModel):
21+
"""
22+
A data model for NIRCam and NIRISS WFSS exposure-averaged 1D spectra.
23+
24+
This model is designed to hold the combined spectra from a WFSS observation,
25+
with each spectrum represented as a single row in the `spec_table` attribute.
26+
"""
27+
28+
schema_url = "http://stsci.edu/schemas/jwst_datamodel/wfss_combinedspec.schema"
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
%YAML 1.1
2+
---
3+
$schema: "http://stsci.edu/schemas/asdf/asdf-schema-1.1.0"
4+
id: "http://stsci.edu/schemas/jwst_datamodel/wfss_combinedspec.schema"
5+
title: Table of WFSS-extracted spectra and their associated metadata
6+
allOf:
7+
- $ref: core.schema
8+
- type: object
9+
properties:
10+
spectral_order:
11+
title: Spectral order number
12+
type: integer
13+
default: -999
14+
fits_keyword: SPORDER
15+
fits_hdu: COMBINE1D
16+
dispersion_direction:
17+
title: Dispersion direction
18+
type: integer
19+
fits_keyword: DISPAXIS
20+
fits_hdu: COMBINE1D
21+
default: -999
22+
spec_table:
23+
$ref: wfss_combinedspectable.schema

0 commit comments

Comments
 (0)