;+
;	Batch File: THM_CRIB_EFI
;
;	Purpose:  Demonstrate the loading, calibration, and plotting
;		of THEMIS EFI data.
;
;	Calling Sequence:
;	.run thm_crib_fbk, or using cut-and-paste.
;
;	Arguements:
;   None.
;
;	Notes:
;	None.
;
; $LastChangedBy: kenb-mac $
; $LastChangedDate: 2007-08-02 14:37:25 -0700 (Thu, 02 Aug 2007) $
; $LastChangedRevision: 1326 $
; $URL $
;-

; EFI waveform data example.
tplot_title = 'THEMIS EFI Waveform Examples'
tplot_options, 'title', tplot_title
tplot_options, 'xmargin', [ 15, 10]
tplot_options, 'ymargin', [ 5, 5]

timespan, '2007-06-30', 1.0, /day
thm_load_efi, level=1, suffix='_raw',  type='raw'
loadct2, 39

; the following are optional, since they should be set
; by thm_load_efi as the default plotting options (dlimits).
; you can use these as a starting point if you want to modify the labels/colors.
;options, 'th?_v??_raw', 'colors', [ 1, 2, 3, 4, 5, 6]
;options, 'th?_v??_raw', 'labels', [ 'V1', 'V2', 'V3', 'V4', 'V5', 'V6']
;options, 'th?_v??_raw', 'labflag', 1

;options, 'th?_e??_raw', 'colors', [ 2, 4, 6]
;options, 'th?_e??_raw', 'labels', [ 'e12', 'e34', 'e56']
;options, 'th?_e??_raw', 'labflag', 1

tplot, [ 'th[cde]_vaf_raw', 'th[cde]_eff_raw']

print, 'the plot shows data for all probe for which the booms have been deployed'
stop

tlimit, ['2007-06-30/08:40:00', '2007-06-30/13:20:00']

print, 'zoomed into a period of good data  '
print, 'in between the EFI Sensor Diagnostic Tests (SDTs)'
stop

thm_cal_efi, /verbose, in_suffix='_raw'

tplot, [ 'thc_vaf_raw', 'thc_vaf', 'thc_eff_raw', 'thc_eff']
stop

; unfortunately, no vap or vaw at this time for thc, only tha and thb
print, 'particle burst'
tplot, [ 'tha_vap_raw', 'tha_vap', 'tha_efp_raw', 'tha_efp']
print, 'use the mouse to zoom in'
tlimit

stop
print, 'wave burst occurs within particle burst'
tplot, [ 'tha_vaw_raw', 'tha_vaw', 'tha_efw_raw', 'tha_efw']
print, 'use the mouse to zoom in'
tlimit


end