automatic astrometry with idl - · pdf fileautomatic astrometry with idl v 1.0 (19-apr-2013)...

15
                                                           __________________________________________________________________________      OSSERVATORIO ASTROFISICO DI CATANIA Automatic Astrometry with IDL V 1.0 (19-Apr-2013) R. Zanmar Sanchez (1) , G. Leto (1) , P. Bruno (1) (1) INAF – Osservatorio Astrofisico di Catania Rapporti interni e tecnici N.1 /2013 INAF - Osservatorio Astrofisico di Catania Via Santa Sofia, 78  I-95123 Catania, Italy     Tel.: +39- 095-7332 111   Fax: +39-095-330592 Sede “Mario G.Fracastoro” (Etna) – Tel +39-095-911580   Fax+39-095-916184 www.oact.inaf.it - [email protected]

Upload: phunglien

Post on 17-Feb-2018

221 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Automatic Astrometry with IDL - · PDF fileAutomatic Astrometry with IDL V 1.0 (19-Apr-2013) R. Zanmar Sanchez(1), G. Leto(1), P. Bruno(1) (1) INAF – Osservatorio Astrofisico di

                                                              __________________________________________________________________________

     OSSERVATORIO ASTROFISICO DI CATANIA

Automatic Astrometry with IDL

V 1.0 (19-Apr-2013)

R. Zanmar Sanchez(1), G. Leto(1), P. Bruno(1)

(1) INAF – Osservatorio Astrofisico di Catania

Rapporti interni e tecniciN.1 /2013

INAF ­ Osservatorio Astrofisico di Catania Via Santa Sofia, 78  I­95123 Catania, Italy     Tel.: +39­ 095­7332 111   Fax: +39­095­330592

Sede “Mario G.Fracastoro” (Etna) – Tel +39­095­911580   Fax+39­095­916184www.oact.inaf.it ­ [email protected]

Page 2: Automatic Astrometry with IDL - · PDF fileAutomatic Astrometry with IDL V 1.0 (19-Apr-2013) R. Zanmar Sanchez(1), G. Leto(1), P. Bruno(1) (1) INAF – Osservatorio Astrofisico di

                                                              __________________________________________________________________________

     OSSERVATORIO ASTROFISICO DI CATANIA

Abstract

A software package to automatically astrometrize images was developed in IDL. The program is successfully used by the software that controls the robotic APT2 telescope in order to identify targets and center them on the field as necessary.

Introduction

The robotic APT2 telescope, like many other telescopes, has accuracy problems when it points targets. The usual human approach to solve this problem is to have at hand star finding charts to visually recognize and center the field of interest. APT2 however, is meant to be a fully automated telescope capable of being operated remotely. Therefore, an automatic approach for recognizing the field had to be implemented in the software. Since the Visual Basic code that currently drives the telescope can communicate well with the scripting language IDL, we have chosen this as our programming platform given the large number of astronomical routines already available.

Matching stars

In order to automatically recognize the field, we need to solve the problem of matching two sets of two-dimensional coordinates, e. g. a catalog in the standard RA, DEC celestial coordinate system, and the observed stars in the image with pixel coordinates.

The problem was tackled by Groth (1986), who pointed out that triangles are a convenient geometric pattern that remains invariant under similarity transformations, e.g. translation, inversion, magnification and rotation. We therefore need to generate a set of triangles from each list of stars, and then cross-reference the stars that form the matched triangles. The final step is then to find the transformation from one coordinate system (pixels) to the other (celestial coordinates). One can then match even more stars by simply using the geometric transformation to match points that are sufficiently close. With more matched stars, an improved transformation can be found.

Ideally, to maximize the number of matched triangles and stars, one would like to have exactly the same stars on both lists. In practice this is hard to achieve because catalogs might not have uniform sky coverage (e.g. some regions of the sky are observed to different depths), catalogs can be observed with different

INAF ­ Osservatorio Astrofisico di Catania Via Santa Sofia, 78  I­95123 Catania, Italy     Tel.: +39­ 095­7332 111   Fax: +39­095­330592

Sede “Mario G.Fracastoro” (Etna) – Tel +39­095­911580   Fax+39­095­916184www.oact.inaf.it ­ [email protected]

