;+ ; NAME: ; El_Color ; PURPOSE: ; Plot electron data (Counts vs. Azimuth and Time for a specified channel ; CATEGORY: ; Plotting ; CALLING SEQUENCE: ; El_Color ; INPUTS: ; OPTIONAL INPUT PARAMETERS: ; OUTPUTS: ; OPTIONAL OUTPUT PARAMETERS: ; CALLS: ; CartesianPolar, ColorBox, Echo, GetColors, loadct, oplot, plot ; COMMON BLOCKS: ; common I2, CHANSeV,AzNoShift,AzShift,I2_data,in_SC,in_YR,in_DOY ; SIDE EFFECTS: ; RESTRICTIONS: ; PROCEDURE: ; > User is specified for unspecified input ; > The counts are color coded ; MODIFICATION HISTORY: ; 1992, Tom Davidson, Paul Hick (UCSD) ;- pro El_Color, Chan common I2, CHANSeV,AzNoShift,AzShift,I2_data,in_SC,in_YR,in_DOY if n_elements(Chan) eq 0 then Chan = 0 if Chan lt 1 or Chan gt 32 then begin Chan = 24 & echo, 'Channel [1,32]', Chan, 1, 32 endif Chan = Chan-1 Xtime = I2_data.TIME/3600000. Azimuth = AzNoShift PhiRange = [Azimuth(0)-30,Azimuth(8)+30] Z = I2_data.ELEC(*,Chan) ; Extract electron counts Z = [Z,Z(0,*)] ; Sector 0 = Sector 8 Z = transpose( Z ) twin, /show, load=5, xsize=1000 erase POS = [.15,.1,.93,.95] YTICKV = [-180,-90,0,90,180] plot, Xtime, Azimuth, $ xtitle='HOUR', $ ytitle='AZIMUTH (DEG)', $ /nodata, /noerase, $ yrange = PhiRange, $ yticks = n_elements(YTICKV)-1, $ ytickv = YTICKV, $ xstyle = 1, $ ystyle = 1, $ position = POS, $ title='Channel '+strcompress(Chan+1,/remove_all) BreakVal = max(Z)/!d.n_colors*findgen(!d.n_colors-1) ColorBox, Xtime, Azimuth-22.5 , 0, 45., $ GetColors( Z , BreakVal, /legend , format='(I6)' , chars=1.5 ) plot, Xtime, Azimuth, $ xtitle='HOUR', $ ytitle='AZIMUTH (DEG)', $ /nodata, /noerase, $ yrange = PhiRange, $ yticks = n_elements(YTICKV)-1, $ ytickv = YTICKV, $ xstyle = 1, $ ystyle = 1, $ position = POS, $ title='Channel '+strcompress(Chan+1,/remove_all) CartesianPolar, vector=transpose(I2_data.B), B, Bt, BPhi Bt = 0 ; Not needed Count = n_elements(I2_data.TIME) & ModI = 10 & CntB = Count/ModI Z = fltarr(CntB) & T = Z & Count = -1 for I=0,CntB-1 do begin ModII = ModI*I & NonZero = ModII+where(B(ModII:ModII+ModI-1) ne 0,NB) if NB ne 0 then begin Count = Count+1 T(Count) = I2_data(ModII).TIME & Z(Count) = total(BPhi(NonZero))/NB endif endfor if Count ge 1 then oplot, T(0:Count), Z(0:Count), color=15 return & end