*============================================================================== * subroutine to read 2dF catalogue format files. returns a string called * LINE with the complete catalogue entry for a particular object, plus * the individual catalogue parameters via a common block * subroutine catread(iunit,line,ier) * * written by S.M. Croom, 3/6/99. last alteration 03/06/01 * * 1/10/99: increase catname variable to 10 characters to handle the * extra N or S character in the object name. * 11/10/99: alter to use include files. * 08/08/00: Updated to include signal-to-noise and fibre number. * 06/03/01: Updated to include sector name * 02/05/02: Updated to lengthen sector name to 25 characters * *############################################################################### * # * LICENCE # * # * This program is free software; you can redistribute it and/or # * modify it under the terms of the GNU General Public License # * as published by the Free Software Foundation; either version 2 # * of the License, or (at your option) any later version. # * # * This program is distributed in the hope that it will be useful, # * but WITHOUT ANY WARRANTY; without even the implied warranty of # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # * GNU General Public License for more details. # * # * You should have received a copy of the GNU General Public License # * along with this program; if not, write to the Free Software # * Foundation, Inc., 59 Temple Place - Suite 330, # * Boston, MA 02111-1307, USA. # * # *############################################################################### * implicit none integer iunit include '2dfcatformat.h' *------------------------------------------------------------------------------ * set ier=0, subroutine returns ier=1 if end of file or error found. ier=0 * read catalogue entry into string "line": read(iunit,1000,err=9999,end=999) line 1000 format(a355) * read catalogue parameters from string "line": read(line,2000,err=9999,end=999) iauname,ra1j,ra2j,ra3j,dsigncharj & ,dec1j,dec2j,dec3j,catno,catname,sector,ra1,ra2,ra3,dsignchar & ,dec1,dec2,dec3,ukstfld,apmx,apmy,rarad,decrad,b,ub,br,nobs & ,z1,zq1,id1,date1,fobs1,fibre1,sn1,z2,zq2,id2,date2,fobs2 & ,fibre2,sn2,zprev,radio,xray,dust,comments1,comments2 2000 format(a16,1x,i2,1x,i2,1x,f5.2,1x,a1,i2,1x,i2,1x,f4.1,1x,i5,1x,a10 & ,1x,a25,1x,i2,1x,i2,1x,f5.2,1x,a1,i2,1x,i2,1x,f4.1,1x,i3,1x & ,f9.2,1x,f9.2,1x,f11.8,1x,f11.8,2x,f8.5,1x,f9.5,1x,f9.5,2x,i2 & ,1x,f6.4,1x,i2,1x,a10,1x,a8,1x,i4,1x,i3,1x,f7.2,1x,f6.4,1x,i2 & ,1x,a10,1x,a8,1x,i4,1x,i3,1x,f7.2,1x,f5.3,1x,f6.1,1x,f7.4,1x & ,f7.5,1x,a20,1x,a20) return 999 ier=1 return 9999 stop 'catalogue read error' end *==============================================================================