Page 3: Automatic Astrometry with IDL - · PDF fileAutomatic Astrometry with IDL V 1.0 (19-Apr-2013) R. Zanmar Sanchez(1), G. Leto(1), P. Bruno(1) (1) INAF – Osservatorio Astrofisico di

                                                              __________________________________________________________________________

     OSSERVATORIO ASTROFISICO DI CATANIA

filters so stars that are bright in the catalog are not necessarily as bright in our chosen band at the telescope, different fields of view, etc. Due to this important drawback, generating all possible triangles from each list can create many false matches due to the large number of triangles.

Important improvements over the work of Groth (1986) were reported by Pal & Bakos (2008). In particular, rather than creating all possible triangles for each list, they propose to generate Delaunay triangulations of different levels reducing the number of triangles from ~N^3 to ~N where N is the number of points. Having less triangles is desirable not only because it optimizes computer time and avoids mismatches, but because Delaunay triangulation by definition discards large triangles formed by stars on the outskirts of the field which are the most affected by possible geometric distortions.

Pal & Bakos (2008) also introduce a new “continuous” triangle space that has the advantage of spreading out the generated triangles (see Figure 1.) which in turn helps out in uniquely match triangles.

Figure 1.

We reproduce here Figure 2. of  Pal & Bakos (2008) that shows the continuous triangle space. Basically, triangles are mapped to this space by using the length of their three sides. Note that equilateral triangles are at the center and isosceles triangles are along the x­axis. This will be important when discarding problematic triangles (read below).

INAF ­ Osservatorio Astrofisico di Catania Via Santa Sofia, 78  I­95123 Catania, Italy     Tel.: +39­ 095­7332 111   Fax: +39­095­330592

Sede “Mario G.Fracastoro” (Etna) – Tel +39­095­911580   Fax+39­095­916184www.oact.inaf.it ­ [email protected]

Page 4: Automatic Astrometry with IDL - · PDF fileAutomatic Astrometry with IDL V 1.0 (19-Apr-2013) R. Zanmar Sanchez(1), G. Leto(1), P. Bruno(1) (1) INAF – Osservatorio Astrofisico di

                                                              __________________________________________________________________________

     OSSERVATORIO ASTROFISICO DI CATANIA

UCAC 3 Catalog

Our choice for a reference catalog of celestial coordinates of stars was the UCAC 3 catalog by Zacharias et. al. (2010). This catalog covers all the sky, it is freely available on-line and has more than sufficient depth (16th magnitude) for our purposes. Although there are other catalogs available online, it was important for us to have one fully available on disk to avoid problems should an internet connection not be available at the time of the observations. The UCAC 3 catalog is organized in 360 binary files, one for each integer declination angle. There is also an index file with the records that contain stars with a particular right ascension. We have adapted routines written by D. Schlegel that access the UCAC 2 catalog. We have also greatly increased the speed of the IDL routines (an order of magnitude) by using a binary version of the index file.

The UCAC 3 catalog has the minor disadvantage of being observed with a non-standard broad band filter which is somewhere between the Johnson V and R filters. Ideally one would like to observe with the same filter so as to have the same 30 brightest stars in both the catalog and at the telescope. In practice however this is impossible, so we have chosen to observe with the R filter because it takes less time to reach a given depth. The current set exposure time for the image taken at the telescope with the purpose of recognizing the field is 20 seconds but we have used as little as 10 seconds with equal success. We have chosen the former exposure time during commissioning because the telescope might not always be optimally focused.

The IDL procedure apt2_offset.pro

The main driving program is called apt2_offset.pro. Appendix A has a small manual with parameters and usage of this procedure and its companion matchxyxy.pro.

This routine is in charge of preparing the data needed for matching stars and of calculating the centering error (offset) of the telescope from the desired target. In particular, apt2_offset will execute the following steps:

- Find all stars in the image above a certain threshold (currently set to 3-σ). It only takes into account the 30 brightest stars in the field if available (we need at least 3 stars to produce a triangle). apt2_offset will also discard stars that are too close to each other (currently set to 10 arcsec) to avoid mismatched stars.

INAF ­ Osservatorio Astrofisico di Catania Via Santa Sofia, 78  I­95123 Catania, Italy     Tel.: +39­ 095­7332 111   Fax: +39­095­330592

