RDREF
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.