Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
jonas.sinjan
hrt_pipeline
Commits
7e20b9a1
Commit
7e20b9a1
authored
Jun 23, 2021
by
jonas
Browse files
comments + dload folder correction
parent
79d54a50
Changes
3
Hide whitespace changes
Inline
Side-by-side
download_files.py
View file @
7e20b9a1
...
...
@@ -4,14 +4,14 @@ import os
#########################################################
"""
To make this work need to create a .env file:
To make this work need to create a .env file
and install dotenv: 'pip install dotenv'
:
USER_NAME = YOUR LOGIN USERNAME (NORMALLY JUST YOUR LAST NAME)
PHIDATAPASSWORD = YOUR WINDOWS PASSWORD
"""
#########################################################
def
download_file
(
url
,
dload_location
=
'../fits_files'
):
def
download_file
(
url
,
dload_location
=
'../fits_files
/
'
):
"""
Download files from the given url and store locally
...
...
@@ -46,7 +46,9 @@ if __name__ == "__main__":
url
=
'https://www2.mps.mpg.de/services/proton/phi/fm/attic/'
download_folder
=
'../fits_files/'
for
file
in
files
:
download_file
(
url
+
path
+
file
)
download_file
(
url
+
path
+
file
,
dload_location
=
download_folder
)
hrt_pipe.py
View file @
7e20b9a1
...
...
@@ -80,14 +80,14 @@ def phihrt_pipe(data_f, dark_f = '', flat_f = '', scale_data = True, norm_f = Tr
'''
PHI-HRT data reduction pipeline
1. read in science data (+scaling) open path option + open for several scans at once
1. read in science data (+
OPTION:
scaling) open path option + open for several scans at once
2. read in flat field (+scaling)- just accepts one flat field fits file
3. read in dark field (+scaling)
4. apply dark field
5. option to clean flat field with unsharp masking
6. normalise flat field
7. apply flat field
8. prefilter
correction
8.
apply
prefilter
9. read in field stop
10. apply field stop
11. demodulate with const demod matrix
...
...
@@ -96,7 +96,7 @@ def phihrt_pipe(data_f, dark_f = '', flat_f = '', scale_data = True, norm_f = Tr
13. calibration
a) ghost correction - not implemented yet
b) cross talk correction
14. rte inversion with cmilos
14. rte inversion with cmilos
(CE, RTE or CE+RTE)
a) output rte data products to fits file
Parameters
...
...
@@ -161,7 +161,7 @@ def phihrt_pipe(data_f, dark_f = '', flat_f = '', scale_data = True, norm_f = Tr
printc
(
'--------------------------------------------------------------'
,
bcolors
.
OKGREEN
)
overall_time
=
time
.
time
()
#-----------------
# READ DATA
#-----------------
...
...
@@ -1005,6 +1005,4 @@ def phihrt_pipe(data_f, dark_f = '', flat_f = '', scale_data = True, norm_f = Tr
printc
(
'--------------------------------------------------------------'
,
color
=
bcolors
.
OKGREEN
)
return
data
return
data
\ No newline at end of file
run.py
View file @
7e20b9a1
...
...
@@ -23,7 +23,7 @@ q_slope = 0.0038
u_slope
=
-
0.0077
v_slope
=
-
0.0009
q_int
=
-
0.0056
q_int
=
-
0.0056
#the offset, normalised to I_c
u_int
=
0.0031
v_int
=
-
0.0002
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment