View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

fxcor error “Aperture list cannot be applied to templat

cjsifon wrote on Mar 15, 2010

Hi, I'm trying to get redshifts for some gemini-south spectra with fxcor using the SDSS template spectra and I get the following error:

Warning: setting CD2_2 to 1.
Aperture list cannot be applied to template image.

The parameters of fxcor as the default ones (see bottom). What is causing this and how can I fix it?

Thanks a lot!
Cristobal.
------------------------------------------
rv> lpar fxcor
objects = " " List of object spectra
templates = " " List of template spectra
(apertures = "1") Apertures to be used
(cursor = "") Graphics input cursor\n
(continuum = "both") Continuum subtract spectra?
(filter = "none") Fourier filter the spectra?
(rebin = "smallest") Rebin to which dispersion?
(pixcorr = no) Do a pixel-only correlation?
(osample = "a 4500 8000") Object regions to be correlated ('*' => all)
(rsample = "*") Template regions to be correlated
(apodize = 0.2) Apodize end percentage\n
(function = "gaussian") Function to fit correlation
(width = INDEF) Width of fitting region in pixels
(height = 0.) Starting height of fit
(peak = no) Is height relative to ccf peak?
(minwidth = 3.) Minimum width for fit
(maxwidth = 21.) Maximum width for fit
(weights = 1.) Power defining fitting weights
(background = 0.) Background level for fit
(window = INDEF) Size of window in the correlation plot
(wincenter = INDEF) Center of peak search window\n
(output = "fxcor") Root spool filename for output
(verbose = "long") Verbose output to spool file?
(imupdate = no) Update the image header?
(graphics = "stdgraph") Graphics output device\n
(interactive = yes) Interactive graphics?
(autowrite = yes) Automatically record results?
(autodraw = yes) Automatically redraw fit results?
(ccftype = "image") Output type of ccf\n
(observatory = "gemini-south") Observation location database
(continpars = "") Continuum processing parameters
(filtpars = "") Filter parameters pset
(keywpars = "") Header keyword translation pset\n
(mode = "ql")

Mike Fitzpatrick wrote on Mar 15, 2010

FXCOR currently only allows for 1-D templates, or 2-D templates where the aperture lists can be matched with the object. This specific error message happens when only one spectrum is found in the object, but the template appears to have more than one spectrum and the aperture list doesn't apply.

You can use the SLIST task to see how many spectra the code thinks are in the file, and perhaps then use SCOPY to copy out just the spectrum you're interested in. I'm not familiar with the SDSS spectral format, it could also be that the header has keywords that are confusing things. The warning about the missing CD2_2 keyword might imply a non-standard header, could you post a long listing?

cjsifon wrote on Mar 15, 2010

Thanks for the reply. I'll have a look at what you mentioned.

I'm sorry, what do you mean by long listing?

Cristobal.

Mike Fitzpatrick wrote on Mar 15, 2010

cl> imhead spec.fits long+


and send/post the output for each image.

cjsifon wrote on Mar 15, 2010

Thanks; here it is:

