Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
L1 pipeline
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Metis scientific pipeline
L1 pipeline
Commits
10519d7c
Commit
10519d7c
authored
5 years ago
by
Roberto Susino
Browse files
Options
Downloads
Patches
Plain Diff
Version 1.0
parent
4b2ecbac
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
decode_obt.pro
+13
-0
13 additions, 0 deletions
decode_obt.pro
interpol_param.pro
+1
-1
1 addition, 1 deletion
interpol_param.pro
metis_l1_prep.pro
+15
-15
15 additions, 15 deletions
metis_l1_prep.pro
with
29 additions
and
16 deletions
decode_obt.pro
0 → 100644
+
13
−
0
View file @
10519d7c
function
decode_obt
,
t_coarse
,
t_fine
,
to_double
=
to_double
,
from_double
=
from_double
if
keyword_set
(
from_double
)
then
begin
obt
=
t_coarse
t_coarse
=
ulong
(
obt
)
t_fine
=
uint
((
obt
-
t_coarse
)
*
65536.0
D
)
endif
if
keyword_set
(
to_double
)
then
begin
return
,
double
(
t_coarse
)
+
double
(
t_fine
)
/
65536.0
D
endif
return
,
t_coarse
.
tostring
()
+
':'
+
t_fine
.
tostring
()
end
\ No newline at end of file
This diff is collapsed.
Click to expand it.
interpol_param.pro
+
1
−
1
View file @
10519d7c
...
...
@@ -5,6 +5,6 @@ function interpol_param, hk_table, par_name, time
times
=
strsplit
(
hk_table
.
gen_time
[
i
[
j
]],
":"
,
/
extract
)
hk_time
[
j
]
=
double
(
times
[
0
])
+
double
(
times
[
1
])
/
65536.0
D
endfor
value
=
interpol
(
float
(
hk_table
.
cal
_val
[
i
]),
hk_time
,
time
)
value
=
interpol
(
float
(
hk_table
.
eng
_val
[
i
]),
hk_time
,
time
)
return
,
value
end
\ No newline at end of file
This diff is collapsed.
Click to expand it.
metis_l1_prep.pro
+
15
−
15
View file @
10519d7c
...
...
@@ -46,24 +46,24 @@ pro metis_l1_prep
;
read
l0
fits
structure
fits_info
,
input
.
l0_
file_name
,
n_ext
=
n_ext
,
extname
=
extname
,
/
silent
fits_info
,
input
.
file_name
,
n_ext
=
n_ext
,
extname
=
extname
,
/
silent
;
read
the
primary
hdu
ext_no
=
0
image
=
mrdfits
(
input
.
l0_
file_name
,
ext_no
,
primary_header
,
/
silent
)
image
=
mrdfits
(
input
.
file_name
,
ext_no
,
primary_header
,
/
silent
)
;
if
the
data
is
not
an
image
,
read
the
data
binary
-
table
extension
if
fxpar
(
primary_header
,
'NAXIS'
)
eq
0
then
begin
ext_no
+=
1
data_bin_table
=
mrdfits
(
input
.
l0_
file_name
,
ext_no
,
data_extension_header
,
/
silent
)
data_bin_table
=
mrdfits
(
input
.
file_name
,
ext_no
,
data_extension_header
,
/
silent
)
endif
else
data_bin_table
=
!
null
;
read
the
metadata
extension
ext_no
+=
1
metadata_bin_table
=
mrdfits
(
input
.
l0_
file_name
,
ext_no
,
metadata_extension_header
,
/
silent
)
metadata_bin_table
=
mrdfits
(
input
.
file_name
,
ext_no
,
metadata_extension_header
,
/
silent
)
;
identify
the
data
product
and
its
nominal
size
...
...
@@ -88,7 +88,7 @@ pro metis_l1_prep
if
datatype
eq
2
then
begin
if
fxpar
(
metadata_extension_header
,
'M'
)
eq
256
then
begin
ext_no
+=
1
accumul_vector
=
mrdfits
(
input
.
l0_
file_name
,
ext_no
,
vector_extension_header
,
/
silent
)
accumul_vector
=
mrdfits
(
input
.
file_name
,
ext_no
,
vector_extension_header
,
/
silent
)
endif
else
accumul_vector
=
!
null
endif
...
...
@@ -152,20 +152,20 @@ pro metis_l1_prep
;
join
the
metadata
extension
header
to
the
primary
header
removing
unwanted
keywords
i
=
where
(
strmid
(
primary_header
,
0
,
8
)
eq
'
COMP_RAT
'
)
i
=
where
(
strmid
(
primary_header
,
0
,
8
)
eq
'
DATASUM
'
)
j
=
where
(
strmid
(
metadata_extension_header
,
0
,
8
)
eq
'EXTNAME '
)
n
=
n_elements
(
metadata_extension_header
)
k
=
where
(
strmid
(
metadata_extension_header
,
0
,
8
)
eq
'TFORM1 '
)
primary_header
=
[
$
primary_header
[
0
:
i
],
$
metadata_extension_header
[
j
+
1
:
n
-
2
],
$
primary_header
[
i
+
1
:
*
]
$
primary_header
[
0
:
i
-
1
],
$
metadata_extension_header
[
j
+
1
:
k
-
1
],
$
primary_header
[
i
:
*
]
$
]
;
adjust
the
primary
header
(
it
is
almost
the
same
for
all
data
product
types
)
fxaddpar
,
primary_header
,
'FILENAME'
,
file_name
,
'FITS filename'
fxaddpar
,
primary_header
,
'PARENT'
,
file_basename
(
input
.
l0_
file_name
),
'Name of the parent file that got processed to the current one'
,
before
=
'APID'
fxaddpar
,
primary_header
,
'PARENT'
,
file_basename
(
input
.
file_name
),
'Name of the parent file that got processed to the current one'
,
before
=
'APID'
fxaddpar
,
primary_header
,
'DATE'
,
date
,
'Date and time of FITS file creation'
,
before
=
'OBT_BEG'
fxaddpar
,
primary_header
,
'DATE-OBS'
,
date_beg
,
'Same as DATE-BEG'
,
before
=
'OBT_BEG'
fxaddpar
,
primary_header
,
'DATE-BEG'
,
date_beg
,
'Start time of observation'
,
before
=
'OBT_BEG'
...
...
@@ -217,7 +217,7 @@ pro metis_l1_prep
; add keywords for file history
fxaddpar, primary_header, '
HISTORY
', '
Third
history
line
'
;
fxaddpar, primary_header, '
HISTORY
', ''
; remove unused keywords
...
...
@@ -288,11 +288,11 @@ pro metis_l1_prep
output = { $
file_name: out_file_name, $
l0_file_name: input.
l0_
file_name, $
log_file_name: '' $
l0_file_name: input.file_name, $
log_file_name: '
output
/
metis_l1_prep_log
.
txt
' $
}
openw, unit, 'output
/
contents
.
json'
openw, unit, 'output
/
contents
.
json'
, /get_lun
printf, unit, output, /implied_print
free_lun, unit
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment