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
Bo Zhang
csst
Commits
be99f12d
Commit
be99f12d
authored
Jun 17, 2022
by
BO ZHANG
🏀
Browse files
fixed bugs in path_aux
parent
0226fb8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
csst/msc/data_manager.py
View file @
be99f12d
...
@@ -128,7 +128,7 @@ class CsstMscDataManager:
...
@@ -128,7 +128,7 @@ class CsstMscDataManager:
suffix:
suffix:
{"img", "wht", "flg", "img_L1", "wht_L1", "flg_L1", "whead"}
{"img", "wht", "flg", "img_L1", "wht_L1", "flg_L1", "whead"}
ext:
ext:
{"fits", "
a
cat", "rcat"}
{"fits", "cat", "rcat"}
Returns
Returns
-------
-------
...
@@ -146,14 +146,16 @@ class CsstMscDataManager:
...
@@ -146,14 +146,16 @@ class CsstMscDataManager:
return
os
.
path
.
join
(
self
.
dir_l1
,
fn
)
return
os
.
path
.
join
(
self
.
dir_l1
,
fn
)
@
property
@
property
def
pc_combined_image
(
self
):
def
pc_combined_image
(
self
,
suffix
=
"img"
,
ext
=
"fits"
):
""" combined image """
""" combined image
return
os
.
path
.
join
(
self
.
dir_l1
,
"combined_image.fits"
)
suffix:
{"img","wht","flg","cat"}
ext:
{"fits"}
"""
fn
=
"combined_"
+
"{}.{}"
.
format
(
suffix
,
ext
)
return
os
.
path
.
join
(
self
.
dir_l1
,
fn
)
@
property
def
pc_combined_cat
(
self
):
""" combined catalog """
return
os
.
path
.
join
(
self
.
dir_l1
,
"combined_cat.fits"
)
@
property
@
property
def
pc_ref_cat
(
self
):
def
pc_ref_cat
(
self
):
...
@@ -196,13 +198,16 @@ class CsstMscDataManager:
...
@@ -196,13 +198,16 @@ class CsstMscDataManager:
return
ccd_ids
return
ccd_ids
def
get_bias
(
self
,
ccd_id
=
6
):
def
get_bias
(
self
,
ccd_id
=
6
):
return
fits
.
getdata
(
self
.
path_aux
.
format
(
"CLB"
,
ccd_id
))
fp
=
glob
.
glob
(
self
.
path_aux
.
format
(
"CLB"
,
ccd_id
))[
0
]
return
fits
.
getdata
(
fp
)
def
get_dark
(
self
,
ccd_id
=
6
):
def
get_dark
(
self
,
ccd_id
=
6
):
return
fits
.
getdata
(
self
.
path_aux
.
format
(
"CLD"
,
ccd_id
))
fp
=
glob
.
glob
(
self
.
path_aux
.
format
(
"CLD"
,
ccd_id
))[
0
]
return
fits
.
getdata
(
fp
)
def
get_flat
(
self
,
ccd_id
=
6
):
def
get_flat
(
self
,
ccd_id
=
6
):
return
fits
.
getdata
(
self
.
path_aux
.
format
(
"CLF"
,
ccd_id
))
fp
=
glob
.
glob
(
self
.
path_aux
.
format
(
"CLF"
,
ccd_id
))[
0
]
return
fits
.
getdata
(
fp
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
...
@@ -237,4 +242,4 @@ if __name__ == "__main__":
...
@@ -237,4 +242,4 @@ if __name__ == "__main__":
print
(
os
.
path
.
exists
(
nr
.
l0_cat
(
ccd_id
=
ccd_id
)))
print
(
os
.
path
.
exists
(
nr
.
l0_cat
(
ccd_id
=
ccd_id
)))
print
(
nr
.
l0_log
(
ccd_id
=
ccd_id
))
print
(
nr
.
l0_log
(
ccd_id
=
ccd_id
))
print
(
os
.
path
.
exists
(
nr
.
l0_log
(
ccd_id
=
ccd_id
)))
print
(
os
.
path
.
exists
(
nr
.
l0_log
(
ccd_id
=
ccd_id
)))
print
(
nr
.
l1_sci
(
ccd_id
,
"img"
,
"fits"
))
print
(
nr
.
l1_sci
(
ccd_id
,
"img"
,
"fits"
))
\ No newline at end of file
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