This page was created by the IDL library routine `mk_html_help2`.

Last modified: Fri Sep 26 18:17:39 2025.

# Directory Listing of Routines

# projects/themis/spacecraft/particles/ESA/packet

- GET_THA_PEEB
  Returns peeb data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THA_PEEC
  Returns either peef or combined peef-peer data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THA_PEEF
  Returns peef data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THA_PEER
  Returns peer data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THA_PEES
  Returns either peer or combined peef-peer data structure at a single time from common generated by thm_load_esa_pkt.pro, for spin resolution combined data
- GET_THA_PEIB
  Returns peib data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THA_PEIF
  Returns peif data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THA_PEIR
  Returns peir data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THB_PEEB
  Returns peeb data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THB_PEEC
  Returns either peef or combined peef-peer data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THB_PEEF
  Returns peef data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THB_PEER
  Returns peer data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THB_PEES
  Returns either peer or combined peef-peer data structure at a single time from common generated by thm_load_esa_pkt.pro, for spin resolution combined data
- GET_THB_PEIB
  Returns peib data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THB_PEIF
  Returns peif data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THB_PEIR
  Returns peir data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THC_PEEB
  Returns peeb data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THC_PEEC
  Returns either peef or combined peef-peer data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THC_PEEF
  Returns peef data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THC_PEER
  Returns peer data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THC_PEES
  Returns either peer or combined peef-peer data structure at a single time from common generated by thm_load_esa_pkt.pro, for spin resolution combined data
- GET_THC_PEIB
  Returns peib data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THC_PEIF
  Returns peif data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THC_PEIR
  Returns peir data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THD_PEEB
  Returns peeb data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THD_PEEC
  Returns either peef or combined peef-peer data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THD_PEEF
  Returns peef data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THD_PEER
  Returns peer data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THD_PEES
  Returns either peer or combined peef-peer data structure at a single time from common generated by thm_load_esa_pkt.pro, for spin resolution combined data
- GET_THD_PEIB
  Returns peib data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THD_PEIF
  Returns peif data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THD_PEIR
  Returns peir data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THE_PEEB
  Returns peeb data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THE_PEEC
  Returns either peef or combined peef-peer data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THE_PEEF
  Returns peef data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THE_PEER
  Returns peer data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THE_PEES
  Returns either peer or combined peef-peer data structure at a single time from common generated by thm_load_esa_pkt.pro, for spin resolution combined data
- GET_THE_PEIB
  Returns peib data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THE_PEIF
  Returns peif data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THE_PEIR
  Returns peir data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THF_PEEB
  Returns peeb data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THF_PEEF
  Returns peef data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THF_PEER
  Returns peer data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THF_PEIB
  Returns peib data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THF_PEIF
  Returns peif data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THF_PEIR
  Returns peir data structure at a single time from common generated by thm_load_esa_pkt.pro
- GET_THM_ESA_CAL
  Returns esa calibration factors
- GET_THM_ESA_CALIB
  Returns esa calibration data in a structure
- MINJMIN
  Returns average value of j lowest-value points in the arrage. Works like min.
- THM_ESA_BGND_REMOVE
  Background removal code from Vassilis
- THM_ESA_SPIN_ADJUST
  Fetch required spin model data for time tagging of ESA
- THM_LOAD_ESA_CAL
  Loads ESA time varying relative efficiency into common tha_esa_cal for use by get_thm_esa_cal()
- THM_LOAD_ESA_MAG
  Add magnetometer data to the ESA structures
- THM_LOAD_ESA_PKT
- THM_LOAD_ESA_POT
  Add spacecraft potential data to the ESA structures
- THM_LOAD_PEEB
  Decommutates the raw THEMIS electron esa burst data packets, (peeb - apid 459), and puts data structure in a common for access by get_th*_peeb.pro and generates tplot energy spectrogram
- THM_LOAD_PEEF
  Decommutates the raw THEMIS electron esa full data packets, (peef - apid 457), and puts data structure in a common for access by get_th*_peef.pro and generates tplot energy spectrogram
- THM_LOAD_PEER
  Decommutates the raw THEMIS electron esa reduced data packets, (peer - apid 458), and puts data structure in a common for access by get_th*_peer.pro and generates tplot energy spectrogram
- THM_LOAD_PEIB
  Decommutates the raw THEMIS ion esa full data packets, (peib - apid 456), and puts data structure in a common for access by get_th*_peib.pro and generates tplot energy spectrogram
