View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

Issues with mscgetcatalog

Erin Ryan wrote on Jul 01, 2009

Hi ya,
So I'm trying to do some astrometric corrections on some data, but am having issues even getting the USNOA2.0 catalog via mscgetcat. As per old notes I have, I do tell myself to run mscsetwcs on all the data before trying to grab the catalog by specifying
RA=ra
Dec=dec
Equinox=equinox

in my notes. And at that point a crval1 and crval2 should pop up in the headers. And then I have that I should run mscgetcat to get a catalog. Now I thought that maybe one of the catalog servers was having a hiccup so I tried both CADC and NOAO with the same result- a null catalog file.

Looking at the headers the crval1 and crval2 look reasonable so I don't understand what is wrong (though I'll give you it may all be user error ;) )

Here's a snippet of one of my headers:

ar01_0054_tz.fits[im1][2032,2032][real]: RU 152
No bad pixels, min=0., max=0. (old)
Line storage mode, physdim [2032,2032], length of user area 5427 s.u.
Created Tue 17:29:55 30-Jun-2009, Last modified Wed 16:22:26 01-Jul-2009
Pixel file "mar01_0054_tz.fits" [ok]
BSCALE = 1.000000E0 / REAL = TAPE*BSCALE + BZERO
BZERO = 3.276800E4 /
NEXTEND = 4 / Number of extensions
NCCDS = 1 / Number of CCDs
NAMPS = 4 / Number of amplifiers
DETSIZE = '[1:4064,1:4064]' / Detector size
CCDSUM = '1 1 ' / CCD pixel summing
RDNOISE8= '12. ' / Read noise (electrons) for amp 8
TIMESYS = 'UTC ' / Time system
PIXSCAL2= '0.45 ' / Pixel scale for axis 2 (arcsec/pixel)
DATE-OBS= '2009-03-02' / Date of observation
DARKTIME= 30.828 / Total elapsed time
PIXSCAL1= '0.45 ' / Pixel scale for axis 1 (arcsec/pixel)
ELEVAT = 51.8 / elevation
TIMEZONE= 7 / Local time zone
HA = '-01:14:38' / hour angle
DEC = '-01:59:55.9' / declination
EQUINOX = 2000. / equinox of RA and DEC
FOCUSVAL= '*1.265*1.335*1.389' / LVDT positions
LST-OBS = '06:13:29' / local siderial time
INSTRUME= '90prime ' / Instrument name
IMAGETYP= 'object ' / Image type
PIXSIZE1= '15.0 ' / Pixel size for axis 1 (microns)
PIXSIZE2= '15.0 ' / Pixel size for axis 2 (microns)
RA = '07:27:28.95' / right ascension
JULIAN = 2454892.6 / julian date
.
.
(lots of gain and readnoise info)
.
CRVAL1 = 111.87063
CRVAL2 = -1.998861

I've also tried to merge all 4 amps and use getcatalog and that has also resulted in an empty catalog file.

Any ideas what this user is doing wrong?

Thanks!
-Erin

Erin Ryan wrote on Jul 01, 2009

Okay so I seem to have nailed this down to an issue with the hidden task getcatalog. Somehow junk is getting passed to getcatalog as this is what the parameters look like after I've used mscgetcat:

images = List of images with common tangent point
ra = 71.346611111113 Field RA (hours)
dec = 1074.9615277778 Field DEC (degrees)
radius = 86168.032355393 Field radius (arcmin)
(magmin = 0.) Minimum magnitude
(magmax = 25.) Maximum magnitude
(rmin = 0.) Minimum radius (arcmin)
(catalog= NOAO:USNO-A2) Catalog
(output = junk) Output file
(radecsy= FK5) RA/DEC system for output
(equinox= 2000.) Equinox for output
(mode = al)

that ra and dec do not match what I have in the headers at all and that radius is far too huge as I type in 30 arcmin.

Again checked the headers with additional info previously chopped out listed below leaving me confused as to what is going on.

additional header info right before crval1 and crval2:
WCSDIM = 2
LTM1_1 = 1.
LTM2_2 = 1.
WAT0_001= 'system=physical'
WAT1_001= 'wtype=linear'
WAT2_001= 'wtype=linear'
TRIM = 'Jun 30 16:59 Trim is [1:2032,1:2032]'
CCDPROC = 'Jun 30 17:30 CCD processing done'
ZEROCOR = 'Jun 30 17:30 Zero is Zero.fits[im1]'

Erin Ryan wrote on Jul 01, 2009

And to reply to myself again. . .

the issue appears to be

WAT0_001= 'system=physical'
WAT1_001= 'wtype=linear'
WAT2_001= 'wtype=linear'

boo-urns.

if I edit those to read

WAT0_001= 'system=image'
WAT1_001= 'wtype=tan axtype=ra'
WAT2_001= 'wtype=tan axtype=dec'

getcatalog still has some junk values, but some that are closer to "normal" as it gets:

ra = 21.014748231189 Field RA (hours)
dec = 80.3789502358 Field DEC (degrees)
radius = 2772.6326927885 Field radius (arcmin)

Francisco Valdes wrote on Jul 01, 2009

Hello Erin,

The task MSCGETCATALOG is a high level task that determines the area of the sky you want coordinates from the image header WCS. If your data doesn't start with a WCS then you set one up and understand what a WCS consists of. MSCSETWCS does not create a WCS it adjusts one. Therefore you need to have keywords such as CTYPE1, CTYPE2, CRPIX1, CRPIX2, CD1_1, CD1_2, CD2_1, CD2_2, CRVAL1, and CRVAL2. What MSCSETWCS does is set the CRVAL keywords to values found in keywords giving the RA and DEC of the exposure. MSCSETWCS can also set a WCS from a "database" file which is the result of an astrometric fit. To learn more about WCS you can read the FITS papers on WCS (which are quite dense and complex) and

http://iraf.noao.edu/projects/ccdmosaic/astrometry/astrom.html

for an introduction to creating a WCS. Once you get a WCS setup, where a good test is to use ds9 or ximtool to show the RA/DEC and see if it makes sense for a source you know, then the rest of using MSCGETCATALOG should be straightforward.

If you want some reassurance or feedback once you think you have a reasonable WCS you can send me a full header listing to inspect and try out.

I hope this helps.

Yours,
Frank Valdes

I should also note that you might be able to get a rough WCS into your header fairly easily with one of the tasks in the IMCOORDS package; namely mkcwcs or wcsedit. In these you just need to be able to say things about the nominal RA and DEC, the scale (in arcsec per pixel) and the orientation on the sky with a position angle and handedness. Even a rough WCS created in this fashion will allow mscgetcatalog to work from which you can then proceed to something like msctpeak.

Last post on Jul 01, 2009