Commit 0000ff83 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

fit Chao's framework

parent 3bff8d54
...@@ -3,9 +3,11 @@ from collections import OrderedDict ...@@ -3,9 +3,11 @@ from collections import OrderedDict
import astropy.io.fits as fits import astropy.io.fits as fits
from astropy.io.fits import HDUList, PrimaryHDU from astropy.io.fits import HDUList, PrimaryHDU
from ..CsstException import CsstException from csst.common.CsstException import CsstException
__all__ = ["CsstData", "INSTRUMENT_LIST"]
INSTRUMENT_LIST = ["MSC", ] INSTRUMENT_LIST = ["MSC", ]
...@@ -46,12 +48,12 @@ class CsstData: ...@@ -46,12 +48,12 @@ class CsstData:
""" """
if ext == 'pri': if ext == 'pri':
try: try:
value = self._primary_hdu.header.get(key) return self._primary_hdu.header.get(key)
except Exception as e: except Exception as e:
print(e) print(e)
elif ext == 'img': elif ext == 'img':
try: try:
value = self._l0data.header.get(key) return self._l0data.header.get(key)
except Exception as e: except Exception as e:
print(e) print(e)
else: else:
......
from .data import CsstData
from .mscdata import CsstMscData, CsstMscImgData
from astropy.io import fits from astropy.io import fits
from .data.data import INSTRUMENT_LIST from csst.common.data import INSTRUMENT_LIST
from csst.common.data.mscdata import CsstMscImgData from csst.msc.mscdata import CsstMscImgData
class CsstDataFactory: class CsstDataFactory:
......
### Astrometry module
---
Adapted from JD Nie on 2022-02-23.
```commandline
├── __init__.py
├── csst_realtime.conv [sextractor] convolution kernel
├── csst_realtime.nnw [sextractor] neural network weights
├── csst_realtime.param [sextractor] parameter names
├── csst_realtime.sex unused
├── default.missfits [missfits] config file
├── default.param unused
├── default.scamp [scamp] wcs config file
├── default2.scamp unused
├── new_csst_realtime.no.weight.sex [sextractor] config file
├── readme example
└── run_astrom_csst.py main program
```
pipeline steps:
```commandline
```
simulated data:
tulip: /share/Cycle-3-SimuData/
\ No newline at end of file
CONV NORM
# 5x5 convolution mask of a gaussian PSF with FWHM = 2.5 pixels.
0.034673 0.119131 0.179633 0.119131 0.034673
0.119131 0.409323 0.617200 0.409323 0.119131
0.179633 0.617200 0.930649 0.617200 0.179633
0.119131 0.409323 0.617200 0.409323 0.119131
0.034673 0.119131 0.179633 0.119131 0.034673
NNW
# Neural Network Weights for the SExtractor star/galaxy classifier (V1.3)
# inputs: 9 for profile parameters + 1 for seeing.
# outputs: ``Stellarity index'' (0.0 to 1.0)
# Seeing FWHM range: from 0.025 to 5.5'' (images must have 1.5 < FWHM < 5 pixels)
# Optimized for Moffat profiles with 2<= beta <= 4.
3 10 10 1
-1.56604e+00 -2.48265e+00 -1.44564e+00 -1.24675e+00 -9.44913e-01 -5.22453e-01 4.61342e-02 8.31957e-01 2.15505e+00 2.64769e-01
3.03477e+00 2.69561e+00 3.16188e+00 3.34497e+00 3.51885e+00 3.65570e+00 3.74856e+00 3.84541e+00 4.22811e+00 3.27734e+00
-3.22480e-01 -2.12804e+00 6.50750e-01 -1.11242e+00 -1.40683e+00 -1.55944e+00 -1.84558e+00 -1.18946e-01 5.52395e-01 -4.36564e-01 -5.30052e+00
4.62594e-01 -3.29127e+00 1.10950e+00 -6.01857e-01 1.29492e-01 1.42290e+00 2.90741e+00 2.44058e+00 -9.19118e-01 8.42851e-01 -4.69824e+00
-2.57424e+00 8.96469e-01 8.34775e-01 2.18845e+00 2.46526e+00 8.60878e-02 -6.88080e-01 -1.33623e-02 9.30403e-02 1.64942e+00 -1.01231e+00
4.81041e+00 1.53747e+00 -1.12216e+00 -3.16008e+00 -1.67404e+00 -1.75767e+00 -1.29310e+00 5.59549e-01 8.08468e-01 -1.01592e-02 -7.54052e+00
1.01933e+01 -2.09484e+01 -1.07426e+00 9.87912e-01 6.05210e-01 -6.04535e-02 -5.87826e-01 -7.94117e-01 -4.89190e-01 -8.12710e-02 -2.07067e+01
-5.31793e+00 7.94240e+00 -4.64165e+00 -4.37436e+00 -1.55417e+00 7.54368e-01 1.09608e+00 1.45967e+00 1.62946e+00 -1.01301e+00 1.13514e-01
2.20336e-01 1.70056e+00 -5.20105e-01 -4.28330e-01 1.57258e-03 -3.36502e-01 -8.18568e-02 -7.16163e+00 8.23195e+00 -1.71561e-02 -1.13749e+01
3.75075e+00 7.25399e+00 -1.75325e+00 -2.68814e+00 -3.71128e+00 -4.62933e+00 -2.13747e+00 -1.89186e-01 1.29122e+00 -7.49380e-01 6.71712e-01
-8.41923e-01 4.64997e+00 5.65808e-01 -3.08277e-01 -1.01687e+00 1.73127e-01 -8.92130e-01 1.89044e+00 -2.75543e-01 -7.72828e-01 5.36745e-01
-3.65598e+00 7.56997e+00 -3.76373e+00 -1.74542e+00 -1.37540e-01 -5.55400e-01 -1.59195e-01 1.27910e-01 1.91906e+00 1.42119e+00 -4.35502e+00
-1.70059e+00 -3.65695e+00 1.22367e+00 -5.74367e-01 -3.29571e+00 2.46316e+00 5.22353e+00 2.42038e+00 1.22919e+00 -9.22250e-01 -2.32028e+00
0.00000e+00
1.00000e+00
NUMBER #Running object number
#MAG_APER(1) #Fixed aperture magnitude vector [mag]
#MAGERR_APER(1) #RMS error vector for fixed aperture mag. [mag]
MAG_APER #Fixed aperture magnitude vector [mag]
MAGERR_APER #RMS error vector for fixed aperture mag. [mag]
MAG_AUTO #Kron-like elliptical aperture magnitude [mag]
MAGERR_AUTO #RMS error for AUTO magnitude [mag]
MAG_PETRO #Petrosian-like elliptical aperture magnitude [mag]
MAGERR_PETRO #RMS error for PETROsian magnitude [mag]
FLUX_AUTO #Flux of AUTO
FLUXERR_AUTO #RMS error for AUTO flux
SNR_WIN #Gaussian-weighted SNR
KRON_RADIUS #Kron apertures in units of A or B
PETRO_RADIUS #Petrosian apertures in units of A or B
X_IMAGE #Object position along x [pixel]
Y_IMAGE #Object position along y [pixel]
ALPHA_J2000 #Right ascension of barycenter (J2000) [deg]
DELTA_J2000 #Declination of barycenter (J2000) [deg]
X2_IMAGE #Variance along x [pixel**2]
Y2_IMAGE #Variance along y [pixel**2]
A_IMAGE #Profile RMS along major axis [pixel]
B_IMAGE #Profile RMS along minor axis [pixel]
THETA_IMAGE #Position angle (CCW/x) [deg]
ERRX2_IMAGE #Variance of position along x [pixel**2]
ERRY2_IMAGE #Variance of position along y [pixel**2]
ERRA_IMAGE #RMS position error along major axis [pixel]
ERRB_IMAGE #RMS position error along minor axis [pixel]
ERRTHETA_IMAGE #Error ellipse position angle (CCW/x) [deg]
XWIN_IMAGE #Windowed position estimate along x [pixel]
YWIN_IMAGE #Windowed position estimate along y [pixel]
ALPHAWIN_J2000 #Windowed right ascension (J2000) [deg]
DELTAWIN_J2000 #windowed declination (J2000) [deg]
X2WIN_IMAGE #Windowed variance along x [pixel**2]
Y2WIN_IMAGE #Windowed variance along y [pixel**2]
AWIN_IMAGE #Windowed profile RMS along major axis [pixel]
BWIN_IMAGE #Windowed profile RMS along minor axis [pixel]
THETAWIN_IMAGE #Windowed position angle (CCW/x) [deg]
ERRX2WIN_IMAGE #Variance of windowed pos along x [pixel**2]
ERRY2WIN_IMAGE #Variance of windowed pos along y [pixel**2]
ERRAWIN_IMAGE #RMS windowed pos error along major axis [pixel]
ERRBWIN_IMAGE #RMS windowed pos error along minor axis [pixel]
ERRAWIN_WORLD
ERRBWIN_WORLD
ERRTHETAWIN_IMAGE #Windowed error ellipse pos angle (CCW/x) [deg]
ERRTHETAWIN_J2000
FLAGS #Extraction flags
#IMAFLAGS_ISO #FLAG-image flags OR'ed over the iso. profile
#NIMAFLAGS_ISO
FWHM_IMAGE #FWHM assuming a gaussian core [pixel]
#ELONGATION #A_IMAGE/B_IMAGE
ELLIPTICITY #1 - B_IMAGE/A_IMAGE
CLASS_STAR #S/G classifier output
# Default configuration file for SExtractor 2.12.4
# EB 2010-10-10
#
#-------------------------------- Catalog ------------------------------------
CATALOG_NAME test.fits # name of the output catalog
CATALOG_TYPE FITS_LDAC # NONE,ASCII,ASCII_HEAD, ASCII_SKYCAT,
# ASCII_VOTABLE, FITS_1.0 or FITS_LDAC
PARAMETERS_NAME /line17/wfst/prog/config/wfst_realtime.param # name of the file containing catalog contents
#------------------------------- Extraction ----------------------------------
DETECT_TYPE CCD # CCD (linear) or PHOTO (with gamma correction)
DETECT_MINAREA 3 # min. # of pixels above threshold
DETECT_MAXAREA 0 # max. # of pixels above threshold (0=unlimited)
THRESH_TYPE RELATIVE # threshold type: RELATIVE (in sigmas)
# or ABSOLUTE (in ADUs)
DETECT_THRESH 3 # <sigmas> or <threshold>,<ZP> in mag.arcsec-2
ANALYSIS_THRESH 3 # <sigmas> or <threshold>,<ZP> in mag.arcsec-2
FILTER Y # apply filter for detection (Y or N)?
FILTER_NAME /line17/wfst/prog/config/wfst_realtime.conv # name of the file containing the filter
DEBLEND_NTHRESH 64 # Number of deblending sub-thresholds
DEBLEND_MINCONT 0.0005 # Minimum contrast parameter for deblending
CLEAN Y # Clean spurious detections? (Y or N)?
CLEAN_PARAM 0.5 # Cleaning efficiency
MASK_TYPE CORRECT # type of detection MASKing: can be one of
# NONE, BLANK or CORRECT
#-------------------------------- WEIGHTing ----------------------------------
WEIGHT_TYPE MAP_WEIGHT # type of WEIGHTing: NONE, BACKGROUND,
# MAP_RMS, MAP_VAR or MAP_WEIGHT
WEIGHT_IMAGE weight.fits # weight-map filename
#------------------------------ Photometry -----------------------------------
# similiar to BASS, use D=36 pixel to do flux calibration, d~=12arsec
PHOT_APERTURES 10
#PHOT_APERTURES 32 # MAG_APER aperture diameter(s) in pixels
PHOT_AUTOPARAMS 2.5, 3.5 # MAG_AUTO parameters: <Kron_fact>,<min_radius>
PHOT_PETROPARAMS 2.0, 3.5 # MAG_PETRO parameters: <Petrosian_fact>,
# <min_radius>
PHOT_AUTOAPERS 0.0,0.0 # <estimation>,<measurement> minimum apertures
# for MAG_AUTO and MAG_PETRO
SATUR_LEVEL 65535.0 # level (in ADUs) at which arises saturation
SATUR_KEY safSATURATE # keyword for saturation level (in ADUs)
MAG_ZEROPOINT 0.0 # magnitude zero-point
MAG_GAMMA 7.0 # gamma of emulsion (for photographic scans)
GAIN 1.0 # detector gain in e-/ADU
GAIN_KEY asdfGAIN # keyword for detector gain in e-/ADU
PIXEL_SCALE 0 # size of pixel in arcsec (0=use FITS WCS info)
#------------------------- Star/Galaxy Separation ----------------------------
SEEING_FWHM 1.2 # stellar FWHM in arcsec
STARNNW_NAME /line17/wfst/prog/config/wfst_realtime.nnw # Neural-Network_Weight table filename
#------------------------------ Background -----------------------------------
BACK_TYPE AUTO # AUTO or MANUAL
BACK_VALUE 0.0 # Default background value in MANUAL mode
BACK_SIZE 256 # Background mesh: <size> or <width>,<height>
BACK_FILTERSIZE 3 # Background filter: <size> or <width>,<height>
BACKPHOTO_TYPE LOCAL # can be GLOBAL or LOCAL
BACKPHOTO_THICK 24 # thickness (pix) of background rectangular aperture for LOCAL
#------------------------------ Check Image ----------------------------------
CHECKIMAGE_TYPE NONE # can be NONE, BACKGROUND, BACKGROUND_RMS,
# MINIBACKGROUND, MINIBACK_RMS, -BACKGROUND,
# FILTERED, OBJECTS, -OBJECTS, SEGMENTATION,
# or APERTURES
CHECKIMAGE_NAME check.fits # Filename for the check-image
#--------------------- Memory (change with caution!) -------------------------
MEMORY_OBJSTACK 3000 # number of objects in stack
MEMORY_PIXSTACK 300000 # number of pixels in stack
MEMORY_BUFSIZE 1024 # number of lines in buffer
#------------------------------- ASSOCiation ---------------------------------
ASSOC_NAME sky.list # name of the ASCII file to ASSOCiate
ASSOC_DATA 2,3,4 # columns of the data to replicate (0=all)
ASSOC_PARAMS 2,3,4 # columns of xpos,ypos[,mag]
ASSOC_RADIUS 2.0 # cross-matching radius (pixels)
ASSOC_TYPE NEAREST # ASSOCiation method: FIRST, NEAREST, MEAN,
# MAG_MEAN, SUM, MAG_SUM, MIN or MAX
ASSOCSELEC_TYPE MATCHED # ASSOC selection type: ALL, MATCHED or -MATCHED
#----------------------------- Miscellaneous ---------------------------------
VERBOSE_TYPE NORMAL # can be QUIET, NORMAL or FULL
HEADER_SUFFIX .head # Filename extension for additional headers
WRITE_XML N # Write XML file (Y/N)?
XML_NAME sex.xml # Filename for XML output
# Default configuration file for MissFITS 2.8.0
# EB CM 2015-08-27
#
#------------------------------- FITS keywords --------------------------------
REMOVE_KEYWORD # Remove a FITS keyword from the headers
REPLACE_KEYWORD # Replace a FITS keyword with another
# Syntax: OLD_KEY1:NEW_KEY1,
# OLD_KEY2:NEW_KEY2,...
SLICE_KEYWORD # Replace the keyword
# SLICE_KEYWORD+SLICEKEY_FORMAT
# with SLICE_KEYWORD for every slice
# or viceversa building cubes
SLICEKEY_FORMAT %03d # format of slice referring keywords
DISPLAY_KEYWORD OBJECT # Display the following keywords while
# processing the files
HEADER_SUFFIX .head # Filename extension for add. headers
#------------------------------ FITS properties -------------------------------
NEXTENSIONS_MIN 0 # Minimum number of extensions (warns
# if less are found)
OUTFILE_TYPE SAME # Basic or Multi-FITS output:
# "SAME", "MULTI", "SPLIT",
# "SLICE", "CUBE" or "DIR"
SPLIT_SUFFIX .%03d.fits # Suffix expected for split FITS files
SLICE_SUFFIX .%03d.fits # Suffix expected for sliced FITS files
#-------------------------------- FITS data ----------------------------------
PROCESS_TYPE NONE # Operations on FITS data:
# "NONE", "TOBITPIX16", "COMPRESS" or "UNCOMPRESS"
CHECKSUM_TYPE NONE # Checksum operations:
# "NONE", "COMPUTE", "VERIFY" or
# "UPDATE"
#------------------------------- Output filename -----------------------------
SAVE_TYPE BACKUP # Behaviour towards output filename:
# "NONE", "BACKUP", "NEW" or "REPLACE"
NEW_SUFFIX .miss # suffix to add in SAVE_TYPE NEW mode
#------------------------------ Miscellaneous ---------------------------------
VERBOSE_TYPE NORMAL # "QUIET","NORMAL" or "FULL"
WRITE_XML N # Write XML file (Y/N)?
XML_NAME missfits.xml # Filename for XML output
NTHREADS 1 # 1 single thread
This diff is collapsed.
# Default configuration file for SCAMP 2.0.4
# EB 2016-11-04
#
#----------------------------- Field grouping ---------------------------------
FGROUP_RADIUS 2.0 # Max dist (deg) between field groups
#---------------------------- Reference catalogs ------------------------------
REF_SERVER cocat1.u-strasbg.fr # Internet addresses of catalog servers
REF_PORT 80 # Ports to connect to catalog servers
CDSCLIENT_EXEC aclient_cgi # CDSclient executable
ASTREF_CATALOG FILE # NONE, FILE, USNO-A1,USNO-A2,USNO-B1,
# GSC-1.3,GSC-2.2,GSC-2.3,
# TYCHO-2, UCAC-1,UCAC-2,UCAC-3,UCAC-4,
# NOMAD-1, PPMX, CMC-14, 2MASS, DENIS-3,
# SDSS-R3,SDSS-R5,SDSS-R6,SDSS-R7,
# SDSS-R8, SDSS-R9
ASTREF_BAND DEFAULT # Photom. band for astr.ref.magnitudes
# or DEFAULT, BLUEST, or REDDEST
ASTREFCAT_NAME ref.cat # Local astrometric reference catalogs
ASTREFCENT_KEYS X_WORLD,Y_WORLD # Local ref.cat. centroid parameters
ASTREFERR_KEYS ERRA_WORLD, ERRB_WORLD , ERRTHETA_WORLD
# Local ref.cat. err. ellipse params
ASTREFMAG_KEY MAG # Local ref.cat. magnitude parameter
ASTREFMAGERR_KEY MAGERR # Local ref.cat. mag. error parameter
ASTREFOBSDATE_KEY OBSDATE # Local ref.cat. obs. date parameter
ASTREFMAG_LIMITS -99,99 # Select magnitude range in ASTREF_BAND
SAVE_REFCATALOG Y # Save ref catalogs in FITS-LDAC format?
REFOUT_CATPATH ./ # Save path for reference catalogs
#--------------------------- Merged output catalogs ---------------------------
MERGEDOUTCAT_TYPE FITS_LDAC # NONE, ASCII_HEAD, ASCII, FITS_LDAC
MERGEDOUTCAT_NAME merged.cat # Merged output catalog filename
#--------------------------- Full output catalogs ---------------------------
FULLOUTCAT_TYPE FITS_LDAC # NONE, ASCII_HEAD, ASCII, FITS_LDAC
FULLOUTCAT_NAME full.cat # Full output catalog filename
#----------------------------- Pattern matching -------------------------------
MATCH Y # Do pattern-matching (Y/N) ?
MATCH_NMAX 0 # Max.number of detections for MATCHing
# (0=auto)
PIXSCALE_MAXERR 2.0 # Max scale-factor uncertainty
POSANGLE_MAXERR 2.0 # Max position-angle uncertainty (deg)
POSITION_MAXERR 2.0 # Max positional uncertainty (arcmin)
MATCH_RESOL 0 # Matching resolution (arcsec); 0=auto
MATCH_FLIPPED Y # Allow matching with flipped axes?
MOSAIC_TYPE FIX_FOCALPLANE # UNCHANGED, SAME_CRVAL, SHARE_PROJAXIS,
# FIX_FOCALPLANE or LOOSE
FIXFOCALPLANE_NMIN 1 # Min number of dets for FIX_FOCALPLANE
#---------------------------- Cross-identification ----------------------------
CROSSID_RADIUS 2.5 # Cross-id initial radius (arcsec)
#---------------------------- Astrometric solution ----------------------------
SOLVE_ASTROM Y # Compute astrometric solution (Y/N) ?
PROJECTION_TYPE TAN # SAME, TPV or TAN
ASTRINSTRU_KEY FILTER,QRUNID # FITS keyword(s) defining the astrom
STABILITY_TYPE EXPOSURE # EXPOSURE, PRE-DISTORTED or INSTRUMENT
CENTROID_KEYS XWIN_IMAGE,YWIN_IMAGE # Cat. parameters for centroiding
CENTROIDERR_KEYS ERRAWIN_IMAGE,ERRBWIN_IMAGE,ERRTHETAWIN_IMAGE
# Cat. params for centroid err ellipse
DISTORT_KEYS XWIN_IMAGE,YWIN_IMAGE # Cat. parameters or FITS keywords
DISTORT_GROUPS 1,1 # Polynom group for each context key
DISTORT_DEGREES 2 # Polynom degree for each group
FOCDISTORT_DEGREE 1 # Polynom degree for focal plane coords
ASTREF_WEIGHT 1000000.0 # Relative weight of ref.astrom.ca
ASTRACCURACY_TYPE SIGMA-PIXEL # SIGMA-PIXEL, SIGMA-ARCSEC,
# or TURBULENCE-ARCSEC
ASTRACCURACY_KEY ASTRACCU # FITS keyword for ASTR_ACCURACY param.
ASTR_ACCURACY 0.00000001 # Astrom. uncertainty floor parameter
ASTRCLIP_NSIGMA 3 # Astrom. clipping threshold in sigmas
COMPUTE_PARALLAXES N # Compute trigonom. parallaxes (Y/N)?
COMPUTE_PROPERMOTIONS N # Compute proper motions (Y/N)?
CORRECT_COLOURSHIFTS N # Correct for colour shifts (Y/N)?
INCLUDE_ASTREFCATALOG N # Include ref.cat in prop.motions (Y/N)?
ASTR_FLAGSMASK 0x00fc # Astrometry rejection mask on SEx FLAGS
ASTR_IMAFLAGSMASK 0x0 # Astrometry rejection mask on IMAFLAGS
#---------------------------- Photometric solution ----------------------------
SOLVE_PHOTOM Y # Compute photometric solution (Y/N) ?
MAGZERO_OUT 0.0 # Magnitude zero-point(s) in output
MAGZERO_INTERR 0.01 # Internal mag.zero-point accuracy
MAGZERO_REFERR 0.03 # Photom.field mag.zero-point accuracy
PHOTINSTRU_KEY FILTER # FITS keyword(s) defining the photom.
MAGZERO_KEY PHOT_C # FITS keyword for the mag zero-point
EXPOTIME_KEY EXPTIME # FITS keyword for the exposure time (s)
AIRMASS_KEY AIRMASS # FITS keyword for the airmass
EXTINCT_KEY PHOT_K # FITS keyword for the extinction coeff
PHOTOMFLAG_KEY PHOTFLAG # FITS keyword for the photometry flag
PHOTFLUX_KEY FLUX_AUTO # Catalog param. for the flux measurement
PHOTFLUXERR_KEY FLUXERR_AUTO # Catalog parameter for the flux error
PHOTCLIP_NSIGMA 3.0 # Photom.clipping threshold in sigmas
PHOT_ACCURACY 1e-3 # Photometric uncertainty floor (frac.)
PHOT_FLAGSMASK 0x00fc # Photometry rejection mask on SEx FLAGS
PHOT_IMAFLAGSMASK 0x0 # Photometry rejection mask on IMAFLAGS
#------------------------------- Check-plots ----------------------------------
CHECKPLOT_CKEY SCAMPCOL # FITS keyword for PLPLOT field colour
CHECKPLOT_DEV NULL # NULL, XWIN, TK, PS, PSC, XFIG, PNG,
# JPEG, AQT, PDF or SVG
CHECKPLOT_RES 0 # Check-plot resolution (0 = default)
CHECKPLOT_ANTIALIAS N # Anti-aliasing using convert (Y/N) ?
CHECKPLOT_TYPE FGROUPS,DISTORTION,ASTR_INTERROR2D,ASTR_INTERROR1D,ASTR_REFERROR2D,ASTR_REFERROR1D,ASTR_CHI2,PHOT_ERROR
CHECKPLOT_NAME fgroups,distort,astr_interror2d,astr_interror1d,astr_referror2d,astr_referror1d,astr_chi2,psphot_error # Check-plot filename(s)
#------------------------------- Check-images ---------------------------------
CHECKIMAGE_TYPE NONE # NONE, AS_PAIR, AS_REFPAIR, or AS_XCORR
CHECKIMAGE_NAME check.fits # Check-image filename(s)
#------------------------------ Miscellaneous ---------------------------------
SN_THRESHOLDS 10.0,100.0 # S/N thresholds (in sigmas) for all and
# high-SN sample
FWHM_THRESHOLDS 0.0,100.0 # FWHM thresholds (in pixels) for sources
ELLIPTICITY_MAX 0.5 # Max. source ellipticity
FLAGS_MASK 0x00f0 # Global rejection mask on SEx FLAGS
WEIGHTFLAGS_MASK 0x00ff # Global rejec. mask on SEx FLAGS_WEIGHT
IMAFLAGS_MASK 0x0 # Global rejec. mask on SEx IMAFLAGS_ISO
AHEADER_GLOBAL scamp.abcdhead # Filename of the global INPUT header
AHEADER_SUFFIX .abcdhead # Filename extension for additional
# INPUT headers
HEADER_SUFFIX .head # Filename extension for OUTPUT headers
HEADER_TYPE NORMAL # NORMAL or FOCAL_PLANE
VERBOSE_TYPE NORMAL # QUIET, NORMAL, LOG or FULL
WRITE_XML N # Write XML file (Y/N)?
XML_NAME scamp.xml # Filename for XML output
XSL_URL file:///usr/local/share/scamp/scamp.xsl
# Filename for XSL style-sheet
NTHREADS 0 # Number of simultaneous threads for
# the SMP version of SCAMP
# 0 = automatic
# Default configuration file for SCAMP 2.0.4
# EB 2016-11-04
#
#----------------------------- Field grouping ---------------------------------
FGROUP_RADIUS 2.0 # Max dist (deg) between field groups
#---------------------------- Reference catalogs ------------------------------
REF_SERVER cocat1.u-strasbg.fr # Internet addresses of catalog servers
REF_PORT 80 # Ports to connect to catalog servers
CDSCLIENT_EXEC aclient_cgi # CDSclient executable
ASTREF_CATALOG FILE # NONE, FILE, USNO-A1,USNO-A2,USNO-B1,
# GSC-1.3,GSC-2.2,GSC-2.3,
# TYCHO-2, UCAC-1,UCAC-2,UCAC-3,UCAC-4,
# NOMAD-1, PPMX, CMC-14, 2MASS, DENIS-3,
# SDSS-R3,SDSS-R5,SDSS-R6,SDSS-R7,
# SDSS-R8, SDSS-R9
ASTREF_BAND DEFAULT # Photom. band for astr.ref.magnitudes
# or DEFAULT, BLUEST, or REDDEST
ASTREFCAT_NAME ref.cat # Local astrometric reference catalogs
ASTREFCENT_KEYS X_WORLD,Y_WORLD # Local ref.cat. centroid parameters
ASTREFERR_KEYS ERRA_WORLD, ERRB_WORLD , ERRTHETA_WORLD
# Local ref.cat. err. ellipse params
ASTREFMAG_KEY MAG # Local ref.cat. magnitude parameter
ASTREFMAGERR_KEY MAGERR # Local ref.cat. mag. error parameter
ASTREFOBSDATE_KEY OBSDATE # Local ref.cat. obs. date parameter
ASTREFMAG_LIMITS -99,99 # Select magnitude range in ASTREF_BAND
SAVE_REFCATALOG Y # Save ref catalogs in FITS-LDAC format?
REFOUT_CATPATH ./ # Save path for reference catalogs
#--------------------------- Merged output catalogs ---------------------------
MERGEDOUTCAT_TYPE FITS_LDAC # NONE, ASCII_HEAD, ASCII, FITS_LDAC
MERGEDOUTCAT_NAME merged.cat # Merged output catalog filename
#--------------------------- Full output catalogs ---------------------------
FULLOUTCAT_TYPE FITS_LDAC # NONE, ASCII_HEAD, ASCII, FITS_LDAC
FULLOUTCAT_NAME full.cat # Full output catalog filename
#----------------------------- Pattern matching -------------------------------
MATCH Y # Do pattern-matching (Y/N) ?
MATCH_NMAX 0 # Max.number of detections for MATCHing
# (0=auto)
PIXSCALE_MAXERR 2.0 # Max scale-factor uncertainty
POSANGLE_MAXERR 2.0 # Max position-angle uncertainty (deg)
POSITION_MAXERR 2.0 # Max positional uncertainty (arcmin)
MATCH_RESOL 0 # Matching resolution (arcsec); 0=auto
MATCH_FLIPPED Y # Allow matching with flipped axes?
MOSAIC_TYPE FIX_FOCALPLANE # UNCHANGED, SAME_CRVAL, SHARE_PROJAXIS,
# FIX_FOCALPLANE or LOOSE
FIXFOCALPLANE_NMIN 1 # Min number of dets for FIX_FOCALPLANE
#---------------------------- Cross-identification ----------------------------
CROSSID_RADIUS 2.0 # Cross-id initial radius (arcsec)
#---------------------------- Astrometric solution ----------------------------
SOLVE_ASTROM Y # Compute astrometric solution (Y/N) ?
PROJECTION_TYPE TAN # SAME, TPV or TAN
ASTRINSTRU_KEY FILTER,QRUNID # FITS keyword(s) defining the astrom
STABILITY_TYPE EXPOSURE # EXPOSURE, PRE-DISTORTED or INSTRUMENT
CENTROID_KEYS XWIN_IMAGE,YWIN_IMAGE # Cat. parameters for centroiding
CENTROIDERR_KEYS ERRAWIN_IMAGE,ERRBWIN_IMAGE,ERRTHETAWIN_IMAGE
# Cat. params for centroid err ellipse
DISTORT_KEYS XWIN_IMAGE,YWIN_IMAGE # Cat. parameters or FITS keywords
DISTORT_GROUPS 1,1 # Polynom group for each context key
DISTORT_DEGREES 2 # Polynom degree for each group
FOCDISTORT_DEGREE 1 # Polynom degree for focal plane coords
ASTREF_WEIGHT 1000000.0 # Relative weight of ref.astrom.ca
ASTRACCURACY_TYPE SIGMA-PIXEL # SIGMA-PIXEL, SIGMA-ARCSEC,
# or TURBULENCE-ARCSEC
ASTRACCURACY_KEY ASTRACCU # FITS keyword for ASTR_ACCURACY param.
ASTR_ACCURACY 0.00000001 # Astrom. uncertainty floor parameter
ASTRCLIP_NSIGMA 3 # Astrom. clipping threshold in sigmas
COMPUTE_PARALLAXES N # Compute trigonom. parallaxes (Y/N)?
COMPUTE_PROPERMOTIONS N # Compute proper motions (Y/N)?
CORRECT_COLOURSHIFTS N # Correct for colour shifts (Y/N)?
INCLUDE_ASTREFCATALOG N # Include ref.cat in prop.motions (Y/N)?
ASTR_FLAGSMASK 0x00fc # Astrometry rejection mask on SEx FLAGS
ASTR_IMAFLAGSMASK 0x0 # Astrometry rejection mask on IMAFLAGS
#---------------------------- Photometric solution ----------------------------
SOLVE_PHOTOM Y # Compute photometric solution (Y/N) ?
MAGZERO_OUT 0.0 # Magnitude zero-point(s) in output
MAGZERO_INTERR 0.01 # Internal mag.zero-point accuracy
MAGZERO_REFERR 0.03 # Photom.field mag.zero-point accuracy
PHOTINSTRU_KEY FILTER # FITS keyword(s) defining the photom.
MAGZERO_KEY PHOT_C # FITS keyword for the mag zero-point
EXPOTIME_KEY EXPTIME # FITS keyword for the exposure time (s)
AIRMASS_KEY AIRMASS # FITS keyword for the airmass
EXTINCT_KEY PHOT_K # FITS keyword for the extinction coeff
PHOTOMFLAG_KEY PHOTFLAG # FITS keyword for the photometry flag
PHOTFLUX_KEY FLUX_AUTO # Catalog param. for the flux measurement
PHOTFLUXERR_KEY FLUXERR_AUTO # Catalog parameter for the flux error
PHOTCLIP_NSIGMA 3.0 # Photom.clipping threshold in sigmas
PHOT_ACCURACY 1e-3 # Photometric uncertainty floor (frac.)
PHOT_FLAGSMASK 0x00fc # Photometry rejection mask on SEx FLAGS
PHOT_IMAFLAGSMASK 0x0 # Photometry rejection mask on IMAFLAGS
#------------------------------- Check-plots ----------------------------------
CHECKPLOT_CKEY SCAMPCOL # FITS keyword for PLPLOT field colour
CHECKPLOT_DEV NULL # NULL, XWIN, TK, PS, PSC, XFIG, PNG,
# JPEG, AQT, PDF or SVG
CHECKPLOT_RES 0 # Check-plot resolution (0 = default)
CHECKPLOT_ANTIALIAS N # Anti-aliasing using convert (Y/N) ?
CHECKPLOT_TYPE FGROUPS,DISTORTION,ASTR_INTERROR2D,ASTR_INTERROR1D,ASTR_REFERROR2D,ASTR_REFERROR1D,ASTR_CHI2,PHOT_ERROR
CHECKPLOT_NAME fgroups,distort,astr_interror2d,astr_interror1d,astr_referror2d,astr_referror1d,astr_chi2,psphot_error # Check-plot filename(s)
#------------------------------- Check-images ---------------------------------
CHECKIMAGE_TYPE NONE # NONE, AS_PAIR, AS_REFPAIR, or AS_XCORR
CHECKIMAGE_NAME check.fits # Check-image filename(s)
#------------------------------ Miscellaneous ---------------------------------
SN_THRESHOLDS 10.0,100.0 # S/N thresholds (in sigmas) for all and
# high-SN sample
FWHM_THRESHOLDS 0.0,100.0 # FWHM thresholds (in pixels) for sources
ELLIPTICITY_MAX 0.5 # Max. source ellipticity
FLAGS_MASK 0x00f0 # Global rejection mask on SEx FLAGS
WEIGHTFLAGS_MASK 0x00ff # Global rejec. mask on SEx FLAGS_WEIGHT
IMAFLAGS_MASK 0x0 # Global rejec. mask on SEx IMAFLAGS_ISO
AHEADER_GLOBAL scamp.abcdhead # Filename of the global INPUT header
AHEADER_SUFFIX .ahead # Filename extension for additional
# INPUT headers
HEADER_SUFFIX .head # Filename extension for OUTPUT headers
HEADER_TYPE NORMAL # NORMAL or FOCAL_PLANE
VERBOSE_TYPE NORMAL # QUIET, NORMAL, LOG or FULL
WRITE_XML N # Write XML file (Y/N)?
XML_NAME scamp.xml # Filename for XML output
XSL_URL file:///usr/local/share/scamp/scamp.xsl
# Filename for XSL style-sheet
NTHREADS 0 # Number of simultaneous threads for
# the SMP version of SCAMP
# 0 = automatic
# Default configuration file for SExtractor 2.19.5
# EB 2016-08-21
#
#-------------------------------- Catalog ------------------------------------
CATALOG_NAME test.fits # name of the output catalog
CATALOG_TYPE FITS_LDAC # NONE,ASCII,ASCII_HEAD, ASCII_SKYCAT,
# ASCII_VOTABLE, FITS_1.0 or FITS_LDAC
PARAMETERS_NAME /line17/Jundan/csst/c3_data/pro/csst_realtime.param # name of the file containing catalog contents
#------------------------------- Extraction ----------------------------------
DETECT_TYPE CCD # CCD (linear) or PHOTO (with gamma correction)
DETECT_MINAREA 15 # min. # of pixels above threshold
DETECT_MAXAREA 0 # max. # of pixels above threshold (0=unlimited)
THRESH_TYPE RELATIVE # threshold type: RELATIVE (in sigmas)
# or ABSOLUTE (in ADUs)
DETECT_THRESH 3 # <sigmas> or <threshold>,<ZP> in mag.arcsec-2
ANALYSIS_THRESH 3 # <sigmas> or <threshold>,<ZP> in mag.arcsec-2
FILTER Y # apply filter for detection (Y or N)?
FILTER_NAME /line17/Jundan/csst/c3_data/pro/csst_realtime.conv # name of the file containing the filter
FILTER_THRESH # Threshold[s] for retina filtering
DEBLEND_NTHRESH 64 # Number of deblending sub-thresholds
DEBLEND_MINCONT 0.0005 # Minimum contrast parameter for deblending
CLEAN Y # Clean spurious detections? (Y or N)?
CLEAN_PARAM 0.5 # Cleaning efficiency
MASK_TYPE CORRECT # type of detection MASKing: can be one of
# NONE, BLANK or CORRECT
#-------------------------------- FLAGging -----------------------------------
FLAG_IMAGE flag.fits # filename for an input FLAG-image
FLAG_TYPE OR # flag pixel combination: OR, AND, MIN, MAX
# or MOST
#------------------------------ Photometry -----------------------------------
PHOT_APERTURES 10 # MAG_APER aperture diameter(s) in pixels
PHOT_AUTOPARAMS 2.5, 3.5 # MAG_AUTO parameters: <Kron_fact>,<min_radius>
PHOT_PETROPARAMS 2.0, 3.5 # MAG_PETRO parameters: <Petrosian_fact>,
# <min_radius>
PHOT_AUTOAPERS 0.0,0.0 # <estimation>,<measurement> minimum apertures
# for MAG_AUTO and MAG_PETRO
PHOT_FLUXFRAC 0.5 # flux fraction[s] used for FLUX_RADIUS
SATUR_LEVEL 65535.0 # level (in ADUs) at which arises saturation
SATUR_KEY safSATURATE # keyword for saturation level (in ADUs)
MAG_ZEROPOINT 0.0 # magnitude zero-point
MAG_GAMMA 7.0 # gamma of emulsion (for photographic scans)
GAIN 1.0 # detector gain in e-/ADU
GAIN_KEY asdfGAIN # keyword for detector gain in e-/ADU
PIXEL_SCALE 0 # size of pixel in arcsec (0=use FITS WCS info)
#------------------------- Star/Galaxy Separation ----------------------------
SEEING_FWHM 1.2 # stellar FWHM in arcsec
STARNNW_NAME /line17/Jundan/csst/c3_data/pro/csst_realtime.nnw # Neural-Network_Weight table filename
#------------------------------ Background -----------------------------------
BACK_TYPE AUTO # AUTO or MANUAL
BACK_VALUE 0.0 # Default background value in MANUAL mode
BACK_SIZE 256 # Background mesh: <size> or <width>,<height>
BACK_FILTERSIZE 3 # Background filter: <size> or <width>,<height>
BACKPHOTO_TYPE LOCAL # can be GLOBAL or LOCAL
BACKPHOTO_THICK 24 # thickness of the background LOCAL annulus
BACK_FILTTHRESH 0.0 # Threshold above which the background-
# map filter operates
#------------------------------ Check Image ----------------------------------
CHECKIMAGE_TYPE NONE # can be NONE, BACKGROUND, BACKGROUND_RMS,
# MINIBACKGROUND, MINIBACK_RMS, -BACKGROUND,
# FILTERED, OBJECTS, -OBJECTS, SEGMENTATION,
# or APERTURES
CHECKIMAGE_NAME check.fits # Filename for the check-image
#--------------------- Memory (change with caution!) -------------------------
MEMORY_OBJSTACK 3000 # number of objects in stack
MEMORY_PIXSTACK 300000 # number of pixels in stack
MEMORY_BUFSIZE 1024 # number of lines in buffer
#------------------------------- ASSOCiation ---------------------------------
ASSOC_NAME sky.list # name of the ASCII file to ASSOCiate
ASSOC_DATA 2,3,4 # columns of the data to replicate (0=all)
ASSOC_PARAMS 2,3,4 # columns of xpos,ypos[,mag]
ASSOCCOORD_TYPE PIXEL # ASSOC coordinates: PIXEL or WORLD
ASSOC_RADIUS 2.0 # cross-matching radius (pixels)
ASSOC_TYPE NEAREST # ASSOCiation method: FIRST, NEAREST, MEAN,
# MAG_MEAN, SUM, MAG_SUM, MIN or MAX
ASSOCSELEC_TYPE MATCHED # ASSOC selection type: ALL, MATCHED or -MATCHED
#----------------------------- Miscellaneous ---------------------------------
VERBOSE_TYPE NORMAL # can be QUIET, NORMAL or FULL
HEADER_SUFFIX .abcdhead # Filename extension for additional headers
WRITE_XML N # Write XML file (Y/N)?
XML_NAME sex.xml # Filename for XML output
XSL_URL file:///usr/local/share/sextractor/sextractor.xsl
# Filename for XSL style-sheet
NTHREADS 1 # 1 single thread
FITS_UNSIGNED N # Treat FITS integer values as unsigned (Y/N)?
INTERP_MAXXLAG 16 # Max. lag along X for 0-weight interpolation
INTERP_MAXYLAG 16 # Max. lag along Y for 0-weight interpolation
INTERP_TYPE ALL # Interpolation type: NONE, VAR_ONLY or ALL
#--------------------------- Experimental Stuff -----------------------------
PSF_NAME default.psf # File containing the PSF model
PSF_NMAX 1 # Max.number of PSFs fitted simultaneously
PATTERN_TYPE RINGS-HARMONIC # can RINGS-QUADPOLE, RINGS-OCTOPOLE,
# RINGS-HARMONICS or GAUSS-LAGUERRE
SOM_NAME default.som # File containing Self-Organizing Map weights
python3.8 run_astrom_csst.v5.py '/line17/Jundan/csst/c3_data/input_v3/MSC*fits'
-o /line17/Jundan/csst/c3_data/out_put/v5/ -df
This diff is collapsed.
...@@ -2,7 +2,10 @@ from collections import OrderedDict ...@@ -2,7 +2,10 @@ from collections import OrderedDict
import astropy.io.fits as fits import astropy.io.fits as fits
from astropy.io.fits import HDUList, PrimaryHDU, ImageHDU from astropy.io.fits import HDUList, PrimaryHDU, ImageHDU
from astropy.io.fits.header import Header from astropy.io.fits.header import Header
from csst.common.data import CsstData from ..common.data import CsstData
__all__ = ["CsstMscData", "CsstMscImgData"]
class CsstMscData(CsstData): class CsstMscData(CsstData):
......
#%% code
fp = "/Users/cham/projects/csst/test/MSC_MS_210527171000_100000279_16_raw.fits"
from csst.common.factory import CsstDataFactory
data = CsstDataFactory.createData(fp)
print(data)
print(data.get_l0keyword("pri", "INSTRUME"))
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