- THM_LOAD_PEIF
  Decommutates the raw THEMIS ion esa full data packets, (peif - apid 454), and puts data structure in a common for access by get_th*_peif.pro and generates tplot energy spectrogram
- THM_LOAD_PEIR
  Decommutates the raw THEMIS ion esa reduced data packets, (peir - apid 455), and puts data structure in a common for access by get_th*_peir.pro and generates tplot energy spectrogram
- THM_LOAD_SPINMODEL
  Returns template for spinmodel.txt files
- THM_MAKE_ESA_MAG
  Make a tplot structure out of ESA magnetometer data
- THM_READ_EESA_ANGLE_REDUCED_MODE
  Returns data structure with angle maps
- THM_READ_ESA_ANGLE_BURST_MODE
  Returns data structure with angle maps
- THM_READ_ESA_ANGLE_FULL_MODE
  Returns data structure with angle maps
- THM_READ_ESA_SWEEP_BURST_MODE
  Returns data structure with energy sweep tables
- THM_READ_ESA_SWEEP_FULL_MODE
  Returns data structure with energy sweep tables
- THM_READ_ESA_SWEEP_REDUCED_MODE
  Returns data structure with energy sweep tables
- THM_READ_IESA_ANGLE_REDUCED_MODE
  Returns data structure with angle maps

# Routine Descriptions

## GET_THA_PEEB

[Next Routine] [List of Routines]

    PROCEDURE:	get_tha_peeb
    PURPOSE:
    	Returns peeb data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_tha_peeb.pro)

## GET_THA_PEEC

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_tha_peec
    PURPOSE:
    	Returns either peef or combined peef-peer data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  09/07/25
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_tha_peec.pro)

## GET_THA_PEEF

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_tha_peef
    PURPOSE:
    	Returns peef data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_tha_peef.pro)

## GET_THA_PEER

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_tha_peer
    PURPOSE:
    	Returns peer data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_tha_peer.pro)

## GET_THA_PEES

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_tha_pees
    PURPOSE:
    	Returns either peer or combined peef-peer data structure at a single time from common generated by thm_load_esa_pkt.pro, for spin resolution combined data
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  10/04/07
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_tha_pees.pro)

## GET_THA_PEIB

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_tha_peib
    PURPOSE:
    	Returns peib data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_tha_peib.pro)

## GET_THA_PEIF

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_tha_peif
    PURPOSE:
    	Returns peif data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_tha_peif.pro)

## GET_THA_PEIR

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_tha_peir
    PURPOSE:
    	Returns peir data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_tha_peir.pro)

## GET_THB_PEEB

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thb_peeb
    PURPOSE:
    	Returns peeb data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thb_peeb.pro)

## GET_THB_PEEC

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thb_peec
    PURPOSE:
    	Returns either peef or combined peef-peer data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  09/07/25
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thb_peec.pro)

## GET_THB_PEEF

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thb_peef
    PURPOSE:
    	Returns peef data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thb_peef.pro)

## GET_THB_PEER

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thb_peer
    PURPOSE:
    	Returns peer data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thb_peer.pro)

## GET_THB_PEES

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thb_pees
    PURPOSE:
    	Returns either peer or combined peef-peer data structure at a single time from common generated by thm_load_esa_pkt.pro, for spin resolution combined data
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  10/04/07
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thb_pees.pro)

## GET_THB_PEIB

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thb_peib
    PURPOSE:
    	Returns peib data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thb_peib.pro)

## GET_THB_PEIF

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thb_peif
    PURPOSE:
    	Returns peif data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thb_peif.pro)

## GET_THB_PEIR

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thb_peir
    PURPOSE:
    	Returns peir data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thb_peir.pro)

## GET_THC_PEEB

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thc_peeb
    PURPOSE:
    	Returns peeb data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thc_peeb.pro)

## GET_THC_PEEC

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thc_peec
    PURPOSE:
    	Returns either peef or combined peef-peer data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  09/07/25
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thc_peec.pro)

## GET_THC_PEEF

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thc_peef
    PURPOSE:
    	Returns peef data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thc_peef.pro)

## GET_THC_PEER

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thc_peer
    PURPOSE:
    	Returns peer data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thc_peer.pro)

## GET_THC_PEES

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thc_pees
    PURPOSE:
    	Returns either peer or combined peef-peer data structure at a single time from common generated by thm_load_esa_pkt.pro, for spin resolution combined data
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  10/04/07
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thc_pees.pro)

