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
96081adc
Commit
96081adc
authored
Jun 21, 2022
by
Nie Jundan
Browse files
update code
parent
f1686832
Changes
2
Hide whitespace changes
Inline
Side-by-side
csst/msc/calib_pos.py
View file @
96081adc
...
...
@@ -192,7 +192,8 @@ class CsstProcMscPositionCalibration(CsstProcessor):
outcat:
filename of the cross matched catalog: ref.cat
"""
outcat
=
self
.
dm
.
pc_ref_cat
outcat
=
self
.
dm
.
pc_combined_file
(
"gaia"
,
"fits"
)
refcat
=
self
.
dm
.
pc_ref_cat
fname
=
self
.
dm
.
pc_combined_file
(
"img"
,
"fits"
)
hdu
=
fits
.
open
(
fname
)
header1
=
hdu
[
0
].
header
...
...
@@ -253,14 +254,15 @@ class CsstProcMscPositionCalibration(CsstProcessor):
refcat
.
rename_column
(
'ra_error'
,
'ERRA_WORLD'
)
refcat
.
rename_column
(
'dec_error'
,
'ERRB_WORLD'
)
refcat
.
rename_column
(
'phot_g_mean_mag'
,
'MAG'
)
if
outcat
:
refcat
.
write
(
outcat
,
format
=
'fits'
,
overwrite
=
True
)
hdu
=
ref
cat
hdu
=
fits
.
open
(
out
cat
)
hdu1
=
self
.
convert_hdu_to_ldac
(
hdu
)
hdup
=
fits
.
PrimaryHDU
()
hdu
=
hdu1
[
0
]
tbhdu
=
hdu1
[
1
]
thdulist
=
fits
.
HDUList
([
hdup
,
hdu
,
tbhdu
])
thdulist
.
writeto
(
out
cat
)
thdulist
.
writeto
(
ref
cat
)
print
(
'##################### end #####################'
)
...
...
csst/msc/data_manager.py
View file @
96081adc
...
...
@@ -171,7 +171,7 @@ class CsstMscDataManager:
Parameters
----------
suffix:
{"img", "wht", "flg", "cat", "head"}
{"img", "wht", "flg", "cat", "head"
, "gaia"
}
ext:
{"fits", "head", "ahead" }
...
...
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