Skip to content

Commit

Permalink
draft of psf model
Browse files Browse the repository at this point in the history
  • Loading branch information
jemorrison committed Oct 16, 2024
1 parent 503320f commit 24aa688
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/stdatamodels/jwst/datamodels/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
from .photom import NisImgPhotomModel, NisSossPhotomModel, NisWfssPhotomModel
from .photom import NrsFsPhotomModel, NrsMosPhotomModel
from .pixelarea import PixelAreaModel, NirspecSlitAreaModel, NirspecMosAreaModel, NirspecIfuAreaModel
from .psf import PsfModel
from .psfmask import PsfMaskModel
from .quad import QuadModel
from .ramp import RampModel
Expand Down Expand Up @@ -134,6 +135,7 @@
'NisImgPhotomModel', 'NisSossPhotomModel', 'NisWfssPhotomModel',
'NrsFsPhotomModel', 'NrsMosPhotomModel',
'PastasossModel',
'PsfModel',
'PsfMaskModel',
'QuadModel', 'RampModel',
'RampFitOutputModel', 'ReadnoiseModel',
Expand Down
24 changes: 24 additions & 0 deletions src/stdatamodels/jwst/datamodels/psf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from .reference import ReferenceFileModel


__all__ = ['PsfModel']


class PsfModel(ReferenceFileModel):
"""
A data model for 2-D PSF reference images
Parameters
__________
data : numpy float32 array
The PSF image
wave : numpy float32 array
Wavelength image
"""
schema_url = "http://stsci.edu/schemas/jwst_datamodel/psf.schema"

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

44 changes: 44 additions & 0 deletions src/stdatamodels/jwst/datamodels/schemas/psf.schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
%YAML 1.1
---
$schema: "http://stsci.edu/schemas/fits-schema/fits-schema"
id: "http://stsci.edu/schemas/jwst_datamodel/psf.schema"
allOf:
- $ref: referencefile.schema
- $ref: keyword_exptype.schema
- $ref: keyword_readpatt.schema
- $ref: keyword_psubarray.schema
- $ref: keyword_grating.schema
- $ref: subarray.schema

- type: object
properties:
meta:
type: object
properties:
psf:
title: PSF parameters
type: object
properties:
subpix:
title: oversampling factor
type: number
fits_keyword: SUBPIX
center_col:
title: column ePSF shifted to
type: number
fits_keyword: CENTCOL
- type: object
properties:
data:
title: The PSF image
fits_hdu: PSF
default: 0.0
ndim: 2
datatype: float32
wave:
title: Wavelength image
fits_hdu: WAVE
default: 0
ndim: 2
datatype: float32

0 comments on commit 24aa688

Please sign in to comment.