Sede “Mario G.Fracastoro” (Etna) – Tel +39­095­911580   Fax+39­095­916184www.oact.inaf.it ­ [email protected]

Page 5: Automatic Astrometry with IDL - · PDF fileAutomatic Astrometry with IDL V 1.0 (19-Apr-2013) R. Zanmar Sanchez(1), G. Leto(1), P. Bruno(1) (1) INAF – Osservatorio Astrofisico di

                                                              __________________________________________________________________________

     OSSERVATORIO ASTROFISICO DI CATANIA

- Generate a list of catalog stars which is equal to the number of stars found in the image. Typically, the UCAC 3 catalog is deeper than the “re-centering” image taken at the telescope so we usually trim down the catalog to match the number of observed stars. Here we also remove close neighbors from bright stars as we did for the observed stars. The first tests with the software revealed that it is much better to transform the coordinates of catalog stars onto pixel coordinates (using the initial telescope pointing) rather than to transform the observed stars coordinates to celestial coordinates. Working in pixels produces many more matched triangles and stars.

- Call matchxyxy.pro (see Appendix A). This procedure is the one in charge of actually matching the two groups of stars. Before calling matchxyxy, apt2_offset decides if we need delaunay triangulation, extended delaunay triangulation or full triangulation according to the number of available stars in the image. Currently, the procedure is set to find extended delaunay triangles only if the available number of stars in the field is less than 10 and greater than 3.

- Finally, apt2_offset uses the geometrical transformation found by matchxyxy to find the true center of the image and therefore, the true pointing position of the telescope. With this, an offset in arcminutes is calculated and returned so that the telescope can center the target. It is often possible to serendipitously match stars, simply because sometimes there are so many of them. We therefore use the know pixel scale of APT2's CCD to discard false positive solutions and produce an error flag for those cases. Appendix B describes this and many more possible exit errors.

Example

We now illustrate the usage of the software with an example. We run apt2_offset on an image taken at APT2 on the night of August 14, 2012. As we can see in Figure 2., in this case there are plenty of stars to chose from. We have circled the 30 brightest stars selected by apt2_offset that will be used for matching against the UCAC 3 catalog. The target variable star has id 3 and is clearly off-center.

INAF ­ Osservatorio Astrofisico di Catania Via Santa Sofia, 78  I­95123 Catania, Italy     Tel.: +39­ 095­7332 111   Fax: +39­095­330592

Sede “Mario G.Fracastoro” (Etna) – Tel +39­095­911580   Fax+39­095­916184www.oact.inaf.it ­ [email protected]

Page 6: Automatic Astrometry with IDL - · PDF fileAutomatic Astrometry with IDL V 1.0 (19-Apr-2013) R. Zanmar Sanchez(1), G. Leto(1), P. Bruno(1) (1) INAF – Osservatorio Astrofisico di

                                                              __________________________________________________________________________

     OSSERVATORIO ASTROFISICO DI CATANIA

Figure 2.

Since there are plenty of stars, matchxyxy chooses delaunay triangles as seen in Figure 3 (left). We also generate triangles for the stars in the catalog, see Figure 3 (right). Note that the stars in the catalog are not necessarily the same because we don't know exactly where the telescope is pointing. Also, the catalog was observed in a different band. For this reason, triangles are not exactly the same but we hope to have at least one triangle that matches.

INAF ­ Osservatorio Astrofisico di Catania Via Santa Sofia, 78  I­95123 Catania, Italy     Tel.: +39­ 095­7332 111   Fax: +39­095­330592

Sede “Mario G.Fracastoro” (Etna) – Tel +39­095­911580   Fax+39­095­916184www.oact.inaf.it ­ [email protected]

Page 7: Automatic Astrometry with IDL - · PDF fileAutomatic Astrometry with IDL V 1.0 (19-Apr-2013) R. Zanmar Sanchez(1), G. Leto(1), P. Bruno(1) (1) INAF – Osservatorio Astrofisico di

                                                              __________________________________________________________________________

     OSSERVATORIO ASTROFISICO DI CATANIA

Figure 3.

