;+ ; NAME: ; refnet ; PURPOSE: ; Support routine for calling ``REFNET'' to get stars from USNO A1.0 catalog. ; DESCRIPTION: ; ; CATEGORY: ; Astrometry ; ; CALLING SEQUENCE: ; refnet,ra,dec,width,height,bmaglim,rmaglim,starfile ; ; INPUTS: ; ra - Right ascension of center of field for extraction (J2000) ; input can be in radians (double,float) or ; a string HH:MM:SS.S (see RAPARSE for valid syntax). ; dec - Declination of center of field for extraction (J2000, radians). ; input can be in radians (double,float) or ; a string +DD:MM:SS.S (see DECPARSE for valid syntax). ; width - Width of field to extract (arcsec). ; height - Height of field to extract (arcsec). ; bmaglim - Limiting Blue magnitude to extract. ; rmaglim - Limiting Red magnitude to extract. ; starfile- File name for the results of the catalog extraction. ; ; OPTIONAL INPUT PARAMETERS: ; ; KEYWORD INPUT PARAMETERS: ; CATPATH - Path to the location of the star catalog, default is ; /pub/home/koehn/starnet/dist/USNO-A1.0 (old) ; /gryll/data1/buie/USNO-A2.0 ; ; OUTPUTS: ; The output is all to the file and contains a list of stars from the ; USNO A1.0 catalog according to the input constraints. ; ; KEYWORD OUTPUT PARAMETERS: ; ; COMMON BLOCKS: ; ; SIDE EFFECTS: ; ; RESTRICTIONS: ; Currently this is rather restricted and is just an initial working version. ; This is hardcoded to a specific location for the catalog and executable. ; This program will work only on Unix platforms at present. ; ; PROCEDURE: ; ; MODIFICATION HISTORY: ; 97/05/08, Written by Marc W. Buie, Lowell Observatory ; 97/11/24 - MWB - Added CATPATH keyword ; 99/06/22, MWB, changed CATPATH default ; ;- PRO refnet,ra,dec,width,height,bmaglim,rmaglim,starfile,CATPATH=catpath IF badpar(ra,[4,5,7],0,CALLER='REFNET: (ra) ',TYPE=ratype) THEN return IF badpar(dec,[4,5,7],0,CALLER='REFNET: (dec) ',TYPE=dectype) THEN return IF badpar(catpath,[0,7],0,CALLER='REFNET: (CATPATH) ', $ default='/gryll/data1/buie/USNO-A2.0') THEN return IF ratype eq 7 THEN ra =raparse(ra) IF dectype eq 7 THEN dec=decparse(dec) rastr,ra,3,ras decstr,dec,2,decs ras=repchar(ras,':',' ') decs=repchar(decs,':',' ') openw,lun,'tmp.xxx',/get_lun printf,lun,ras,decs,float(width),float(height), $ float(bmaglim),float(rmaglim), $ format='(a,1x,a,1x,i5,1x,i5,1x,"-5.0 ",f4.1," -5.0 ",f4.1," -10.0 10.0 100000.0")' free_lun,lun spawn,'refnet -pr b -ah out -cm '+catpath+' -in tmp.xxx > '+starfile spawn,'rm tmp.xxx' END