Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
jonas.sinjan
hrt_pipeline
Commits
cca9aef4
Commit
cca9aef4
authored
Jun 23, 2021
by
jonas
Browse files
DID check fix
parent
e4534fd0
Changes
2
Hide whitespace changes
Inline
Side-by-side
hrt_pipe.py
View file @
cca9aef4
...
...
@@ -551,6 +551,7 @@ def phihrt_pipe(data_f,dark_f,flat_f,norm_f = True, clean_f = False, sigma = 59,
#-----------------
if
prefilter_f
is
not
None
:
print
(
" "
)
printc
(
'-->>>>>>> Prefilter Correction '
,
color
=
bcolors
.
OKGREEN
)
start_time
=
time
.
time
()
...
...
@@ -563,7 +564,7 @@ def phihrt_pipe(data_f,dark_f,flat_f,norm_f = True, clean_f = False, sigma = 59,
prefilter
,
_
=
load_fits
(
prefilter_f
)
prefilter
=
prefilter
[:,
652
:
1419
,
613
:
1380
]
#crop the helioseismology data
#
prefilter = prefilter[:,652:1419,613:1380] #crop the helioseismology data
def
get_v1_index1
(
x
):
index1
,
v1
=
min
(
enumerate
([
abs
(
i
)
for
i
in
x
]),
key
=
itemgetter
(
1
))
...
...
@@ -571,7 +572,7 @@ def phihrt_pipe(data_f,dark_f,flat_f,norm_f = True, clean_f = False, sigma = 59,
for
scan
in
range
(
data_shape
[
-
1
]):
voltage_list
=
voltagesData
[
scan
]
voltage_list
=
voltagesData
_arr
[
scan
]
for
wv
in
range
(
6
):
...
...
@@ -589,9 +590,9 @@ def phihrt_pipe(data_f,dark_f,flat_f,norm_f = True, clean_f = False, sigma = 59,
v2
=
vdif
[
index1
-
1
]
index2
=
index1
-
1
imprefilter
=
(
prefilter
[
index1
,:,:
]
*
v1
+
prefilter
[
index2
,:,:
]
*
v2
)
/
(
v1
+
v2
)
imprefilter
=
(
prefilter
[
:,:,
index1
]
*
v1
+
prefilter
[
:,:,
index2
]
*
v2
)
/
(
v1
+
v2
)
data
[:,:,:,
wv
,
scan
]
/=
imprefilter
data
[:,:,:,
wv
,
scan
]
/=
imprefilter
[...,
np
.
newaxis
]
printc
(
'--------------------------------------------------------------'
,
bcolors
.
OKGREEN
)
...
...
@@ -759,7 +760,9 @@ def phihrt_pipe(data_f,dark_f,flat_f,norm_f = True, clean_f = False, sigma = 59,
seen
=
set
()
uniq_scan_DIDs
=
[
x
for
x
in
scan_name_list
if
x
in
seen
or
seen
.
add
(
x
)]
#creates list of unique DIDs from the list
if
uniq_scan_DIDs
==
scan_name_list
:
print
(
uniq_scan_DIDs
)
print
(
scan_name_list
)
if
uniq_scan_DIDs
==
[]:
print
(
"The scan's DIDs are all unique"
)
else
:
...
...
run.py
View file @
cca9aef4
...
...
@@ -4,7 +4,12 @@ import numpy as np
sciencedata_fits_filenames
=
[
'solo_L0_phi-hrt-ilam_20210421T120003_V202106080929C_0144210101.fits'
,
'solo_L0_phi-hrt-ilam_20210424T120003_V202106141014C_0144240101.fits'
,
'solo_L0_phi-hrt-ilam_20210425T120002_V202106141020C_0144250101.fits'
,
'solo_L0_phi-hrt-ilam_20210426T120002_V202106162118C_0144260101.fits'
,
'solo_L0_phi-hrt-ilam_20210427T120002_V202106162052C_0144270101.fits'
,
'solo_L0_phi-hrt-ilam_20210427T120002_V202106171444C_0144270101.fits'
,
'solo_L0_phi-hrt-ilam_20210427T120002_V202106171517C_0144270101.fits'
]
#['solo_L0_phi-hrt-ilam_0667414748_V202103221851C_0142230201.fits']#['solo_L0_phi-hrt-ilam_0667414905_V202103221851C_0142230602.fits', 'solo_L0_phi-hrt-ilam_0667415054_V202103221851C_0142230603.fits', 'solo_L0_phi-hrt-ilam_0667415205_V202103221851C_0142230604.fits', 'solo_L0_phi-hrt-ilam_0667415354_V202103221851C_0142230605.fits', 'solo_L0_phi-hrt-ilam_0667415505_V202103221851C_0142230606.fits', 'solo_L0_phi-hrt-ilam_0667415654_V202103221851C_0142230607.fits', 'solo_L0_phi-hrt-ilam_0667415805_V202103221851C_0142230608.fits']#['../fits_files/solo_L0_phi-hrt-ilam_0667414748_V202103221851C_0142230201.fits']
'solo_L0_phi-hrt-ilam_20210427T120002_V202106171517C_0144270101.fits'
]
#['solo_L0_phi-hrt-ilam_0667414748_V202103221851C_0142230201.fits']#['solo_L0_phi-hrt-ilam_0667414905_V202103221851C_0142230602.fits', 'solo_L0_phi-hrt-ilam_0667415054_V202103221851C_0142230603.fits', 'solo_L0_phi-hrt-ilam_0667415205_V202103221851C_0142230604.fits', 'solo_L0_phi-hrt-ilam_0667415354_V202103221851C_0142230605.fits', 'solo_L0_phi-hrt-ilam_0667415505_V202103221851C_0142230606.fits', 'solo_L0_phi-hrt-ilam_0667415654_V202103221851C_0142230607.fits', 'solo_L0_phi-hrt-ilam_0667415805_V202103221851C_0142230608.fits']#['../fits_files/solo_L0_phi-hrt-ilam_0667414748_V202103221851C_0142230201.fits']
#sciencedata_fits_filenames = ['solo_L0_phi-hrt-ilam_0667414748_V202103221851C_0142230201.fits']
#sciencedata_fits_filenames = ['solo_L0_phi-hrt-ilam_0667414905_V202103221851C_0142230602.fits', 'solo_L0_phi-hrt-ilam_0667415054_V202103221851C_0142230603.fits', 'solo_L0_phi-hrt-ilam_0667415205_V202103221851C_0142230604.fits', 'solo_L0_phi-hrt-ilam_0667415354_V202103221851C_0142230605.fits', 'solo_L0_phi-hrt-ilam_0667415505_V202103221851C_0142230606.fits', 'solo_L0_phi-hrt-ilam_0667415654_V202103221851C_0142230607.fits', 'solo_L0_phi-hrt-ilam_0667415805_V202103221851C_0142230608.fits']
flatfield_fits_filename
=
'../fits_files/solo_L0_phi-hrt-flat_0667134081_V202103221851C_0162201100.fits'
darkfield_fits_filename
=
'../fits_files/solo_L0_phi-fdt-ilam_20200228T155100_V202002281636_0022210004_000.fits'
...
...
@@ -30,5 +35,5 @@ c_talk_params[1,0] = q_int
c_talk_params
[
1
,
1
]
=
u_int
c_talk_params
[
1
,
2
]
=
v_int
phihrt_pipe
(
sciencedata_fits_filenames
,
darkfield_fits_filename
,
flatfield_fits_filename
,
flat_states
=
24
,
norm_stokes
=
True
,
prefilter_f
=
None
,
clean_f
=
True
,
ctalk_params
=
None
,
ItoQUV
=
Fals
e
,
out_demod_file
=
Fals
e
,
out_dir
=
'/data/slam/home/sinjan/hrt_pipe_results/stp-1
44
/'
,
rte
=
'False'
)
phihrt_pipe
(
sciencedata_fits_filenames
,
darkfield_fits_filename
,
flatfield_fits_filename
,
flat_states
=
24
,
norm_stokes
=
True
,
prefilter_f
=
prefilter_f
,
clean_f
=
True
,
ctalk_params
=
c_talk_params
,
ItoQUV
=
Tru
e
,
out_demod_file
=
Tru
e
,
out_dir
=
'/data/slam/home/sinjan/hrt_pipe_results/stp-1
36_ctalk_prefilter
/'
,
rte
=
'False'
)
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