Skip to content

Commit

Permalink
Merge branch 'master' into CCD-1385
Browse files Browse the repository at this point in the history
  • Loading branch information
hbrown-ST authored Nov 13, 2023
2 parents 69370a7 + ba57aaf commit 4245823
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
11 changes: 10 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
11.17.9 (unreleased)
11.17.10 (unreleased)
====================

JWST
----
- Added PIXAR_SR and PIXAR_A2 to miri photom tpn. [#1013]


11.17.9 (2023-11-08)
====================

General
-------

- bugfix: get observatory metadata inside asdf file handler [#1012]


11.17.8 (2023-11-07)
====================

Expand Down
9 changes: 4 additions & 5 deletions crds/io/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,12 @@ def get_observatory(filepath, original_name=None):
except KeyError:
pass
elif original_name.endswith(".asdf"):
try:
import asdf
with asdf.open(filepath) as handle:
observatory = handle["meta"]["telescope"]
except KeyError:
import asdf
with asdf.open(filepath) as handle:
if "roman" in handle.keys():
observatory = "roman"
else:
observatory = handle["meta"]["telescope"]
elif original_name.endswith((".yaml", ".json", ".text", ".txt")):
return "jwst"
return observatory.lower()
Expand Down

0 comments on commit 4245823

Please sign in to comment.