## GET_THC_PEIB

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thc_peib
    PURPOSE:
    	Returns peib data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thc_peib.pro)

## GET_THC_PEIF

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thc_peif
    PURPOSE:
    	Returns peif data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thc_peif.pro)

## GET_THC_PEIR

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thc_peir
    PURPOSE:
    	Returns peir data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thc_peir.pro)

## GET_THD_PEEB

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thd_peeb
    PURPOSE:
    	Returns peeb data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thd_peeb.pro)

## GET_THD_PEEC

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thd_peec
    PURPOSE:
    	Returns either peef or combined peef-peer data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  09/07/25
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thd_peec.pro)

## GET_THD_PEEF

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thd_peef
    PURPOSE:
    	Returns peef data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thd_peef.pro)

## GET_THD_PEER

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thd_peer
    PURPOSE:
    	Returns peer data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thd_peer.pro)

## GET_THD_PEES

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thd_pees
    PURPOSE:
    	Returns either peer or combined peef-peer data structure at a single time from common generated by thm_load_esa_pkt.pro, for spin resolution combined data
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  10/04/07
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thd_pees.pro)

## GET_THD_PEIB

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thd_peib
    PURPOSE:
    	Returns peib data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thd_peib.pro)

## GET_THD_PEIF

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thd_peif
    PURPOSE:
    	Returns peif data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thd_peif.pro)

## GET_THD_PEIR

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thd_peir
    PURPOSE:
    	Returns peir data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thd_peir.pro)

## GET_THE_PEEB

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_the_peeb
    PURPOSE:
    	Returns peeb data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_the_peeb.pro)

## GET_THE_PEEC

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_the_peec
    PURPOSE:
    	Returns either peef or combined peef-peer data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  09/07/25
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_the_peec.pro)

## GET_THE_PEEF

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_the_peef
    PURPOSE:
    	Returns peef data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_the_peef.pro)

## GET_THE_PEER

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_the_peer
    PURPOSE:
    	Returns peer data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_the_peer.pro)

## GET_THE_PEES

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_the_pees
    PURPOSE:
    	Returns either peer or combined peef-peer data structure at a single time from common generated by thm_load_esa_pkt.pro, for spin resolution combined data
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  10/04/07
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_the_pees.pro)

## GET_THE_PEIB

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_the_peib
    PURPOSE:
    	Returns peib data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_the_peib.pro)

## GET_THE_PEIF

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_the_peif
    PURPOSE:
    	Returns peif data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_the_peif.pro)

## GET_THE_PEIR

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_the_peir
    PURPOSE:
    	Returns peir data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_the_peir.pro)

## GET_THF_PEEB

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thf_peeb
    PURPOSE:
    	Returns peeb data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thf_peeb.pro)

## GET_THF_PEEF

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thf_peef
    PURPOSE:
    	Returns peef data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thf_peef.pro)

## GET_THF_PEER

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thf_peer
    PURPOSE:
    	Returns peer data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thf_peer.pro)

## GET_THF_PEIB

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thf_peib
    PURPOSE:
    	Returns peib data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thf_peib.pro)

## GET_THF_PEIF

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thf_peif
    PURPOSE:
    	Returns peif data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thf_peif.pro)

## GET_THF_PEIR

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	get_thf_peir
    PURPOSE:
    	Returns peir data structure at a single time from common generated by thm_load_esa_pkt.pro
    INPUT:
    	time:		dbl		time of data to be returned

    KEYWORDS:
    	start:		0,1		if set, gets first time in common block
    	en:		0,1		if set, gets last time in common block
    	advance		0,1		if set, gets next time in common block
    	retreat		0,1		if set, gets previous time in common block
    	index		long		gets data at the index value "ind" in common block
    	calib:		0,1		not working yet, allows alternate calibration
    	times		0,1		returns an array of times for all the data, returns 0 if no data

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Data structures can be used as inputs to functions such as n_3d.pro, v_3d.pro
    	Or used in conjunction with iterative programs such as get_3dt.pro, get_en_spec.pro

(See projects/themis/spacecraft/particles/ESA/packet/get_thf_peir.pro)

## GET_THM_ESA_CAL

[Previous Routine] [Next Routine] [List of Routines]

    Function:	get_thm_esa_cal
    PURPOSE:
    	Returns esa calibration factors
    INPUT:

    KEYWORDS:
    	sc:		string		themis spacecraft - "a", "b", "c", "d", "e"
    					if not set defaults to "a"
    	ion:		0/1		0= electron esa, 1= ion esa, default=0
    	time:		dblarr		times that relative geometric factor are to be returned

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/07/08
    MOD HISTORY:

    NOTES:

(See projects/themis/spacecraft/particles/ESA/packet/get_thm_esa_cal.pro)

## GET_THM_ESA_CALIB

[Previous Routine] [Next Routine] [List of Routines]

    Function:	get_thm_esa_calib
    PURPOSE:
    	Returns esa calibration data in a structure
    INPUT:

    KEYWORDS:
    	sc:		string		themis spacecraft - "a", "b", "c", "d", "e"
    					if not set defaults to all

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/07/08
    MOD HISTORY:

    NOTES:

(See projects/themis/spacecraft/particles/ESA/packet/get_thm_esa_calib.pro)

## MINJMIN

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	minjmin
    PURPOSE:
    	Returns average value of j lowest-value points in the arrage. Works like min.
    INPUT:
    	arr:			multi-dimensional array
    KEYWORDS:
         dimension:		dimension over which to find the min values (like in IDL min function)
    				If present and nonzero, result is a slice, and output has 1dim less than arr
    				If not present or zero, the min is found over the entire array and returns as scalar
         jmin_points:	number of lowest value elements to average over (default=1, typical=3)

    CREATED BY: Vassilis
    VERSION:	1
    LAST MODIFICATION:  10/08/29
    MOD HISTORY:

    NOTES:
     Helper routine created to work with get_th?_pxxx.pro to remove ESA background contamination
     Idea is to average over a number of lowest count rate points to determine bgnd
     with improved statistics.

     $LastChangedBy: aaflores1 $
     $LastChangedDate: 2014-01-24 15:20:50 -0800 (Fri, 24 Jan 2014) $
     $LastChangedRevision: 14010 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/spacecraft/particles/ESA/packet/minjmin.pro $

(See projects/themis/spacecraft/particles/ESA/packet/minjmin.pro)

## THM_ESA_BGND_REMOVE

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE: thm_esa_bgnd_remove

    PURPOSE:
    Background removal code from Vassilis
    This abstracts the code as the same algorithm is used in many of the get_th?_pexx routines
    INPUT:
      dat:  The dat structure from the parent routine
      gf: The geometric factor array from the parent routine
      eff: The efficiency array from the parent routine
      nenergy: The number of energy bins for the data being calibrated
      nbins: The number of angle bins for the data being calibrated
      theta: angles in theta for the angle bins of the data being calibrated

    OUTPUTS:
      Modifies the dat structure that was provided to it.

    KEYWORDS:

    /bdnd_remove:  Turn on ESA background removal.

    bgnd_type(Default 'anode'): Set to string naming background removal type:
    'angle','omni', or 'anode'.

    bgnd_npoints(Default = 3): Set to the number of lowest values points to average over when determining background.

    bgnd_scale(Default=1): Set to a scaling factor that the background will be multiplied by before it is subtracted

    HISTORY:
     2016-08-23 - now called from thm_pgs_clean_esa instead of thm_part_dist
                - takes full structure input instead of copying fields

     $LastChangedBy: aaflores $
     $LastChangedDate: 2016-08-24 18:29:05 -0700 (Wed, 24 Aug 2016) $
     $LastChangedRevision: 21724 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/spacecraft/particles/ESA/packet/thm_esa_bgnd_remove.pro $

(See projects/themis/spacecraft/particles/ESA/packet/thm_esa_bgnd_remove.pro)

## THM_ESA_SPIN_ADJUST

[Previous Routine] [Next Routine] [List of Routines]

    PURPOSE:
      Fetch required spin model data for time tagging of ESA
      common block structures.

    INPUT:
      model: valid object reference to spin model
      time: decommutated header time from ESA packet file

    OUTPUT:
      adjusted_time: start time of the spin containing heading time
                     (not in unix time)
      spin_period: spin period in seconds
      delta_phi: deviation between IDPU & SP+FGM models (degrees)

    NOTES:

(See projects/themis/spacecraft/particles/ESA/packet/thm_esa_spin_adjust.pro)

## THM_LOAD_ESA_CAL

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	thm_load_esa_cal
    PURPOSE:
    	Loads ESA time varying relative efficiency into common tha_esa_cal for use by get_thm_esa_cal()
    INPUT:

    KEYWORDS:
    	file:		string, strarr	the complete path and filename to the raw pkt files
    					if not set, uses timerange to select files
    	themishome:	string		path to data dir, where data dir contains the th* dir, where *=a,b,c,d,e

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/10/19
    MOD HISTORY:

    NOTES:

(See projects/themis/spacecraft/particles/ESA/packet/thm_load_esa_cal.pro)

## THM_LOAD_ESA_MAG

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	thm_load_esa_mag
    PURPOSE:
    	Add magnetometer data to the ESA structures
    INPUT:

    KEYWORDS:
    	probe:		strarr		themis spacecraft - "a", "b", "c", "d", "e"
    					if not set defaults to all
    	sc:		strarr		themis spacecraft - "a", "b", "c", "d", "e"
    					if not set defaults to all
    	themishome:	string		path to data dir, where data dir contains the th* dir, where *=a,b,c,d,e
    	datatype	string or 0/1	if not set, uses fgs
    					if set to 1, uses fgl
    					if string, uses string data type
    					fgl and fge data averaged by "time_average" with resolution=2s before interpolation
    					all mag data are interpolated to center of esa data collection

    CREATED BY:	J. McFadden	07/05/27
    VERSION:	1
    LAST MODIFICATION:  08/04/16
    MOD HISTORY:
    				08/04/16	added probe keyword
    				09/04/29	changed from time_average to smooth_in_time

    NOTES:

(See projects/themis/spacecraft/particles/ESA/packet/thm_load_esa_mag.pro)

## THM_LOAD_ESA_PKT

[Previous Routine] [Next Routine] [List of Routines]

    Procedure: THM_LOAD_ESA_PKT

    Purpose:  Loads THEMIS ESA data

    keywords:
      probe = Probe name. The default is 'all', i.e., load all available probes.
              This can be an array of strings, e.g., ['a', 'b'] or a
              single string delimited by spaces, e.g., 'a b'
      datatype = The type of data to be loaded:
    		'peif','peir','peib','peef','peer','peeb'
    		if not set, default is all variables
      TRANGE= (Optional) Time range of interest  (2 element array), if
              this is not set, the default is to prompt the user. Note
              that if the input time range is not a full day, a full
              day's data is loaded
      use_eclipse_corrections = Flag to specify which spin model will be used:
          0 - No corrections (default)
          1 - Use partial corrections
          2 - Use full eclipse corrections
      /GET_SUPPORT_DATA: load support_data variables as well as data variables
                          into tplot variables.
      /DOWNLOADONLY: download file but don't read it.
      /valid_names, if set, then this routine will return the valid probe, datatype
              and/or level options in named variables supplied as
              arguments to the corresponding keywords.
      files   named varible for output of pathnames of local files.
      /VERBOSE  set to output some useful info
     	suffix		string		"suffix" is appended to the default tplot names

    Example:
       thg_load_esa,/get_suppport_data,probe=['a', 'b']

    CREATED BY:	J. McFadden	  07/03/22
    VERSION:	1
    LAST MODIFICATION:  08/05/14
    MOD HISTORY:
    			suffix keyword added  			08/05/14 jmcfadden
    			trange keyword made functional 		09/08/25 bkerr
    			trange keyword function corrected 	10/07/23 jmcfadden
    			clipping and no_clipping added		11/01/04 jmcfadden

(See projects/themis/spacecraft/particles/ESA/packet/thm_load_esa_pkt.pro)

