Skip to content

Commit

Permalink
Merge pull request #66 from PaulHuwe/RCAL-298_DarkExposure
Browse files Browse the repository at this point in the history
RCAL-289: Updated Dark Exposure Keywords
  • Loading branch information
PaulHuwe authored Feb 15, 2022
2 parents b07468a + d71036a commit 8540399
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ target/
# Jupyter Notebook
.ipynb_checkpoints

# Pycharm editor project files
.idea

# IPython
profile_default/
ipython_config.py
Expand Down
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
0.10.0 (unreleased)
===================

- Updated maker utility and factory for dark ref model to include group keywords from exposure. [#66]

- Updated maker utilities for level 1, level 2, and ramp models to reflect changes in reference pixels. [#65]


0.9.0 (2022-02-04)
==================

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ install_requires =
psutil>=5.7.2
numpy>=1.21
astropy>=5.0
romanad @ git+https://github.com/Spacetelescope/rad.git@main
romanad>=0.9.0

package_dir =
=src
Expand Down
9 changes: 6 additions & 3 deletions src/roman_datamodels/testing/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,14 +344,14 @@ def create_exposure(**kwargs):
"frame_time": _random_positive_float(),
"gain_factor": _random_positive_float(),
"group_time": _random_positive_float(),
"groupgap": _random_positive_int(),
"groupgap": 0,
"id": _random_positive_int(),
"integration_time": _random_positive_float(),
"mid_time": _random_astropy_time(),
"mid_time_mjd": _random_mjd_timestamp(),
"mid_time_tdb": _random_mjd_timestamp(),
"nframes": _random_positive_int(),
"ngroups": _random_positive_int(),
"nframes": 8,
"ngroups": 6,
"sca_number": _random_positive_int(),
"start_time": _random_astropy_time(),
"start_time_mjd": _random_mjd_timestamp(),
Expand Down Expand Up @@ -383,6 +383,9 @@ def create_ref_meta(**kwargs):
"description": _random_string("Reference description "),
"exposure": {
"type" : "WFI_IMAGE",
"ngroups" : 6,
"nframes" : 8,
"groupgap" : 0
},
"instrument": {
"name": "WFI",
Expand Down
9 changes: 6 additions & 3 deletions src/roman_datamodels/testing/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ def mk_exposure():
exp['mid_time_tdb'] = NONUM
exp['end_time_tdb'] = NONUM
exp['start_time_eng'] = NOSTR
exp['ngroups'] = NONUM
exp['nframes'] = NONUM
exp['ngroups'] = 6
exp['nframes'] = 8
exp['data_problem'] = False
exp['sca_number'] = NONUM
exp['gain_factor'] = NONUM
Expand All @@ -45,7 +45,7 @@ def mk_exposure():
exp['integration_start'] = NONUM
exp['integration_end'] = NONUM
exp['frame_divisor'] = NONUM
exp['groupgap'] = NONUM
exp['groupgap'] = 0
exp['nsamples'] = NONUM
exp['sample_time'] = NONUM
exp['frame_time'] = NONUM
Expand Down Expand Up @@ -611,6 +611,9 @@ def mk_dark(shape=None, filepath=None):
observation['ma_table_name']="ma_table.name"
darkref['meta']['observation'] = observation
exposure = {}
exposure['ngroups'] = 6
exposure['nframes'] = 8
exposure['groupgap'] = 0
exposure['type'] = 'WFI_IMAGE'
exposure['p_exptype'] = "WFI_IMAGE|WFI_GRISM|WFI_PRISM|"
darkref['meta']['exposure'] = exposure
Expand Down

0 comments on commit 8540399

Please sign in to comment.