Visually it is not obvious which triangles are the same but we can represent each triangle in a triangle space and match them numerically there. Using equation 5 through 12 in Pal & Bakos (2008), each one of the 48 triangles derived from the observed stars (big rhombi) and the 47 triangles derived from the catalog stars (small rhombi) is uniquely represented in Figure 4. From all those triangles, only 4 have been matched and are circled in red.

The final step is to use those matched triangles to match stars. We know the relative lengths of the sides of the triangles, so we can use that to match triangle sides and then stars. We have seen that it is important to discard triangles near the x-axis in triangles space, e.g. isosceles triangles (see Figure 1.) because a small difference in position in either the catalog or in the image can change the triangle sides ordering.

INAF ­ Osservatorio Astrofisico di Catania Via Santa Sofia, 78  I­95123 Catania, Italy     Tel.: +39­ 095­7332 111   Fax: +39­095­330592

Sede “Mario G.Fracastoro” (Etna) – Tel +39­095­911580   Fax+39­095­916184www.oact.inaf.it ­ [email protected]

Page 8: Automatic Astrometry with IDL - · PDF fileAutomatic Astrometry with IDL V 1.0 (19-Apr-2013) R. Zanmar Sanchez(1), G. Leto(1), P. Bruno(1) (1) INAF – Osservatorio Astrofisico di

                                                              __________________________________________________________________________

     OSSERVATORIO ASTROFISICO DI CATANIA

Figure 4.

Once a few stars have been cross-matched, a geometrical transformation between the 2 sets of coordinates is derived. Note that this transformation is an intermediate one in that it is a transformation from going to image pixels to catalog pixels derived from the initial approximate telescope pointing. In Figure 5. (left) we see the stars that have been matched by matching triangles only. We can use the initial transformation to match even more stars by simply taking those stars that are within a searching radius (3 arcseconds in our case). With this method we match even more stars and find a refined geometric transformation (see Figure 5. right).

Since the match was successful, we now know the real celestial coordinates of many stars on our frame. We use this information to find the celestial coordinates of the center of the frame and calculate an offset between the target and the current center. With this values, the telescope is re-centered. Figure 6. shows the desired result, the target is at the center of the field. Compare to the initial pointing shown in Figure 2. The actual offset in this case was -3.397182 arcmin in RA and -1.349570 arcmin DEC but we have been able to correct for

INAF ­ Osservatorio Astrofisico di Catania Via Santa Sofia, 78  I­95123 Catania, Italy     Tel.: +39­ 095­7332 111   Fax: +39­095­330592

Sede “Mario G.Fracastoro” (Etna) – Tel +39­095­911580   Fax+39­095­916184www.oact.inaf.it ­ [email protected]

Page 9: Automatic Astrometry with IDL - · PDF fileAutomatic Astrometry with IDL V 1.0 (19-Apr-2013) R. Zanmar Sanchez(1), G. Leto(1), P. Bruno(1) (1) INAF – Osservatorio Astrofisico di

                                                              __________________________________________________________________________

     OSSERVATORIO ASTROFISICO DI CATANIA

pointing errors as large as ~6 arcminutes. The program takes only a few seconds to execute.

Figure 5.

