;+ ; NAME: ; MAKE_SCAN ; ; ; PURPOSE: ; To generate a time ordered stream of coordinates for the ; chosen scan strategy ; ; ; CALLING SEQUENCE: ; MAKE_SCAN,time,az,el,ra,dec ; ; ; INPUTS: ; The user is prompted for all the necessary input ; ; ; 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) ; ; ; PARAMETERS: ; lat: geographical latitude (degrees) ; lon: geographical longitude (degrees, positive towards East) ; ; They must be changed depending on the place of observation ; ; ; MODIFICATION HISTORY: ; Created Amedeo Balbi - November 1998 (based partly on material ; by Pedro Gil Ferreira) ; ;- pro MAKE_SCAN, time, az, el, ra, dec lat = 31.8 ; geogr. lat. - Palestine (Texas) lon = 264.3 ; geogr. long. - Palestine (Texas) print,' current latitude and longitude are: ' print,string(lat)+' degrees North'+string(lon)+' degrees East' print,'' print,' enter start time of scan (year, month, day, UT (hours))' read,year,month,day,time0 time0=time0*3600. ; convert to seconds print,' enter initial azimuth (deg, min) in the range (0,360)' print,' North is 180, 0' print,' (e.g. 145, 0)' read,azd,azm az0=azd+azm/60. ; convert do decimal degrees print,' enter initial elevation (deg, min) in the range (-90,90)' print,' Horizon is 0, 0 - NCP is = geogr. lat.' print,' (e.g. 50, 0)' read,eld,elm el0=eld+elm/60. ; convert to decimal degrees print,' enter duration of scan (hr, min)' print,' (e.g. 1, 30)' read,hscan,mscan dtscan=(hscan*60.+mscan)*60. ; convert to seconds print,' choose type of scan:' print,' (1)-sinusoidal azimuthal modulation, constant elevation' print,' (2)-360 degrees rotation in azimuth, constant elevation' read,iazscan ; begin sinusoidal scan if (iazscan eq 1) then begin print,' enter scan frequency, amplitude and sampling rate (Hz, deg, s)' print,' (e.g. 0.02, 6, 0.1)' print,' *NOTE* - amplitude of the sine, NOT peak-to-peak' read,wscan,ascan,dt ntime=0L ntime=long(dtscan/dt) print,' number of points in the scan:',ntime print,'' print,' ** generating scan... **' 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) print,' ** ...done ** ' endif ; begin 360 degrees scan if (iazscan eq 2) then begin print,' enter scan speed and sampling rate (deg/s, s)' print,' (e.g. 20, 0.01)' read,wscan,dt ntime=0L ntime=long(dtscan/dt) print,' number of points in the scan:',ntime print,'' print,' ** generating scan... **' 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 print,' ** ...done ** ' endif time=time/3600. ; convert to decimal hours AZEL2RADEC,az,el,ra,dec,year,month,day,time,lat,lon return end