Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
DUVERNE Pierre-Alexandre
MUPHOTEN
Commits
7694a464
Commit
7694a464
authored
May 10, 2021
by
DUVERNE Pierre-Alexandre
Browse files
Delete sanstitre3.py
parent
e1d24b73
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
82 deletions
+0
-82
sanstitre3.py
sanstitre3.py
+0
-82
No files found.
sanstitre3.py
deleted
100755 → 0
View file @
e1d24b73
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu May 6 22:18:07 2021
@author: duverne, IJClab, Orsay, duverne@protonmail.com
"""
from
astropy.io
import
fits
from
astropy.time
import
Time
# hdu = fits.open('/home/duverne/Documents/AT2018cow_data/LT/g_band_to_test/h_e_20180806_23_2_1_1.fits')[0]
# header_lt = hdu.header
# hdu = fits.open('/home/duverne/Documents/atlas_cow_klotz/TCH_g/TCH_20180621_013618_g.fits')[0]
# header_tch = hdu.header
# hdu = fits.open('/home/duverne/Documents/muphoten/tests/test_im/2018cow_20180620_043132_Jun8kevf_kait_B_c/2018cow_20180620_043132_Jun8kevf_kait_B_c.fit')[0]
# header_kait = hdu.header
# hdu = fits.open('/home/duverne/Documents/ATLAS18qqn-S001-R001-C001-SDSS_g_ref_g.fits')[0]
# header_iris = hdu.header
images
=
[
'/home/duverne/Documents/AT2018cow_data/LT/g_band_to_test/h_e_20180806_23_2_1_1.fits'
,
'/home/duverne/Documents/atlas_cow_klotz/TCH_g/TCH_20180621_013618_g.fits'
,
'/home/duverne/Documents/muphoten/tests/test_im/2018cow_20180620_043132_Jun8kevf_kait_B_c/2018cow_20180620_043132_Jun8kevf_kait_B_c.fit'
,
'/home/duverne/Documents/ATLAS18qqn-S001-R001-C001-SDSS_g_ref_g.fits'
,
'/media/duverne/DISQUE ESSB/25z_AbAO/image/15 42 36 +28 25 55-001R.fits'
,
'/media/duverne/DISQUE ESSB/25z_AbAO/image/16 04 09 +24 19 50-001R.fits'
,
'/media/duverne/DISQUE ESSB/AT2018cow_data/hct/20180620/20180620_sn18cow_B.fits'
,
'/media/duverne/DISQUE ESSB/AT2018cow_data/kped/20180707/ATLAS18qqn_0_g_20180707_043840.873786_o_0000.fits'
,
'/home/duverne/Documents/Entrainement_calibration/Non calibree AZT 8/8-004Rm.fit'
]
# headers = [header_lt, header_tch, header_kait, header_iris]
# def set_time(header):
# header = header_kait
def
clean_time
(
header
):
times
=
[
'JD'
,
'DATE'
,
'DATE-OBS'
,
'BJD-OBS'
,
'HJD-OBS'
,
'JD-OBS'
]
if
'MJD-OBS'
not
in
header
:
for
time
in
times
:
if
time
in
header
:
try
:
mjd
=
Time
(
header
[
time
]).
mjd
header
[
"MJD-OBS"
]
=
mjd
break
except
ValueError
:
continue
else
:
time
=
'MJD-OBS'
mjd
=
header
[
"MJD-OBS"
]
print
(
mjd
,
time
)
for
image
in
images
:
hdu
=
fits
.
open
(
image
)[
0
]
header
=
hdu
.
header
clean_time
(
header
)
# mjd = header_kait.get('MJD-OBS')
# if mjd:
# pass
# else:
# try:
# header_kait['MJD-OBS']
# except KeyError:
# header_kait['DATE']
# except KeyError:
# header_kait['DATE']
\ No newline at end of file
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