subroutine getcts(modblk,cts,ctn,i1,i2,jflag) c c this subroutine gets data for a given head and given mass. c cts and ctn are updated with all the samples i1 thru i2, that satisfy c the modblk requirements. c c input arguments are: c modblk see sentgs input subroutine c i1 - start sample index of data to be included c i2 - stop sample index. i1, i2 are in range [1,512] c output arguments, in addition to cts, ctn, c jflag - set to 0 if no data added to arrays, otherwise 1 c c note *** before this routine is called, the information in the c following common blocks must be defined c common updated by calling c ------ ------------------ c rpamsh getmod. contains instrument rpa, ims settings c i7flgs deffgs. contains instrument mode flags. c c v1.0 jfe johnson 13 aug 82 c v1.1 jfej 17 aug 82 added idcodc call c v1.2 rlwest 8 jul 86 incorporated new version if idcodc c integer*2 idat(2812),icde(512,2),jcr(512,2) integer*4 idcodc, ictn integer*4 jrpa(512),jmsh(512),modblk(8) equivalence (icde(1,1),idat(1789)) equivalence (jcr(1,1),idat(253)) common/rpamsh/jrpa,jmsh common/maf1/idat c jflag=0 c c first call refang, to define phase angle reference c call refang(degsam,ramang) c if(modblk(1).eq.1)go to 401 c z head processing idet=(modblk(1)-2)*2+modblk(2) c call getzms(idet,izms) do 430 i=i1,i2 c check that rpa setting is in the required range if(jrpa(i).lt.modblk(5).or.jrpa(i).gt.modblk(6))go to 430 c check that this mass is in the range required if(jmsh(i).lt.modblk(3).or.jmsh(i).gt.modblk(4))go to 430 c check this sample is in the angle range required iang=isangl(degsam,ramang,i) if(iang.lt.modblk(7).or.iang.gt.modblk(8))go to 430 c check we have data for this z head detector izms=igtzms(idet,i) if(izms.le.0)go to 430 jflag=1 cts=cts+float(idcodc(icde(i,izms),ictn)) ctn=ctn+ictn 430 continue 410 continue go to 400 c 401 continue c radial head processing do 100 i=i1,i2 c check that rpa setting is in the required range if(jrpa(i).lt.modblk(5).or.jrpa(i).gt.modblk(6))go to 100 c check that this mass is in the range required if(jmsh(i).lt.modblk(3).or.jmsh(i).gt.modblk(4))go to 100 c check this sample is in the angle range required iang=isangl(degsam,ramang,i) if(iang.lt.modblk(7).or.iang.gt.modblk(8))go to 100 jflag=1 cts=cts+float(idcodc(jcr(i,modblk(2)),ictn)) ctn=ctn+ictn 100 continue c 400 continue return end