IMAGE:
estgs_mask5.fits[0][short]: SCSO_J053952.4-561423.3
No bad pixels, min=0., max=0. (old)
Line storage mode, physdim [0], length of user area 8586 s.u.
Created Mon 14:48:55 25-Jan-2010, Last modified Mon 12:36:03 01-Feb-2010
Pixel file "estgs_mask5.fits" [NO PIXEL FILE]
EXTEND = T / File may contain extensions
ORIGIN = 'NOAO-IRAF FITS Image Kernel July 2003' / FITS file originator
DATE = '2010-01-25T17:48:55' / Date FITS file was generated
IRAF-TLM= '2010-02-01T15:36:03' / Time of last modification
COMMENT FITS (Flexible Image Transport System) format defined in Astronomy and
COMMENT Astrophysics Supplement Series v44/p363, v44/p371, v73/p359, v73/p365.
COMMENT Contact the NASA Science Office of Standards and Technology for the
COMMENT FITS Definition document #100 and other FITS information.
INSTRUME= 'GMOS-S ' / Instrument used to acquire data
OBJECT = 'SCSO_J053952.4-561423.3' / Object Name
OBSTYPE = 'OBJECT ' / Observation type
OBSCLASS= 'science ' / Observe class
GEMPRGID= 'GS-2009B-Q-2' / Gemini programme ID
OBSID = 'GS-2009B-Q-2-8' / Observation ID / Data label
DATALAB = 'GS-2009B-Q-2-8-001' / DHS data label
OBSERVER= 'Soechting' / Observer
OBSERVAT= 'Gemini-South' / Name of telescope (Gemini-North|Gemini-South)
TELESCOP= 'Gemini-South' / Gemini-North
PARALLAX= 0. / Parallax of Target
RADVEL = 0. / Heliocentric Radial Velocity
EPOCH = 2000. / Epoch for Target coordinates
EQUINOX = 2000. / Equinox of coordinate system
TRKEQUIN= 2000. / Tracking equinox
SSA = 'Wenderoth' / SSA
RA = 84.96833333 / Right Ascension
DEC = -56.23980556 / Declination of Target
ELEVATIO= 62.7595361111111 / Current Elevation
AZIMUTH = 194.519084722222 / Current Azimuth
CRPA = -22.7877124315314 / Current Cass Rotator Position Angle
HA = '+00:47:55.11' / Telescope hour angle
LT = '02:49:36.3' / Local time at start of observation
TRKFRAME= 'FK5 ' / Tracking co-ordinate
DECTRACK= 0. / Differential tracking rate Dec
TRKEPOCH= 55161.224598 / Differential tracking reference epoch
RATRACK = 0. / Differential tracking rate RA
FRAME = 'FK5 ' / Target coordinate system
PMDEC = -0. / Proper Motion in Declination
PMRA = 0. / Proper Motion in RA
WAVELENG= 6700. / Effective Target Wavelength
RAWIQ = '85-percentile' / Raw Image Quality
RAWCC = '70-percentile' / Raw Cloud Cover
RAWWV = 'Any ' / Raw Water Vapour/Transparency
RAWBG = '50-percentile' / Raw Background
RAWPIREQ= 'YES ' / PI Requirements Met
RAWGEMQA= 'USABLE ' / Gemini Quality Assessment
CGUIDMOD= 'Basic ' / Carousel Mode
UT = '06:49:36.8' / UT at observation start
M2BAFFLE= 'VISIBLE ' / Position of M2 baffle
M2CENBAF= 'CLOSED ' / Position of M2 central hole baffle
ST = '06:28:01.4' / Sidereal time at the start of the exposure
XOFFSET = 1.58763117319 / Telescope offset in x in arcsec
YOFFSET = -4.08620829227 / Telescope offset in y in arcsec
POFFSET = -1.57956918062 / Telescope offset in p in arcsec
QOFFSET = 4.08933150448 / Telescope offset in q in arcsec
RAOFFSET= -1.57956918062 / Telescope offset in RA in arcsec
DECOFFSE= 4.08933150448 / Telescope offset in DEC in arcsec
RATRGOFF= 0. / Target offset in RA in arcsec
DECTRGOF= 0. / Target offset in DEC in arcsec
PA = 180. / Sky Position Angle at start of exposure
IAA = 359.887 / Instrument Alignment Angle
SFRT2 = -0.374 / Science fold rotation angle (degrees)
SFTILT = 45.48 / Science fold tilt angle (degrees)
SFLINEAR= -3. / Science fold linear position (mm)
AOFOLD = 'park-pos.' / AO Pick-Off Mirror Position
PWFS1_ST= 'parked ' / PWFS1 probe state (frozen,guiding,parked)
PWFS2_ST= 'parked ' / PWFS2 probe state (frozen,guiding,parked)
OIWFS_ST= 'guiding ' / OIWFS probe state (frozen,guiding,parked)
AOWFS_ST= 'parked ' / AOWFS probe state (frozen,guiding,parked)
OIARA = 85.0598125 / RA of OIWFS guide star
OIARV = 0. / OIWFS Heliocentric Radial Velocity
OIAWAVEL= 6500. / OIWFS Effective Target Wavelength
OIADEC = -56.23974722 / Declination of OIWFS guide star
OIAEPOCH= 2000. / Epoch for OIWFS guide star coordinates
OIAEQUIN= 2000. / Equinox for OIWFS guide star coordinates
OIAFRAME= 'FK5 ' / OIWFS Target co-ordinate system
OIAOBJEC= '07197904' / Object Name for OIWFS, Chop A
OIAPMDEC= 0. / OIWFS Proper Motion in Declination
OIAPMRA = 0. / OIWFS Proper Motion in RA
OIAPARAL= 0. / OIWFS Parallax of Target
HUMIDITY= 21. / The Relative Humidity (fraction, 0..101).
TAMBIENT= 14.3 / The ambient temp (C).
TAMBIEN2= 57.74 / The ambient temp (F).
PRESSURE= 546.95412 / The atmospheric pressure (mm Hg).
PRESSUR2= 72900. / The atmospheric pressure (Pa).
DEWPOINT= -7.9 / The dew point (C).
DEWPOIN2= 17.78 / The dew point (F).
WINDSPEE= 5. / The wind speed (m/s).
WINDSPE2= 11.185 / The wind speed (mph).
WINDDIRE= 311. / The wind direction (degrees).
INPORT = 3 / Number of ISS port where GMOS was located
GMOSCC = 'GMOS-CP (7-1)' / GMOS components controller s/w
CONID = 'GMOS v6.0' / Detector controller ID
DETECTOR= 'GMOS + Blue1 + new CCD1' / Detector name
DEWAR = 'Cryostat B' / Dewar name
DEW-TEMP= -113.082942097027 / Dewar temperature (Celsius)
DETSIZE = '[1:6144,1:4644]' / Detector size
NCCDS = 3 / Number of CCD chips
NAMPS = 1 / Number of amplifiers
SHUTTER = 'OPEN ' / Shutter state during observation
AMPINTEG= 5000 / Amplifier integration time
OBSEPOCH= 2009.9022161741 / Epoch at start of exposure
TIMESYS = 'UT1 ' / Time system used
DATE-OBS= '2009-11-26' / UT Date of observation (YYYY-MM-DD)
TIME-OBS= '06:50:14.0' / Time of observation
GMOSTHT = 'GOOD ' / Shutter health
NSUBEXP = 1 / Number of sub exposures
UTSTART = '06:50:14.0' / UT at observation start
UTEND = '07:20:14.5' / UT at observation end
EXPTIME = 1800.46567893028 / Exposure time in seconds
ELAPSED = 1800.46567893028 / Elapsed observation time in seconds
DARKTIME= 1837.38110589981 / Dark current integration in seconds
MASKID = 11000205 / Mask/IFU barcode
MASKNAME= 'GS2009BQ002-05' / Mask name
MASKTYP = 1 / Mask/IFU type (0=none/-1=IFU/1=mask)
MASKLOC = 0 / Mask/IFU location (-1=unknown/0=FP/1=cassette)
FILTER1 = 'open1-6 ' / Filter 1 name
FILTID1 = 20000033 / Filter 1 barcode
FILTER2 = 'open2-8 ' / Filter 2 name
FILTID2 = 20000041 / Filter 2 barcode
GRATING = 'R400+_G5325' / Grating name
GRATID = 30000019 / Grating barcode
GRWLEN = 670. / Grating wavelength at slit (nm)
CENTWAVE= 670. / Central wavelength (nm)
GRORDER = 1 / Grating order
GRTILT = 56.4975 / Grating tilt angle (degrees)
GRSTEP = 5984.8871 / Requested grating motor step position
DTAX = 65.6 / Detector translation X position (microns)
DTAY = 128.64 / Detector translation Y position (microns)
DTAZ = 2696. / Detector translation Z position (microns)
DTAZST = 2696. / Focus at observation start (microns)
DTAZEN = 2696. / Focus at observation end (microns)
DTAZME = 0. / Mean focus during observation (microns)
DTMODE = 'FOLLOW ' / Detector translation stage mode
ADCMODE = ' ' / ADC mode
GMOSDC = 'GMOS DC ' / GMOS detector controller s/w
DETTYPE = 'SDSU II CCD' / Detector array type
DETID = 'EEV2037-06-03EEV8194-19-04EEV8261-07-04' / Chip IDs
EXPOSURE= 1800. / Requested exposure time in seconds
ADCUSED = 1 / ADC used? (0=yes/1=no)
DETNROI = 1 / No. regions of interest
ADCENPST= 0. / Start entrance prism angle of ADC
ADCENPEN= 0. / End entrance prism angle of ADC
ADCENPME= 0. / Mean entrance prism angle of ADC
ADCEXPST= 0. / Start exit prism angle of ADC
ADCEXPEN= 0. / End exit prism angle of ADC
ADCEXPME= 0. / Mean exit prism angle of ADC
ADCWLEN1= 0. / Lower wavelength for ADC calculation
ADCWLEN2= 0. / Upper wavelength for ADC calculation
DETRO1X = 1 / ROI 1 X start
DETRO1XS= 3072 / ROI 1 X size
DETRO1Y = 1 / ROI 1 Y start
DETRO1YS= 2304 / ROI 1 Y size
AIRMASS = 1.135 / Mean airmass for the observation
AMSTART = 1.124 / Airmass at start of exposure
AMEND = 1.147 / Airmass at end of exposure
RELEASE = '2011-05-26' / End of proprietary period YYYY-MM-DD
NSCIEXT = 18 / Number of science extensions
PIXSCALE= 0.146 / Pixel scale in Y in arcsec/pixel
NEXTEND = 1 / Number of extensions
OBSMODE = 'MOS ' / Observing mode (IMAGE|IFU|MOS|LONGSLIT)
GEM-TLM = '2010-02-01T16:35:51' / UT Last modification with GEMINI
GPREPARE= '2010-01-25T18:48:55' / UT Time stamp for GPREPARE
TRIMMED = 'yes ' / Overscan section trimmed
GGAIN = '2010-01-25T18:48:59' / UT Time stamp for GGAIN
BIASIM = 'gS20091124S0184_bias' / Bias image used by GIREDUCE
GIREDUCE= '2010-01-25T18:48:59' / UT Time stamp for GIREDUCE
CTYPE1 = 'RA---TAN' / R.A. in tangent plane projection
CTYPE2 = 'DEC--TAN' / DEC. in tangent plane projection
CRPIX1 = 1555.0687161197 / Ref pix of axis 1
CRPIX2 = 1152.0445628215 / Ref pix of axis 2
CRVAL1 = 84.969123062231 / RA at Ref pix in decimal degrees
CRVAL2 = -56.2409417390556 / DEC at Ref pix in decimal degrees
CD1_1 = 4.05871910394673E-05 / WCS matrix element 1 1
CD1_2 = 1.23922722864254E-08 / WCS matrix element 1 2
CD2_1 = -2.59943375269246E-08 / WCS matrix element 2 1
CD2_2 = 4.05714347124621E-05 / WCS matrix element 2 2
CCDSUM = '2 2 ' / CCD sum
GAIN = 1. / Amplifier gain
GAINMULT= 2.076 / Gain multiplication
RDNOISE = 3.85 / Readout noise
RADECSYS= 'FK5 ' / R.A./DEC. coordinate system reference
EQUINOX = 2000. / Equinox of coordinate system
MJD-OBS = 55161.2852235186 / MJD of start of obseration
DISPAXIS= 1 / Dispersion Axis
GMOSAIC = '2010-01-25T18:49:03' / UT Time stamp for GMOSAIC
GMSINTER= 'linear ' / Interpolant used by GMOSAIC
WMEF = '2010-02-01T16:30:59' / UT Time stamp for WMEF
GSFLATIM= 'S20091126S0153_flat.fits' / Flatfield Image used by gsreduce
GSCUT = '2010-01-25T18:49:07' / UT Time stamp for GSCUT
GSAPPWAV= '2010-01-25T18:49:10' / UT Time stamp for GSAPPWAVE
GSREDUCE= '2010-01-25T18:49:10' / UT Time stamp for GSREDUCE
GSTRANSF= '2010-02-01T14:07:24' / UT Time stamp for GSTRANSFORM
GSSKYSUB= '2010-02-01T15:11:22' / UT Time stamp for GSSKYSUB
GSEXTRAC= '2010-02-01T16:35:51' / UT Time stamp for GSEXTRACT