We have also extensively used the software to astrometrize over 6000 images taken with the SAAO telescope under the ongoing RACE-OC project that studies the rotation and activity of stars in open clusters. This data set was particularly challenging due to the reduced field of view that can be as small as 2.5 arcminutes (compare to APT2's 19 arcmin FOV). A number of bugs fixes and improvements were made during the reduction of SAAO's data.

The program could also be used to alert APT2's software of cloudy skies should the number of detected stars be anomalously low compared to the number of stars in the catalog (after accounting for differences in depth).

INAF ­ Osservatorio Astrofisico di Catania Via Santa Sofia, 78  I­95123 Catania, Italy     Tel.: +39­ 095­7332 111   Fax: +39­095­330592

Sede “Mario G.Fracastoro” (Etna) – Tel +39­095­911580   Fax+39­095­916184www.oact.inaf.it ­ [email protected]

Page 10: Automatic Astrometry with IDL - · PDF fileAutomatic Astrometry with IDL V 1.0 (19-Apr-2013) R. Zanmar Sanchez(1), G. Leto(1), P. Bruno(1) (1) INAF – Osservatorio Astrofisico di

                                                              __________________________________________________________________________

     OSSERVATORIO ASTROFISICO DI CATANIA

Figure 6.

Conclusion

We have developed a software package in IDL for matching two lists of stars in arbitrary coordinate systems. The match is done by first matching triangles which are invariant under similarity transformations. We use this code at the APT2 telescope to automatically recognize the observed field and re-center the frame as needed. We have also extensively tested and used this program to automatically astrometrize thousands of images observed with the SAAO telescope.

INAF ­ Osservatorio Astrofisico di Catania Via Santa Sofia, 78  I­95123 Catania, Italy     Tel.: +39­ 095­7332 111   Fax: +39­095­330592

Sede “Mario G.Fracastoro” (Etna) – Tel +39­095­911580   Fax+39­095­916184www.oact.inaf.it ­ [email protected]

Page 11: Automatic Astrometry with IDL - · PDF fileAutomatic Astrometry with IDL V 1.0 (19-Apr-2013) R. Zanmar Sanchez(1), G. Leto(1), P. Bruno(1) (1) INAF – Osservatorio Astrofisico di

                                                              __________________________________________________________________________

     OSSERVATORIO ASTROFISICO DI CATANIA

Appendix A. User Manual.

We reproduce here the manual written in the header of the two most important procedures: apt2_offset and matchxyxy.

apt2_offset.pro

;+ ; NAME: ;   apt2_offset() ; ; PURPOSE: ;   Return the pointing offset in arcminutes for the APT2 (SLN). ; ; CALLING SEQUENCE: ;   outdat = apt2_offset( fitsfile, [ /print, /plot, /regions, INFO =info,;            OUTFITS = outfits, DECOFFSET = decoffset0, RAOFFSET = raoffset0 ] ) ; ; INPUTS: ;   fitsfile:       APT2 observed fits file, bin2 mode in R or V band. ; ; OPTIONAL INPUTS: ;   /print:         Verbose mode will print to the screen a lot of details. ;   /plot:          Create plots to inspect the matching procedure. Note that ;                 the routine pauses after a new plot is created. ;   /regions:       Creates ds9 regions of the UCAC3 catalog and stars in the ;                 image. ;   outfits:        A filename to save the astrometrized image.;   RA_OFFSET, DEC_OFFSET:      initial offset in RA and DEC. Default are set to ;                 0 but can be used if the image center is way off.; ; OUTPUT: ;   outdat     ­ Float 4 element vector with: ;                0 ) flag. 0 if success, negative if it failed. See COMMENTS: ;                1 ) number of stars found in the image. Can help to decide if ;                    it is cloudy.;                2 ) delta_ra, pointing offset in RA (arcmin). ;                    delta_ra = ( ra0_new ­ ra0_old ) * mcos * 60 ;                           mcos = cos( ( dec0_new + dec0_old ) / 2 ) ;                           ra0_new/old  = new and old ra center in deg. ;                           dec0_new/old = new and old dec center in deg. ;                3 ) delta_dec, pointing offset in DEC (arcmin). ;                    delta_dec = ( dec_new ­ dec_old ) * 60 ; OPTIONAL OUTPUTS: ;   info:           A structure with many details for debugging purposes. ; ; COMMENTS: ;   This routine matches stars in the image to those in the UCAC3 catalog to ; find an astrometric plate solution good to a few arcseconds. Steps taken are: ;   ­ detects stars in the image 3 sigma above the sky. ;   ­ removes stars that are closer than 10 arcsec to each other. This avoids 

INAF ­ Osservatorio Astrofisico di Catania Via Santa Sofia, 78  I­95123 Catania, Italy     Tel.: +39­ 095­7332 111   Fax: +39­095­330592

Sede “Mario G.Fracastoro” (Etna) – Tel +39­095­911580   Fax+39­095­916184www.oact.inaf.it ­ [email protected]

Page 12: Automatic Astrometry with IDL - · PDF fileAutomatic Astrometry with IDL V 1.0 (19-Apr-2013) R. Zanmar Sanchez(1), G. Leto(1), P. Bruno(1) (1) INAF – Osservatorio Astrofisico di

                                                              __________________________________________________________________________

     OSSERVATORIO ASTROFISICO DI CATANIA

