/* Copyright (c) 1993 Association of Universities for Research * in Astronomy. All rights reserved. Produced under National * Aeronautics and Space Administration Contract No. NAS5-26555. */ /* LISTRADEC * * PURPOSE: * List subimages required to extract a NX,NY section at position RA,DEC * from a plate. This may be used to find out which images GETRADEC is * going to require so they can be moved from CD to disk in case the * CD cannot be read directly from the program. * * CALLING SEQUENCE: * retval=listradec(h,ra,dec,nx,ny) * * INPUTS: * h (* Header) header structure * ra,dec (double) center of image * nx,ny (int) size of image * * OUTPUTS: * prints required image files on stdout * retval return value=0 if successful, -1 if failed because * image center was off edge of plate * * PROCEDURE: * The plate is assumed to be stored in compressed 500x500 blocks * (or 500x499 for the last row). * A warning is printed if the entire image is off the plate and * -1 is returned. * * MODIFICATION HISTORY * Created by R. White, 5 August 1991 */ #include #include #include "header.h" extern void listxy(); extern void xypos(); extern int listradec(h,ra,dec,nx,ny) Header *h; double ra,dec; int nx,ny; { float mag, colour; float x,y; /* * calculate center position in pixels */ mag = 0.0; colour = 0.0; xypos(h,ra,dec,mag,colour,&x,&y); if ( (x < 0) || (x>13999) || (y < 0) || (y > 13998) ) { fprintf(stderr, "warning: RA, Dec position lies off edge of plate %s\n", h->plate_name); return(-1); } /* * list files for image section */ listxy(h,x,y,nx,ny); return(0); }