Skip to content

Commit

Permalink
RCAL-438 Add support for Reference File Quantities (#140)
Browse files Browse the repository at this point in the history
* Modified dark class to support quantities in Roman.

* Updated Changelog.

* Flake8 compliance.
  • Loading branch information
PaulHuwe authored Jan 20, 2023
1 parent 3a4bcad commit f8c3d23
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
9 changes: 8 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
General
-------

-
-

Bug Fixes
---------
Expand All @@ -16,6 +16,12 @@ Changes to API

-

dark
----

- Modified dark class to support quantities in Roman.[#140]

=======
1.3.2 (2023-01-10)
==================

Expand All @@ -29,6 +35,7 @@ ramp_fitting
negation of a DQ flag then cast to a np.uint32 caused an over flow. The
flag is now cast to a np.uint32 before negation. [#139]


1.3.1 (2023-01-03)
==================

Expand Down
8 changes: 6 additions & 2 deletions src/stcal/dark_current/dark_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,13 @@ def __init__(self, dims=None, dark_model=None):
meta data set based on the arrays in the dark_model.
"""
if dark_model is not None:
self.data = dark_model.data
if isinstance(dark_model.data, u.Quantity):
self.data = dark_model.data.value
self.err = dark_model.err.value
else:
self.data = dark_model.data
self.err = dark_model.err
self.groupdq = dark_model.dq
self.err = dark_model.err

self.exp_nframes = dark_model.meta.exposure.nframes
self.exp_ngroups = dark_model.meta.exposure.ngroups
Expand Down

0 comments on commit f8c3d23

Please sign in to comment.