## THM_LOAD_ESA_POT

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	thm_load_esa_pot
    PURPOSE:
    	Add spacecraft potential data to the ESA structures
    INPUT:

    KEYWORDS:
    	probe:		string		themis spacecraft - "a", "b", "c", "d", "e"
    					if not set defaults to "a"
    	sc:		string		themis spacecraft - "a", "b", "c", "d", "e"
    					if not set defaults to "a"
     trange:  (string/double) two element string specifying the requested time range
    	themishome:	string		path to data dir, where data dir contains the th* dir, where *=a,b,c,d,e
    	efi_datatype	string or 0/1	if not set, uses a combination of spin averaged moment data and v1234 spin averaged data
    					if set to 1, uses vaf v12 data
    					if string, uses string data type - mom or v12, v34, v1234 where the latter are vaf data
    					vaf data is averaged by "time_average" with resolution=3s before interpolation
    					s/c potential data are interpolated to center of esa data collection
     datatype(deprecated): same as efi_datatype, but deprecated for clarity
    	pot_scale:	real		scale factor applied to measured EFI sensor potential, default=1.15
    	offset:		real		EFI sensor to plasma potential offset, default=1.0 V
    	min_pot:	real		minimum potential allowed, default=2.0
    	make_plot:	0/1		if set, makes tplot structure of potential
    	tr4_min_pot:		str/dbl		2 element array of times to fix s/c pot at min_pot
           use_vaf_offset  0/1             if set, uses vaf data for potential when available, calculates an offset
                                           between the (mom) pxxm_pot value and vaf value and appplies the offset
                                           to the pxxm_pot value for the times for which no vaf data is available.
    CREATED BY:	J. McFadden	  07-07-23
    VERSION:	1
    LAST MODIFICATION:  08-01-02
    MOD HISTORY:
    			07-12-27	corrected mom packet timing and potential
    			08-01-02	added trange keyword
    			08-04-16	default datatype changed to optimize between mom-pot and vaf-v1234-pot
    			09-06-10	expanded mom_pot_adjust for multiple changes in scale/offset algorithm
    			09-06-24	force use of mom pot during sphere shadow season
    			09-06-25	better sphere shadow season bad point removal algorithm, removed forcing mom pot during sphere shadow season
    			09-09-12	change algorith to set sc_pot to min_pot for times before booms deployed
       2014-01-27  changing trange to tr4_min_pot, implementing trange as requested data time range

    		TBDs
    			09-06-25	need to include an ~1.03 mom_pot correction factor for (v1234_avg)/(V3_snapshot) differences
    			09-06-25	need to identify why (v1234_avg)/V3_snapshot varies in time -- may be braid dependent or IDPU timing
    			09-06-25	scale factor for measure potential to Vsc seems to require 1.04 when in solar wind
    			10-01-12	need to change change default scale to 1.04 and offset to 0.2 when in solar wind, sheath or plasmasphere
    			10-01-12	may need a braid mode dependent value for scale and offsets
    			10-01-28	the 1.03 (v1234_avg)/(V3_snapshot) factor could be determined on the fly from nearby data
    NOTES:

(See projects/themis/spacecraft/particles/ESA/packet/thm_load_esa_pot.pro)

## THM_LOAD_PEEB

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	thm_load_peeb
    PURPOSE:
    	Decommutates the raw THEMIS electron esa burst data packets, (peeb - apid 459), and puts data structure in a common for access by get_th*_peeb.pro and generates tplot energy spectrogram
    INPUT:

    KEYWORDS:
    	file:		string, strarr	the complete path and filename to the raw pkt files
    					if not set, uses timerange to select files
    	sc:		string		themis spacecraft - "a", "b", "c", "d", "e"
    					if not set defaults to "a"
    	themishome:	string		path to data dir, where data dir contains the th* dir, where *=a,b,c,d,e
    	gap_time	real		data gaps greater than gap_time have a NAN replacing a data point in tplot structures
     	suffix		string		"suffix" is appended to the default tplot names

    CREATED BY:	J. McFadden	  07/03/18
    VERSION:	1
    LAST MODIFICATION:  08/05/14
    MOD HISTORY:
    			suffix keyword added  08/05/14

    NOTES:

(See projects/themis/spacecraft/particles/ESA/packet/thm_load_peeb.pro)

## THM_LOAD_PEEF

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	thm_load_peef
    PURPOSE:
    	Decommutates the raw THEMIS electron esa full data packets, (peef - apid 457), and puts data structure in a common for access by get_th*_peef.pro and generates tplot energy spectrogram
    INPUT:

    KEYWORDS:
    	file:		string, strarr	the complete path and filename to the raw pkt files
    					if not set, uses timerange to select files
    	sc:		string		themis spacecraft - "a", "b", "c", "d", "e"
    					if not set defaults to "a"
    	themishome:	string		path to data dir, where data dir contains the th* dir, where *=a,b,c,d,e
    	gap_time	real		data gaps greater than gap_time have a NAN replacing a data point in tplot structures
     	suffix		string		"suffix" is appended to the default tplot names

    CREATED BY:	J. McFadden	  07/03/18
    VERSION:	1
    LAST MODIFICATION:  08/05/14
    MOD HISTORY:
    			suffix keyword added  08/05/14

    NOTES:

(See projects/themis/spacecraft/particles/ESA/packet/thm_load_peef.pro)

