NAME: rdref PURPOSE: (one line only) Read a astrometry support (.ref) file. DESCRIPTION: CATEGORY: File I/O CALLING SEQUENCE: rdref,file,ref,error INPUTS: file - Name of file to be read OPTIONAL INPUT PARAMETERS: KEYWORD INPUT PARAMETERS: NOFIX - Flag, if set will suppress the attempt to rewrite a file that is in the wrong byte order. OUTPUTS: ref - Anonymous structure that contains the information read from file. Tags in structure always provided: objrad - object aperture radius (pixels) nstars - Number of stars in the list Tags provided if nstars > 0 xpos - float, X position of star ypos - float, Y position of star fwhm - float, FWHM of object (pixels) mag - float, instrumental magnitude of star err - float, uncertainty on magnitude sig_max - float, DN value of peak pixel in image ra - double, RA of star (radians) dec - double, Dec of star (radians) catmag - float, Catalog magnitude for star error - Flag, if set indicates there was a problem reading the file. KEYWORD OUTPUT PARAMETERS: COMMON BLOCKS: SIDE EFFECTS: Files written by astrom.pro (versions prior to 2008/10/31) could have been written with the wrong byte ordering. When a file is read it is checked to see if objrad and nstars make sense. If not, the byte order is swapped. If that extra swap was needed then an attempt is made to rewrite the data back to the file thus repairing the file. If the file cannot be written to this program will print a warning message but will still return good data to the caller. If the file can be written there will be no outward indication that this happened other than the file will get changed. RESTRICTIONS: PROCEDURE: MODIFICATION HISTORY: Written 2008/10/31 by Marc W. Buie, Southwest Research Institute. 2016/04/16, MWB, added error check for non-existent file.