Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sdc
GRIS Gregor Infrared Spectrograph
grisinv
Commits
ace63b47
Commit
ace63b47
authored
Nov 22, 2021
by
Vigeesh Gangadharan
Browse files
check for target scan
parent
3cb21670
Pipeline
#2944
passed with stage
in 3 minutes and 11 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
grisinv/invert.py
View file @
ace63b47
...
...
@@ -1755,9 +1755,12 @@ class VFISVpackage:
# get the time of the first file
_
,
self
.
header
=
fits
.
getdata
(
self
.
filenames
[
0
],
header
=
True
,
memap
=
True
)
# check if proper fits
self
.
check_fits
(
self
.
header
)
if
self
.
header
[
"OBS_TRGT"
]
==
'USAF'
:
print
(
"Looks like a target scan"
)
print_fail
(
f
"Aborting."
)
sys
.
exit
()
self
.
date_beg
=
datetime
.
fromisoformat
(
self
.
header
[
"DATE-BEG"
])
self
.
date_obs
=
datetime
.
fromisoformat
(
self
.
header
[
"DATE-OBS"
])
...
...
@@ -1766,6 +1769,14 @@ class VFISVpackage:
_
,
header_end
=
fits
.
getdata
(
self
.
filenames
[
-
1
],
header
=
True
,
memap
=
True
)
self
.
date_end
=
datetime
.
fromisoformat
(
header_end
[
"DATE-BEG"
])
self
.
headerlist
=
[]
if
self
.
header
[
'INSTRUME'
]
==
'GRIS-IFU'
:
for
ifiles
in
range
(
len
(
self
.
filenames
)):
_
,
ifileheader
=
fits
.
getdata
(
self
.
filenames
[
ifiles
],
header
=
True
,
memap
=
True
)
self
.
headerlist
.
append
(
ifileheader
)
def
get_pixel_bounds
(
self
):
"""Get the +/- width Angstrom bounds centered at the line"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment