;+ ; NAME: ; MAKE_SCAN2 ; ; ; PURPOSE: ; To generate a time ordered stream of coordinates for the ; chosen scan strategy; Non-interactive version of MAKE_SCAN ; ; ; CALLING SEQUENCE: ; MAKE_SCAN2,lat,lon,year,month,day,time0,az0,el0,hscan, ; iazscan,wscan,ascan,dt,time,az,el,ra,dec ; ; ; INPUTS: ; lat: Latitude of location of scan ; lon: Longitute of location of scan ; year: Start year of scan ; month: Start month of scan ; day: Start day of scan ; time0: Start hour of scan (UT) ; az0: Initial azimuth of scan ; el0: Initial elevation of scan ; hscan: Duration of scan (hours) ; iazscan: 0 = sinusoidal scan, 1 = 360 degree scan ; wscan: frequency for sin scan (Hz), speed for 360 degree scan (deg/s) ; ascan: amplitude of sinusoidal scan (deg), ignored for 360 degree scan ; dt: sampling rate (time between samples) (s) ; ; ; OUTPUTS: ; time: Universal Time in decimal hours ; az: azimuth (degrees) in range (0,360) - NCP is 180 ; el: elevation (degrees) ; ra: Right Ascension (hours) ; dec: declination (degrees) ; ; ; MODIFICATION HISTORY: ; ; MAKE_SCAN Created Amedeo Balbi - November 1998 (based partly on material ; by Pedro Gil Ferreira) ; MAKE_SCAN2 Created Mark Krumholz - January 1999 (based entirely on Amedeo ; Balbi's procedure MAKE_SCAN) ; ;- pro MAKE_SCAN2, lat, lon, year, month, day, time0, az0, el0, $ hscan, iazscan, wscan, ascan, dt, time, az, el, ra, dec time0=time0*3600. ; convert to seconds dtscan=hscan*3600. ; convert to seconds ; begin sinusoidal scan if (iazscan eq 0) then begin ntime=0L ntime=long(dtscan/dt) time=time0+dt*findgen(ntime) az=az0+ascan*sin(2.*!pi*wscan*(time-time0)) az=az mod 360.0 el=fltarr(ntime) el(*)=el0 az=az mod 360.0 ; the range must be (0, 360) endif ; begin 360 degrees scan if (iazscan eq 1) then begin ntime=0L ntime=long(dtscan/dt) time=time0+dt*findgen(ntime) az=az0+wscan*(time-time0) az=az mod 360. ; the range must be (0,360) el=fltarr(ntime) el(*)=el0 endif time=time/3600. ; convert to decimal hours AZEL2RADEC,az,el,ra,dec,year,month,day,time,lat,lon return end