PRO SUN ;+ ; ; NAME: ; SUN ; PURPOSE: ; Read and analyze the Sun Sensor data from the time ordered list. ; Verify pulses are in order. Plot sun amplitude and spin rate. ; CATEGORY: ; Verification ; CALLING SEQUENCE: ; SUN ; INPUTS: ; None ; OPTIONAL INPUT PARAMETERS: ; None ; OUTPUTS: ; post/anal_results/sun ; OPTIONAL OUTPUT PARAMETERS: ; None ; KEYWORDS: ; None ; COMMON BLOCKS: ; None ; SIDE EFFECTS: ; None ; RESTRICTIONS: ; None ; EXAMPLE: ; None ; PROCEDURE: ; Read in time ordered list ; Verify the pulses increase in time ; Verify the triplets do not overlap ; Plot spin rate and sun amplitude versus time ; MODIFICATION HISTORY: ; Created by Laura Ellen Dafoe 13 June 1994 ; Tested by Laura Ellen Dafoe on test log: lp062401 on 25 June 1994. ; Verified the plotted spin rate and amplitude against the ; Data Sets. Editted time ordered list file to create the ; two error conditions in the data, and tested them. ;---------------------------------------------------------------------------- ; D I S R S O F T (C) 1 9 9 4 ;----------------------------------------------------------------------------- ;- rdsun,pulse1,pulse2,pulse3,amp openw,outfile,'post/anal_results/sun',/get_lun z_pulse=size(pulse1) NumTriplets=z_pulse(1) spin=fltarr(NumTriplets-1) p3=-1 for i=0,NumTriplets-1 do begin err=0 if pulse1(i) GE pulse2(i) then err=1 if pulse2(i) GE pulse3(i) then err=1 if pulse3(i) LE pulse1(i) then err=1 if err EQ 1 then printf,outfile,format='("Hosed Triplet ",3f12.4)',pulse1(i),$ pulse2(i),pulse3(i) if pulse1(i) LE p3 then printf,outfile,$ format='("Successive Triplets Overlap: 3rd pulse ",f10.3," Next pulse ",f10.3)',$ p3,pulse1(i) p3=pulse3(i) if i GT 0 then begin spin(i-1) = 60.0/(pulse2(i)-p2) endif p2=pulse2(i) endfor printf,outfile,'Analyzed all the sun sensor data sets.' !psym=10 window,1,title='Sun Sensor Amplitude' plot,pulse2,amp,xtitle='Time',ytitle='Data Value for Solar Peak' window,2,title='Spin Rate' plot,pulse2(1:NumTriplets-1),spin,xtitle='Time',ytitle='Spin Rate (RPM)' free_lun,outfile END