;     confusion when matching stars. ;   ­ picks the 30 brightest stars if available (if less than 3 are found, ;     the routine can't match stars). ;   ­ finds the 30 brightest stars in the UCAC3 catalog on a circle with the ;     same FOV as the APT2 and centered on the reported center in the fits ;     image header (CRVALx). ;   ­ calls matchxyxy to match the two sets of stars and uses the transformation ;     to find an updated WCS. With this, the real center of the image is found ;     within a few arcseconds and the offsets are returned. ; ; EXAMPLES: ;   a = apt2_offset( 'myimage.fits' ) ;   a = apt2_offset( 'myimage.fits', /print, /plot, /regions, INFO = st ) ; ; BUGS: ; ; PROCEDURES CALLED: ;   readfits() ;   sxaddpar ;   sxpar() ;   ucac_read() ;   write_ds9reg ;   uncrowded_stars() ;   adxy ;   im_skysigma() ;   find ;   matchxyxy ;   distortxy ;   xyad ;   starast ;   writefits ;; REVISION HISTORY:;   05­Oct­2011  I was implicitly assuming that we have always more Catalog ;               stars than image stars. This need not be true. Now I compare;               the number of stars only until I have both image/catalog and set;               them equal for matching.;   20­Dec­2010  Written by             Ricardo Zanmar Sanchez, INAF­Catania ;­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ 

matchxyxy.pro;+ ; NAME: ;   matchxyxy ; ; PURPOSE: ;   Match two lists of point coordinates. ; ; CALLING SEQUENCE: 

INAF ­ Osservatorio Astrofisico di Catania Via Santa Sofia, 78  I­95123 Catania, Italy     Tel.: +39­ 095­7332 111   Fax: +39­095­330592

Sede “Mario G.Fracastoro” (Etna) – Tel +39­095­911580   Fax+39­095­916184www.oact.inaf.it ­ [email protected]

Page 13: Automatic Astrometry with IDL - · PDF fileAutomatic Astrometry with IDL V 1.0 (19-Apr-2013) R. Zanmar Sanchez(1), G. Leto(1), P. Bruno(1) (1) INAF – Osservatorio Astrofisico di

                                                              __________________________________________________________________________

     OSSERVATORIO ASTROFISICO DI CATANIA

;   matchxyxy, x1, y1, x2, y2, coeff, [INFO = info, TOL = tol,  TRIANGTYPE = ;              triangtype, ORDER = order, /print, /plot, /regions] ) ; ; INPUTS: ;   x1, y1      vectors with x and y coordinates for points in list 1 ;   x2, y2      vectors with x and y coordinates for points in list 2 ; ; OPTIONAL INPUTS: ;   TOL         A tolerance for matching triangles in their space. Default ;                   is 0.005 but depends on position errors. ;   TRIANGTYPE  Kind of triangulation type: default is 'delaunay'. 'all' is ;                   useful when you have very few stars (<10). There is also ;                   'delaunay1' kind which creates more triangles than delaunay ;                   but much less than 'all'. ;   ORDER       The order of the fit. Default is 4. It can be: ;                   6 Fits for translation, rotation, skewed axis ;                   4          translation, rotation ;                   2          translation, scale is fixed ;   /print:     Verbose mode will print to the screen a lot of details. ;   /plot:      Create plots to inspect the matching procedure. Note that ;                   the routine pauses after a new plot is created. ;   /regions:   Creates ds9 regions of matched stars. ; ; OUTPUT: ;   coeff       The best fit coefficients of the transformation that map x1,y1 ;                   into x2, y2 with the distortion function ; ; OPTIONAL OUTPUTS: ;   info:           A structure with many details for debugging purposes. ; ; COMMENTS: ;   There is still some room for improvement. The goal would be to make a general ;       routine that can be used for the general case of matching lists of ;       stars. At the moment it is tweaked to work for the APT2 offset problem ;       but it could be modified to handle more general cases. For example, the ;       routine will only try matching triangles without considering the case ;       where one of the axis is inverted. ;   TODO: ;   ­ take axis invertion as an option. If given, only try that otherwise ;       try both cases and use the one that matches the most triangles. ;   ­ a more general routine should probably return the indices of matched ;       points so the user can do whatever he/she wants with the match.; ; EXAMPLES: ;   matchxyxy, x1, y1, x2, y2, coeff            ; find the transformation ;   distortionxy, x1, y1, coeff, xout, yout     ; map all the x1,y1 into x2,y2 ;                                               ;  reference frame ;   matchxyxy, x1, y1, x2, y2, coeff,/print,/plot,/regions   ; see how triangles ;                                                          ; and points are ;                                                        ; matched step by step ; ; BUGS: ; 

