-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JP-3248: Add ref file data model and step keywords for new MIRI EMI c…
…orrection (#200)
- Loading branch information
1 parent
e1d435d
commit 1180473
Showing
6 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
*.DS_Store | ||
|
||
# C extensions | ||
*.so | ||
|
This file contains 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 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 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,35 @@ | ||
from .reference import ReferenceFileModel | ||
|
||
|
||
__all__ = ['EmiModel'] | ||
|
||
|
||
class EmiModel(ReferenceFileModel): | ||
""" | ||
A data model to correct MIRI images for EMI contamination. | ||
Parameters | ||
__________ | ||
data : numpy table | ||
The reference waves to correct for MIRI EMI. | ||
A table-like object containing phase amplitude values | ||
corresponding to the appropriate frequency | ||
- Hz390: float32 1D array | ||
- Hz218a: float32 1D array | ||
- Hz218b: float32 1D array | ||
- Hz218c: float32 1D array | ||
- Hz164: float32 1D array | ||
- Hz10: float32 1D array | ||
""" | ||
schema_url = "http://stsci.edu/schemas/jwst_datamodel/emi.schema" | ||
reftype = "emicorr" | ||
|
||
def __init__(self, init=None, **kwargs): | ||
super(EmiModel, self).__init__(init=init, **kwargs) | ||
|
||
def on_save(self, path=None): | ||
self.meta.reftype = self.reftype | ||
self.meta.instrument.name = "MIRI" | ||
|
||
def validate(self): | ||
super(EmiModel, self).validate() |
This file contains 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 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,22 @@ | ||
%YAML 1.1 | ||
--- | ||
$schema: "http://stsci.edu/schemas/asdf/asdf-schema-1.0.0" | ||
id: "http://stsci.edu/schemas/jwst_datamodel/emi.schema" | ||
allOf: | ||
- $ref: referencefile.schema | ||
- type: object | ||
properties: | ||
data: | ||
title: MIRI Reference Waves Table for EMI correction | ||
type: object | ||
properties: | ||
meta: | ||
type: object | ||
frequencies: | ||
type: object | ||
description: | | ||
Frequency names, values, and phase amplitude values | ||
subarray_cases: | ||
type: object | ||
description: | | ||
Frequencies to correct for according to subarray |