TEMPLATE:
sp-023.fit[4197,4][real]:
No bad pixels, min=0., max=0. (old)
Line storage mode, physdim [4197,4], length of user area 1215 s.u.
Created Fri 18:06:35 21-Jan-2005, Last modified Fri 11:06:43 21-Jan-2005
Pixel file "sp-023.fit" [ok]
EXTEND = T / File may contain extensions
ORIGIN = 'NOAO-IRAF FITS Image Kernel July 2003' / FITS file originator
DATE = '2005-01-21T21:06:35' / Date FITS file was generated
IRAF-TLM= '11:06:43 (21/01/2005)' / Time of last modification
PIXMIN = 0.00000000000000E+00 / Place Holder
PIXMAX = 3.55400000000000E+03 / Place Holder
NWORDER = 2 / Linear-log10 coefficients
WFITTYPE= 'LOG_LINEAR' / Linear-Log10 dispersion
VERS_1D = 'not1d ' / Version of Spectro1d
COEFF0 = 3.54406800000000E+00 / Center wavelength (log10) of first pi
COEFF1 = 1.00000000000000E-04 / Log10 dispersion per pixel
CRVAL1 = 3.54406800000000E+00 / Iraf zero point
CD1_1 = 1.00000000000000E-04 / Iraf dispersion
1D_PDATE= '09/18/03:12:51:44' / 1D Processing/last Modification date
SPEC_CLN= 2 / Spectral Classn
VEL_DIS = 0.00000000000000E+00 / Velocity dispersion (km/s)
VEL_DISE= 0.00000000000000E+00 / Error on Velocity Dispersion (km/s)
Z = -3.4000000000000E-05 / Final redshift
Z_ERR = 6.50000000000000E-06 / Redshift error
Z_CONF = 1.00000000000000E+00 / Redshift confidence
Z_STATUS= 9 / Redshift Status
Z_WARNIN= 0 / Redshift Warning Flags
ECLASS = -9.9900000000000E+02 / galaxy classification parameter
ECOEFF1 = -9.9900000000000E+02 / 1st expansion coefficient
ECOEFF2 = -9.9900000000000E+02 / 2nd expansion coefficient
ECOEFF3 = -9.9900000000000E+02 / 3rd expansion coefficient
ECOEFF4 = -9.9900000000000E+02 / 4th expansion coefficient
ECOEFF5 = -9.9900000000000E+02 / 5th expansion coefficient
DC-FLAG = 1
CTYPE1 = 'LINEAR '

Thanks again.

Cristóbal.

Mike Fitzpatrick wrote on Mar 15, 2010

The error message comes from the fact that the image is 2-d (4197x4) but there is a partial description of the WCS for a 1-D spectrum. Setting the CD2_2 value to one basically means there is no WCS along the second axis, but there are also no keywords to indicate what the 4 rows represent. If the spectrum itself is on row 1 then you can use an image section to make the file appear as a 1-D spec, e.g. "sp-023.fit[*,1]".

The object header you sent is is for the primary header of an MEF file, and it contains an equatorial WCS for a 2-D image and not a spectrum. Presumably the spectrum is in an extension, so you'll need to be sure to include the extension name when passing it to the FXCOR task. Even is this extension contains a multispec format spectrum, you should be able to correlate each aperture against the onedspec template given with the section, or else the aperture parameter would apply only to the object.

You might also look at the SCOPY task as a way to pull out the spectra and apertures into simpler image files. Hope this helps.

Last post on Mar 15, 2010