; ; check ra/dec positions after changes made to hdr on 16apr04 ; 1. compute difference ra/decJ in header versus ra,dec computed from ; encoder values ; 2. plot the ra step size per second for the drift scan ; yymmdd1=20040923 yymmdd2=20040923 ldate='23sep04' ; ; get the table info for this data ; nscan=arch_gettbl(yymmdd1,yymmdd2,slar,slfilear,proj='a1946') ; ; create an index array 0 to 9 to index into slar. ; indar=lindgen(nscan) i=0 ; use first location ; ; open the file ; istat=arch_openfile(slar,slfilear,indar[i],desc) ; ; input first scan ; print,corinpscan(desc,b,scan=slar[i].scan) nrecs=n_elements(b) ; ; reposition to start of scan then read in ; a scans worth of fits headers 16 headers/rec ; print,posscan(desc,slar[i].scan) hperrec=16 print,washdr(desc,h,numh=hperrec*nrecs) h=reform(h,2,8,nrecs) ; ; here is the ra/dec by beam for the fits file ; rafits =reform(h[0,0:6,*].crval2a) decfits=reform(h[0,0:6,*].crval3a) ; ; to compute it using the az,za,juliandate ; wasalfacmpradec,b,raEnc,decEnc ; ; difference fits-encoder. Note that wasalfacmpradec uses the ; center of the integration. subtract .5 seconds to compare with ; fits ra,dec (which is at the start). ; difRa =transpose((rafits-(raEnc-.5/3600.))*3600.*15.) difDec=transpose((decfits-decEnc)*3600.) ; ; here's the plots ; x=findgen(nrecs) hard=1 if hard then pscol,'chkRaDec_a194623sep04.ps',/full !p.multi=[0,1,7] ver,-2,2 hor title=string(format=$ '(a," a1946 scan ",i9," (fitsRa,dec) - (RaDec from encoder)")',$ ldate,b[0].b1.h.std.scannumber) cs=1.6 for i=0,6 do begin &$ lpix=string(format='(" Pix",i1)',i) &$ ltitle=(i eq 0)?title+lpix:lpix &$ plot,x ,difra[*,i],charsize=cs,$ xtitle='sample [secs]',ytitle='difPos [asecs]',$ title=ltitle &$ oplot,x,difdec[*,i],color=2 &$ endfor ln=1 xp=.4 note,ln,'Ra',xp=xp,color=1 note,ln,'Dec',xp=xp+.1,color=2 ; ; now look at delta ra ; draf0 =rafits[0,*]-shift(rafits[0,*],1) draEnc0=raEnc[0,*]-shift(raEnc[0,*],1) draf0[0]=draf0[1] draEnc0[0]=draEnc0[1] !p.multi=0 title=" Ra Asec/sec for Fits file and raFromEncoder" if hard then pagesize ver,12,18 plot,draf0*3600*15.,$ xtitle='time [secs]',ytitle='Step size/sec [Asecs/sec]',$ title=title oplot,draEnc0*3600*15.,color=2 xp=.04 ln=3. note,ln ,'FitsFile',xp=xp note,ln+1,'From encoder',xp=xp,color=2 if hard then hardcopy x stop end