Commit 96081adc authored by Nie Jundan's avatar Nie Jundan
Browse files

update code

parent f1686832
...@@ -192,7 +192,8 @@ class CsstProcMscPositionCalibration(CsstProcessor): ...@@ -192,7 +192,8 @@ class CsstProcMscPositionCalibration(CsstProcessor):
outcat: outcat:
filename of the cross matched catalog: ref.cat 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") fname = self.dm.pc_combined_file("img","fits")
hdu = fits.open(fname) hdu = fits.open(fname)
header1 = hdu[0].header header1 = hdu[0].header
...@@ -253,14 +254,15 @@ class CsstProcMscPositionCalibration(CsstProcessor): ...@@ -253,14 +254,15 @@ class CsstProcMscPositionCalibration(CsstProcessor):
refcat.rename_column('ra_error', 'ERRA_WORLD') refcat.rename_column('ra_error', 'ERRA_WORLD')
refcat.rename_column('dec_error', 'ERRB_WORLD') refcat.rename_column('dec_error', 'ERRB_WORLD')
refcat.rename_column('phot_g_mean_mag', 'MAG') refcat.rename_column('phot_g_mean_mag', 'MAG')
if outcat: refcat.write(outcat, format='fits', overwrite=True)
hdu = refcat hdu = fits.open(outcat)
hdu1 = self.convert_hdu_to_ldac(hdu) hdu1 = self.convert_hdu_to_ldac(hdu)
hdup = fits.PrimaryHDU() hdup = fits.PrimaryHDU()
hdu = hdu1[0] hdu = hdu1[0]
tbhdu = hdu1[1] tbhdu = hdu1[1]
thdulist = fits.HDUList([hdup, hdu, tbhdu]) thdulist = fits.HDUList([hdup, hdu, tbhdu])
thdulist.writeto(outcat) thdulist.writeto(refcat)
print('##################### end #####################') print('##################### end #####################')
......
...@@ -171,7 +171,7 @@ class CsstMscDataManager: ...@@ -171,7 +171,7 @@ class CsstMscDataManager:
Parameters Parameters
---------- ----------
suffix: suffix:
{"img", "wht", "flg", "cat", "head"} {"img", "wht", "flg", "cat", "head", "gaia"}
ext: ext:
{"fits", "head", "ahead" } {"fits", "head", "ahead" }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment