Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
L2 pipelines
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Metis scientific pipeline
L2 pipelines
Commits
77bf37fa
Commit
77bf37fa
authored
3 years ago
by
Roberto Susino
Browse files
Options
Downloads
Patches
Plain Diff
Add management of errors in UV pipeline
parent
a33897b7
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
metis_l2_prep_uv.pro
+12
-12
12 additions, 12 deletions
metis_l2_prep_uv.pro
with
12 additions
and
12 deletions
metis_l2_prep_uv.pro
+
12
−
12
View file @
77bf37fa
...
@@ -50,6 +50,10 @@ pro metis_l2_prep_uv
...
@@ -50,6 +50,10 @@ pro metis_l2_prep_uv
journal
,
' sess_num = '
+
header
.
sess_num
journal
,
' sess_num = '
+
header
.
sess_num
journal
,
' nbin = '
+
string
(
sqrt
(
header
.
nbin
),
format
=
'(I0)'
)
journal
,
' nbin = '
+
string
(
sqrt
(
header
.
nbin
),
format
=
'(I0)'
)
;
error
is
the
quadratic
relative
error
error
=
0
.
;
calibration
block
;
calibration
block
case
header
.
datatype
of
case
header
.
datatype
of
...
@@ -63,7 +67,7 @@ pro metis_l2_prep_uv
...
@@ -63,7 +67,7 @@ pro metis_l2_prep_uv
;
header
.
nsumexp
=
header
.
ndit1
*
header
.
ndit2
;
header
.
nsumexp
=
header
.
ndit1
*
header
.
ndit2
;
====================================
;
====================================
data
=
metis_dark_uvda
(
data
,
header
,
cal_pack
,
history
=
history
)
data
=
metis_dark_uvda
(
data
,
header
,
cal_pack
,
error
=
error
,
quality_matrix
=
quality_matrix
,
history
=
history
)
;
====================================
;
====================================
;
for
data
already
subtracted
of
dark
;
for
data
already
subtracted
of
dark
...
@@ -74,15 +78,13 @@ pro metis_l2_prep_uv
...
@@ -74,15 +78,13 @@ pro metis_l2_prep_uv
;
history
=
[
'Dark correction: '
,
' '
+
file
]
;
history
=
[
'Dark correction: '
,
' '
+
file
]
;
====================================
;
====================================
data
=
metis_flat_field
(
data
,
header
,
cal_pack
,
history
=
history
)
data
=
metis_flat_field
(
data
,
header
,
cal_pack
,
error
=
error
,
quality_matrix
=
quality_matrix
,
history
=
history
)
data
=
metis_vignetting
(
data
,
header
,
cal_pack
,
history
=
history
)
data
=
metis_vignetting
(
data
,
header
,
cal_pack
,
error
=
error
,
quality_matrix
=
quality_matrix
,
history
=
history
)
data
=
metis_rad_cal
(
data
,
header
,
cal_pack
,
history
=
history
)
data
=
metis_rad_cal
(
data
,
header
,
cal_pack
,
error
=
error
,
quality_matrix
=
quality_matrix
,
history
=
history
)
;
====================================
;
====================================
;
for
simple
radiometric
calibration
;
for
simple
radiometric
calibration
;
data
=
data
/
header
.
xposure
;
cal_pack
.
uv_channel
.
cal_units
=
'DN/s'
;
cal_pack
.
uv_channel
.
cal_units
=
'DN/s'
;
history
=
[
history
,
'Radiometric calibration: '
,
' exposure normalisation only'
]
;
====================================
;
====================================
;
====================================
;
====================================
...
@@ -135,7 +137,7 @@ pro metis_l2_prep_uv
...
@@ -135,7 +137,7 @@ pro metis_l2_prep_uv
fxaddpar
,
primary_header
,
'FILENAME'
,
file_name
fxaddpar
,
primary_header
,
'FILENAME'
,
file_name
fxaddpar
,
primary_header
,
'PARENT'
,
file_basename
(
input
.
file_name
)
fxaddpar
,
primary_header
,
'PARENT'
,
file_basename
(
input
.
file_name
)
fxaddpar
,
primary_header
,
'LEVEL'
,
'L2
-draft
'
fxaddpar
,
primary_header
,
'LEVEL'
,
'L2'
fxaddpar
,
primary_header
,
'ORIGIN'
,
''
fxaddpar
,
primary_header
,
'ORIGIN'
,
''
fxaddpar
,
primary_header
,
'CREATOR'
,
'metis_l2_prep_uv.pro'
fxaddpar
,
primary_header
,
'CREATOR'
,
'metis_l2_prep_uv.pro'
fxaddpar
,
primary_header
,
'VERS_SW'
,
input
.
sw_version
fxaddpar
,
primary_header
,
'VERS_SW'
,
input
.
sw_version
...
@@ -148,6 +150,8 @@ pro metis_l2_prep_uv
...
@@ -148,6 +150,8 @@ pro metis_l2_prep_uv
fxaddpar
,
primary_header
,
'XPOSURE'
,
header
.
xposure
fxaddpar
,
primary_header
,
'XPOSURE'
,
header
.
xposure
fxaddpar
,
primary_header
,
'NSUMEXP'
,
header
.
nsumexp
fxaddpar
,
primary_header
,
'NSUMEXP'
,
header
.
nsumexp
sxdelpar
,
primary_header
,
'BLANK'
;
append
wcs
keywords
;
append
wcs
keywords
wcs
=
metis_wcs
(
header
,
cal_pack
,
ref_detector
=
ref_detector
)
wcs
=
metis_wcs
(
header
,
cal_pack
,
ref_detector
=
ref_detector
)
...
@@ -160,10 +164,6 @@ pro metis_l2_prep_uv
...
@@ -160,10 +164,6 @@ pro metis_l2_prep_uv
history
=
[
history
,
'Update WCS and solar ephemeris:'
,
' SKD version = '
+
kernel_version
]
history
=
[
history
,
'Update WCS and solar ephemeris:'
,
' SKD version = '
+
kernel_version
]
;
delete
useless
keywords
sxdelpar
,
primary_header
,
'BLANK'
;
add
the
history
keyword
;
add
the
history
keyword
for
k
=
0
,
n_elements
(
history
)
-
1
do
$
for
k
=
0
,
n_elements
(
history
)
-
1
do
$
...
@@ -201,7 +201,7 @@ pro metis_l2_prep_uv
...
@@ -201,7 +201,7 @@ pro metis_l2_prep_uv
fxaddpar
,
extension_header
,
'PCOUNT'
,
0
,
'Parameter count'
fxaddpar
,
extension_header
,
'PCOUNT'
,
0
,
'Parameter count'
fxaddpar
,
extension_header
,
'GCOUNT'
,
1
,
'Group count'
fxaddpar
,
extension_header
,
'GCOUNT'
,
1
,
'Group count'
fxaddpar
,
extension_header
,
'EXTNAME'
,
'Error matrix'
,
'Extension name'
fxaddpar
,
extension_header
,
'EXTNAME'
,
'Error matrix'
,
'Extension name'
error_matrix
=
intarr
(
header
.
naxis1
,
header
.
naxis2
)
error_matrix
=
data
*
sqrt
(
error
)
if
not
ref_detector
then
error_matrix
=
metis_rectify
(
error_matrix
,
'UV'
)
if
not
ref_detector
then
error_matrix
=
metis_rectify
(
error_matrix
,
'UV'
)
fits_add_checksum
,
extension_header
,
error_matrix
fits_add_checksum
,
extension_header
,
error_matrix
mwrfits
,
error_matrix
,
out_file_name
,
extension_header
,
/
no_comment
,
/
silent
mwrfits
,
error_matrix
,
out_file_name
,
extension_header
,
/
no_comment
,
/
silent
...
...
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