## THM_LOAD_PEER

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	thm_load_peer
    PURPOSE:
    	Decommutates the raw THEMIS electron esa reduced data packets, (peer - apid 458), and puts data structure in a common for access by get_th*_peer.pro and generates tplot energy spectrogram
    INPUT:

    KEYWORDS:
    	file:		string, strarr	the complete path and filename to the raw pkt files
    					if not set, uses timerange to select files
    	sc:		string		themis spacecraft - "a", "b", "c", "d", "e"
    					if not set defaults to "a"
    	themishome:	string		path to data dir, where data dir contains the th* dir, where *=a,b,c,d,e
    	gap_time	real		data gaps greater than gap_time have a NAN replacing a data point in tplot structures
     	suffix		string		"suffix" is appended to the default tplot names

    CREATED BY:	J. McFadden	  07/03/18
    VERSION:	1
    LAST MODIFICATION:  08/05/14
    MOD HISTORY:
    			suffix keyword added  08/05/14

    NOTES:

(See projects/themis/spacecraft/particles/ESA/packet/thm_load_peer.pro)

## THM_LOAD_PEIB

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	thm_load_peib
    PURPOSE:
    	Decommutates the raw THEMIS ion esa full data packets, (peib - apid 456), and puts data structure in a common for access by get_th*_peib.pro and generates tplot energy spectrogram
    INPUT:

    KEYWORDS:
    	file:		string, strarr	the complete path and filename to the raw pkt files
    					if not set, uses timerange to select files
    	sc:		string		themis spacecraft - "a", "b", "c", "d", "e"
    					if not set defaults to "a"
    	themishome:	string		path to data dir, where data dir contains the th* dir, where *=a,b,c,d,e
    	gap_time	real		data gaps greater than gap_time have a NAN replacing a data point in tplot structures
     	suffix		string		"suffix" is appended to the default tplot names

    CREATED BY:	J. McFadden	  07/03/18
    VERSION:	1
    LAST MODIFICATION:  08/05/14
    MOD HISTORY:
    			suffix keyword added  08/05/14
    NOTES:

(See projects/themis/spacecraft/particles/ESA/packet/thm_load_peib.pro)

## THM_LOAD_PEIF

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	thm_load_peif
    PURPOSE:
    	Decommutates the raw THEMIS ion esa full data packets, (peif - apid 454), and puts data structure in a common for access by get_th*_peif.pro and generates tplot energy spectrogram
    INPUT:

    KEYWORDS:
    	file:		string, strarr	the complete path and filename to the raw pkt files
    					if not set, uses timerange to select files
    	sc:		string		themis spacecraft - "a", "b", "c", "d", "e"
    					if not set defaults to "a"
    	themishome:	string		path to data dir, where data dir contains the th* dir, where *=a,b,c,d,e
    	gap_time	real		data gaps greater than gap_time have a NAN replacing a data point in tplot structures
     	suffix		string		"suffix" is appended to the default tplot names

    CREATED BY:	J. McFadden	  07/03/18
    VERSION:	1
    LAST MODIFICATION:  08/05/14
    MOD HISTORY:
    			suffix keyword added  08/05/14
    NOTES:

(See projects/themis/spacecraft/particles/ESA/packet/thm_load_peif.pro)

## THM_LOAD_PEIR

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	thm_load_peir
    PURPOSE:
    	Decommutates the raw THEMIS ion esa reduced data packets, (peir - apid 455), and puts data structure in a common for access by get_th*_peir.pro and generates tplot energy spectrogram
    INPUT:

    KEYWORDS:
    	file:		string, strarr	the complete path and filename to the raw pkt files
    					if not set, uses timerange to select files
    	sc:		string		themis spacecraft - "a", "b", "c", "d", "e"
    					if not set defaults to "a"
    	themishome:	string		path to data dir, where data dir contains the th* dir, where *=a,b,c,d,e
    	gap_time	real		data gaps greater than gap_time have a NAN replacing a data point in tplot structures
     	suffix		string		"suffix" is appended to the default tplot names

    CREATED BY:	J. McFadden	  07/03/18
    VERSION:	1
    LAST MODIFICATION:  08/05/14
    MOD HISTORY:
    			suffix keyword added  08/05/14
    NOTES:

(See projects/themis/spacecraft/particles/ESA/packet/thm_load_peir.pro)

## THM_LOAD_SPINMODEL