INAF ­ Osservatorio Astrofisico di Catania Via Santa Sofia, 78  I­95123 Catania, Italy     Tel.: +39­ 095­7332 111   Fax: +39­095­330592

Sede “Mario G.Fracastoro” (Etna) – Tel +39­095­911580   Fax+39­095­916184www.oact.inaf.it ­ [email protected]

Page 14: Automatic Astrometry with IDL - · PDF fileAutomatic Astrometry with IDL V 1.0 (19-Apr-2013) R. Zanmar Sanchez(1), G. Leto(1), P. Bruno(1) (1) INAF – Osservatorio Astrofisico di

                                                              __________________________________________________________________________

     OSSERVATORIO ASTROFISICO DI CATANIA

; PROCEDURES CALLED: ;   build_triangles ;   triangle_space ;   sympoint_match ;   mpfitfun() ;   distortion(); REVISION HISTORY:;   01­Feb­2013  Check and remove isosceles triangles.;   20­Dec­2010  Written by Ricardo Zanmar Sanchez, INAF­Catania;­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­

Appendix B. Error exit values.

apt2_offset returns a flag to indicate the success or failure during the execution. Since the software is run at the telescope, it is important for it to always exit gracefully. Furthermore, some of the error flags are related to cloudy skies and therefore could be used to close the dome or take some other precautionary action. When matching many stars it is very likely to get a fortuoitous successful fit. Since this could be a serious problem at the telescope, we have introduced additional checks that are specific to the APT2 CCD, e.g. we check that the pixel scale is right.

0 Successful run. Returns the pointing offset in arcmin and the number of star found in the image.

­1 Any error related to reading a valid fits image

­2 Error reading values from the fits header: CRVALx, EXPTIME

­3 Not enough stars in the catalog (less than nmin2match = 30).

­4 Found fewer stars than expected in the catalog. Possible sign of cloudy skies.

­5 Any error related to incorrect inputs.

­6 Not even one triangle was matched. Can be solved by increasing the matching tolerance or creating more triangles. It can also mean that there are simply very few stars or the telescope pointing is way off.

­7 Matched a few points but not enough for the requested fit order. Note that the routine will automatically lower the order of the fit so that it can fit the matched points when necessary. If even after lowering the order, it is impossible to fit, we get this error.

­8 We get a fit but the error in the position (rms) is larger than 1 pixel. This is tweaked for the APT2 case and needs to be generalized.

­9 Fortuitous good fit but the pixel scale is wrong.

INAF ­ Osservatorio Astrofisico di Catania Via Santa Sofia, 78  I­95123 Catania, Italy     Tel.: +39­ 095­7332 111   Fax: +39­095­330592

Sede “Mario G.Fracastoro” (Etna) – Tel +39­095­911580   Fax+39­095­916184www.oact.inaf.it ­ [email protected]

Page 15: Automatic Astrometry with IDL - · PDF fileAutomatic Astrometry with IDL V 1.0 (19-Apr-2013) R. Zanmar Sanchez(1), G. Leto(1), P. Bruno(1) (1) INAF – Osservatorio Astrofisico di

                                                              __________________________________________________________________________

     OSSERVATORIO ASTROFISICO DI CATANIA

Bibliography

- Groth, E. 1986, AJ, 91, 1244

- Pal, A., & Bakos, G. A. 2006, PASP, 118, 1474

- Zacharias, N., Finch, C., Girard, T., et al. 2010, AJ, 139, 2184

INAF ­ Osservatorio Astrofisico di Catania Via Santa Sofia, 78  I­95123 Catania, Italy     Tel.: +39­ 095­7332 111   Fax: +39­095­330592

Sede “Mario G.Fracastoro” (Etna) – Tel +39­095­911580   Fax+39­095­916184www.oact.inaf.it ­ [email protected]