[Previous Routine] [Next Routine] [List of Routines]

    Function:	thm_load_spinmodel(sc=sc,themishome=themishome)
    PURPOSE:
    	Returns template for spinmodel.txt files
    INPUT:

    KEYWORDS:

    		sc	string		spacecraft designation: 'a','b','c','d','e'
    	themishome:	string		path to data dir, where data dir contains the th* dir, where *=a,b,c,d,e
    	available	0,1		if data is available, "available" is set to 1

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/04/02
    MOD HISTORY:

    NOTES:
    	Used by thm_load_***.pro where ***=ief,ieb,ier,eef,eeb,eer.

(See projects/themis/spacecraft/particles/ESA/packet/thm_load_spinmodel.pro)

## THM_MAKE_ESA_MAG

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	thm_make_esa_mag
    PURPOSE:
    	Make a tplot structure out of ESA magnetometer data
    INPUT:

    KEYWORDS:
    	probe:		strarr		themis spacecraft - "a", "b", "c", "d", "e"
    					if not set defaults to all
    	sc:		strarr		themis spacecraft - "a", "b", "c", "d", "e"
    					if not set defaults to all
    	themishome:	string		path to data dir, where data dir contains the th* dir, where *=a,b,c,d,e

    CREATED BY:	J. McFadden	08/12/07
    VERSION:	1
    LAST MODIFICATION:  08/12/07
    MOD HISTORY:

    NOTES:

(See projects/themis/spacecraft/particles/ESA/packet/thm_make_esa_mag.pro)

## THM_READ_EESA_ANGLE_REDUCED_MODE

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	thm_read_eesa_angle_reduced_mode
    PURPOSE:
    	Returns data structure with angle maps
    INPUT:

    KEYWORDS:

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Used by thm_load_esa_pkt.pro

(See projects/themis/spacecraft/particles/ESA/packet/thm_read_eesa_angle_reduced_mode.pro)

## THM_READ_ESA_ANGLE_BURST_MODE

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	thm_read_esa_angle_burst_mode
    PURPOSE:
    	Returns data structure with angle maps
    INPUT:

    KEYWORDS:

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Used by thm_load_esa_pkt.pro

(See projects/themis/spacecraft/particles/ESA/packet/thm_read_esa_angle_burst_mode.pro)

## THM_READ_ESA_ANGLE_FULL_MODE

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	thm_read_esa_angle_full_mode
    PURPOSE:
    	Returns data structure with angle maps
    INPUT:

    KEYWORDS:

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    		corrected a small error in the ion phi angle map for solar wind mode
    NOTES:
    	Used by thm_load_esa_pkt.pro

(See projects/themis/spacecraft/particles/ESA/packet/thm_read_esa_angle_full_mode.pro)

## THM_READ_ESA_SWEEP_BURST_MODE

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	thm_read_esa_sweep_burst_mode
    PURPOSE:
    	Returns data structure with energy sweep tables
    INPUT:
    	fm	int		flight model of esa sensor for energy calibration

    KEYWORDS:

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Used by thm_load_esa_pkt.pro

(See projects/themis/spacecraft/particles/ESA/packet/thm_read_esa_sweep_burst_mode.pro)

## THM_READ_ESA_SWEEP_FULL_MODE

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	thm_read_esa_sweep_full_mode
    PURPOSE:
    	Returns data structure with energy sweep tables
    INPUT:
    	fm	int		flight model of esa sensor for energy calibration

    KEYWORDS:

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Used by thm_load_esa_pkt.pro

(See projects/themis/spacecraft/particles/ESA/packet/thm_read_esa_sweep_full_mode.pro)

## THM_READ_ESA_SWEEP_REDUCED_MODE

[Previous Routine] [Next Routine] [List of Routines]

    PROCEDURE:	thm_read_esa_sweep_reduced_mode
    PURPOSE:
    	Returns data structure with energy sweep tables
    INPUT:
    	fm	int		flight model of esa sensor for energy calibration

    KEYWORDS:

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Used by thm_load_esa_pkt.pro

(See projects/themis/spacecraft/particles/ESA/packet/thm_read_esa_sweep_reduced_mode.pro)

## THM_READ_IESA_ANGLE_REDUCED_MODE

[Previous Routine] [List of Routines]

    PROCEDURE:	thm_read_iesa_angle_reduced_mode
    PURPOSE:
    	Returns data structure with angle maps
    INPUT:

    KEYWORDS:

    CREATED BY:	J. McFadden
    VERSION:	1
    LAST MODIFICATION:  07/03/22
    MOD HISTORY:

    NOTES:
    	Used by thm_load_esa_pkt.pro

(See projects/themis/spacecraft/particles/ESA/packet/thm_read_iesa_angle_reduced_mode.pro)