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/kaguya/map/pace

- KGY_ESA1_GET3D
  returns an ESA-S1 3D data structure
- KGY_ESA2_GET3D
  returns an ESA-S2 3D data structure
- KGY_ESA_PAD_COMB
  generates combined e PAD tplot vairables
- KGY_ESA_PAD_RESTORE
  Restores pre-generated Kaguya ESA PADs
- KGY_ESA_PAD_SAVE
- KGY_IEA_GET3D
  returns an IEA 3D data structure
- KGY_IMA_EMSPEC
  Plots an energy-TOF profile
- KGY_IMA_GET3D
  returns an IMA 3D data structure
- KGY_IMA_HOSPEC
  Generates energy-time spectrograms for H+ and O+
- KGY_J_3D
  Returns the flux, [Jx,Jy,Jz], 1/(cm^2-s)
- KGY_MOM_CALC
  Computes velocity moments from Kaguya PACE data
- KGY_N_3D
  Returns the density, n, 1/cm^3
- KGY_P_3D
  Returns the pressure tensor, [Pxx,Pyy,Pzz,Pxy,Pxz,Pyz], eV/cm^3
- KGY_PACE_16X64TO4X16
  rebin a data structure w/ 16x64 angles into 4x16 angles
- KGY_PACE_COM
  stores the PACE static memory
- KGY_PACE_CONV_SABIN
  Converts data structure in [nene,ntheta,nphi] to [nene,nbins]
- KGY_PACE_CONVERT_FRAME
  Converts frame of 3d data using SPICE
- KGY_PACE_CONVERT_UNITS
  converts the units for a PACE 3d data structure
- KGY_PACE_INTERP
  Interpolates irregular [phi,theta] sampling into a regular grid
- KGY_PACE_PARASPEC
  generates energy spectra for 6 pitch angle ranges:
- KGY_PACE_PLOT3D_SNAP
  Plots 3D snapshots for times selected with the cursor in a tplot window.
- KGY_READ_FOV
  reads in Kaguya MAP/PACE FOV files
- KGY_READ_INF
  reads in Kaguya MAP/PACE information files
- KGY_READ_PBF
  reads in Kaguya MAP/PACE PBF format files
- KGY_READ_TOF
  reads in Kaguya MAP/PACE TOF files
- KGY_T_3D
  Returns the temperature, [Tx,Ty,Tz,Tavg], eV
- KGY_V_3D
  Returns the velocity, [Vx,Vy,Vz], km/s

# Routine Descriptions

## KGY_ESA1_GET3D

[Next Routine] [List of Routines]

     FUNCTION:
           kgy_esa1_get3d
     PURPOSE:
           returns an ESA-S1 3D data structure
     CALLING SEQUENCE:
           dat = kgy_esa1_get3d(time)
     OPTIONAL INPUTS:
           time: gets data at this time - otherwise uses index or clicks
                 Can be in any format accepted by time_double.
     KEYWORDS:
           index: gets data at this index value in the common block
           cntcorr: conducts count correction (event & trash correction)
           sabin: sorts into solid angle bins instead of (Npol,Naz)
                    compatible with the SSL infrastructure (Def: sabin=1)
           INFOangle: uses angles in the INFO files (Def: INFOangle = 1)
     CREATED BY:
           Yuki Harada on 2014-07-01

     $LastChangedBy: haraday $
     $LastChangedDate: 2025-02-20 21:55:42 -0800 (Thu, 20 Feb 2025) $
     $LastChangedRevision: 33143 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/kaguya/map/pace/kgy_esa1_get3d.pro $

(See projects/kaguya/map/pace/kgy_esa1_get3d.pro)

## KGY_ESA2_GET3D

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

     FUNCTION:
           kgy_esa2_get3d
     PURPOSE:
           returns an ESA-S2 3D data structure
     CALLING SEQUENCE:
           dat = kgy_esa2_get3d(time)
     OPTIONAL INPUTS:
           time: gets data at this time - otherwise uses index or clicks
                 Can be in any format accepted by time_double.
     KEYWORDS:
           index: gets data at this index value in the common block
           cntcorr: conducts count correction (event & trash correction)
           sabin: sorts into solid angle bins instead of (Npol,Naz)
                    compatible with the SSL infrastructure (Def: sabin=1)
           INFOangle: uses angles in the INFO files (Def: INFOangle = 1)
     CREATED BY:
           Yuki Harada on 2014-07-01

     $LastChangedBy: haraday $
     $LastChangedDate: 2025-02-20 21:55:42 -0800 (Thu, 20 Feb 2025) $
     $LastChangedRevision: 33143 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/kaguya/map/pace/kgy_esa2_get3d.pro $

(See projects/kaguya/map/pace/kgy_esa2_get3d.pro)

## KGY_ESA_PAD_COMB

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

     PROCEDURE:
         kgy_esa_pad_comb
     PURPOSE:
         generates combined e PAD tplot vairables
     CALLING SEQUENCE:
         kgy_esa_pad_comb
     OPTIONAL KEYWORDS:
     CREATED BY:
         Yuki Harada on 2018-05-28

     $LastChangedBy: haraday $
     $LastChangedDate: 2021-06-09 22:50:49 -0700 (Wed, 09 Jun 2021) $
     $LastChangedRevision: 30038 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/kaguya/map/pace/kgy_esa_pad_comb.pro $

(See projects/kaguya/map/pace/kgy_esa_pad_comb.pro)

## KGY_ESA_PAD_RESTORE

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

     PROCEDURE:
           kgy_esa_pad_restore
     PURPOSE:
           Restores pre-generated Kaguya ESA PADs
     KEYWORDS:
           trange: time range
     CREATED BY:
           Yuki Harada on 2018-06-02

     $LastChangedBy: haraday $
     $LastChangedDate: 2018-07-05 01:00:43 -0700 (Thu, 05 Jul 2018) $
     $LastChangedRevision: 25438 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/kaguya/map/pace/kgy_esa_pad_restore.pro $

(See projects/kaguya/map/pace/kgy_esa_pad_restore.pro)

## KGY_ESA_PAD_SAVE

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

     PROCEDURE:
           kgy_esa_pad_save
     CREATED BY:
           Yuki Harada on 2018-06-02

     $LastChangedBy: haraday $
     $LastChangedDate: 2021-06-09 22:50:49 -0700 (Wed, 09 Jun 2021) $
     $LastChangedRevision: 30038 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/kaguya/map/pace/kgy_esa_pad_save.pro $

(See projects/kaguya/map/pace/kgy_esa_pad_save.pro)

## KGY_IEA_GET3D

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

     FUNCTION:
           kgy_iea_get3d
     PURPOSE:
           returns an IEA 3D data structure
     CALLING SEQUENCE:
           dat = kgy_iea_get3d(time)
     OPTIONAL INPUTS:
           time: gets data at this time - otherwise uses index or clicks
                 Can be in any format accepted by time_double.
     KEYWORDS:
           index: gets data at this index value in the common block
           cntcorr: conducts count correction (event & trash correction)
           sabin: sorts into solid angle bins instead of (Npol,Naz)
                    compatible with the SSL infrastructure (Def: sabin=1)
           INFOangle: uses angles in the INFO files (Def: INFOangle = 1)
     CREATED BY:
           Yuki Harada on 2014-07-02

     $LastChangedBy: haraday $
     $LastChangedDate: 2025-02-20 21:55:42 -0800 (Thu, 20 Feb 2025) $
     $LastChangedRevision: 33143 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/kaguya/map/pace/kgy_iea_get3d.pro $

(See projects/kaguya/map/pace/kgy_iea_get3d.pro)

## KGY_IMA_EMSPEC

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

     PROCEDURE:
           kgy_ima_emspec
     PURPOSE:
           Plots an energy-TOF profile
     CALLING SEQUENCE:
           kgy_ima_emspec
     KEYWORDS:
           trange: time range
     CREATED BY:
           Yuki Harada on 2018-07-12

     $LastChangedBy: haraday $
     $LastChangedDate: 2023-06-30 01:34:53 -0700 (Fri, 30 Jun 2023) $
     $LastChangedRevision: 31915 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/kaguya/map/pace/kgy_ima_emspec.pro $

(See projects/kaguya/map/pace/kgy_ima_emspec.pro)

## KGY_IMA_GET3D

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

     FUNCTION:
           kgy_ima_get3d
     PURPOSE:
           returns an IMA 3D data structure
           sums up all mass channels and assumes protons
           Use kgy_ima_get4d (to be developed) to get mass separated data
     CALLING SEQUENCE:
           dat = kgy_ima_get3d(time)
     OPTIONAL INPUTS:
           time: gets data at this time - otherwise uses index or clicks
                 Can be in any format accepted by time_double.
     KEYWORDS:
           index: gets data at this index value in the common block
           cntcorr: conducts count correction (event & trash correction)
           sabin: sorts into solid angle bins instead of (Npol,Naz)
                    compatible with the SSL infrastructure (Def: sabin=1)
           INFOangle: uses angles in the INFO files (Def: INFOangle = 1)
     CREATED BY:
           Yuki Harada on 2014-07-02

     $LastChangedBy: haraday $
     $LastChangedDate: 2025-02-20 21:55:42 -0800 (Thu, 20 Feb 2025) $
     $LastChangedRevision: 33143 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/kaguya/map/pace/kgy_ima_get3d.pro $

(See projects/kaguya/map/pace/kgy_ima_get3d.pro)

## KGY_IMA_HOSPEC

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

     PROCEDURE:
           kgy_ima_hospec
     PURPOSE:
           Generates energy-time spectrograms for H+ and O+
     CALLING SEQUENCE:
           kgy_ima_hospec
     KEYWORDS:
           trange: time range
           tres: time resolution (Default: 512 s). Set tres=0 for highest res.
           polrange: polar angle range - see Figs. 22 and 24 of Saito+2010
           dtof: tof_cent*(1 +/- dtof) (Default: 0.1)
     CREATED BY:
           Yuki Harada on 2022-05-25

     $LastChangedBy: haraday $
     $LastChangedDate: 2021-11-08 22:03:15 +0900 (月, 08 11 2021) $
     $LastChangedRevision: 30409 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/kaguya/map/pace/kgy_ima_emspec.pro $

(See projects/kaguya/map/pace/kgy_ima_hospec.pro)

## KGY_J_3D

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

    FUNCTION:	kgy_j_3d
    INPUT:
    	dat:	structure,	2d data structure filled by get_eesa_surv, get_eesa_burst, etc.
    PURPOSE:
    	Returns the flux, [Jx,Jy,Jz], 1/(cm^2-s)
    CREATED BY:
    	Yuki Harada on 2018-05-09
           modified from j_3d and j_3d_new

(See projects/kaguya/map/pace/kgy_j_3d.pro)

## KGY_MOM_CALC

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

     PROCEDURE:
           kgy_mom_calc
     PURPOSE:
           Computes velocity moments from Kaguya PACE data
     KEYWORDS:
           trange: time range
           sensor: 0: ESA-S1, 1: ESA-S2, 2: IMA, 3: IEA (Def. all)
     CREATED BY:
           Yuki Harada on 2018-05-11

     $LastChangedBy: haraday $
     $LastChangedDate: 2022-01-16 20:35:30 -0800 (Sun, 16 Jan 2022) $
     $LastChangedRevision: 30515 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/kaguya/map/pace/kgy_mom_calc.pro $

(See projects/kaguya/map/pace/kgy_mom_calc.pro)

## KGY_N_3D

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

    FUNCTION:	kgy_n_3d
    INPUT:
    	dat:	structure,	2d data structure filled by get_eesa_surv, get_eesa_burst, etc.
    PURPOSE:
    	Returns the density, n, 1/cm^3
    NOTES:
    	Function normally called by "get_3dt" or "get_2dt" to
    	generate time series data for "tplot.pro".

    CREATED BY:
    	Yuki Harada on 2018-05-09
           modified from n_3d and n_3d_new

(See projects/kaguya/map/pace/kgy_n_3d.pro)

## KGY_PACE_16X64TO4X16

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

     FUNCTION:
           kgy_pace_16x64to4x16
     PURPOSE:
           rebin a data structure w/ 16x64 angles into 4x16 angles
     CALLING SEQUENCE:
           d2 = kgy_pace_16x64to4x16(dat)
     INPUTS:
           3d data structure generated by kgy_*_get3d
     KEYWORDS:

     CREATED BY:
           Yuki Harada on 2016-10-26

     $LastChangedBy: haraday $
     $LastChangedDate: 2016-10-26 10:34:33 -0700 (Wed, 26 Oct 2016) $
     $LastChangedRevision: 22200 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/kaguya/map/pace/kgy_pace_16x64to4x16.pro $

(See projects/kaguya/map/pace/kgy_pace_16x64to4x16.pro)

## KGY_PACE_COM

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

     COMMON BLOCK:
           kgy_pace_com
     PURPOSE:
           stores the PACE static memory
           *_info_str: information structures which contain energies,
                       angles, g-factors, etc.
           *_header_arr: header structure arrays which contain time,
                         sensor, mode and other information
           *_type??_arr: data structure arrays which typically contain
                         'event', 'cnt', and 'trash' tags
     CREATED BY:
           Yuki Harada on 2014-06-30

     $LastChangedBy: haraday $
     $LastChangedDate: 2021-11-08 05:03:15 -0800 (Mon, 08 Nov 2021) $
     $LastChangedRevision: 30409 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/kaguya/map/pace/kgy_pace_com.pro $

(See projects/kaguya/map/pace/kgy_pace_com.pro)

## KGY_PACE_CONVERT_FRAME

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

     FUNCTION:
           kgy_pace_convert_frame
     PURPOSE:
           Converts frame of 3d data using SPICE
           Available frames: SELENE_M_SPACECRAFT, MOON_ME, SSE, GSE
           'phi' and 'theta' tags will be converted
           'dphi' and 'dtheta' tags will NOT be converted
     CALLING SEQUENCE:
           dnew = kgy_pace_convert_frame(d,newframe='MOON_ME')
     INPUTS:
           3d data structure created by kgy_*_get3d
     KEYWORDS:
           oldframe: old frame (Def. frame defined in the input data)
           newframe: new frame (Def. 'SSE')
           vnew: returns new velocity vectors = {vx:vxnew,vy:vynew,vz:vznew}
     CREATED BY:
           Yuki Harada on 2016-09-17

     $LastChangedBy: haraday $
     $LastChangedDate: 2016-09-17 14:37:45 -0700 (Sat, 17 Sep 2016) $
     $LastChangedRevision: 21850 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/kaguya/map/pace/kgy_pace_convert_frame.pro $

(See projects/kaguya/map/pace/kgy_pace_convert_frame.pro)

## KGY_PACE_CONVERT_UNITS

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

     PROCEDURE:
           kgy_pace_convert_units
     PURPOSE:
           converts the units for a PACE 3d data structure
     CALLING SEQUENCE:
           kgy_pace_convert_units, dat, units
     INPUTS:
           dat: 3d data structure for ESA-S1/ESA-S2/IMA/IEA
           units: units to convet the structure to
     KEYWORDS:
           scale: returns an array of conversion factors used
           nan2zero: if set, NaN and infinite in data -> 0 and bins = 0
     NOTES:
           This procedure does NOT include deadtime corrections.
           Use /cntcorr keyword in kgy_*_get3d function to correct counts.
     CREATED BY:
           Yuki Harada on 2014-06-30

     $LastChangedBy: haraday $
     $LastChangedDate: 2016-09-09 11:33:47 -0700 (Fri, 09 Sep 2016) $
     $LastChangedRevision: 21810 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/kaguya/map/pace/kgy_pace_convert_units.pro $

(See projects/kaguya/map/pace/kgy_pace_convert_units.pro)

## KGY_PACE_CONV_SABIN

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

     PROCEDURE:
           kgy_pace_conv_sabin
     PURPOSE:
           Converts data structure in [nene,ntheta,nphi] to [nene,nbins]
     CALLING SEQUENCE:
           datnew = kgy_pace_conv_sabin(dat)
     INPUTS:
           3d data structure created by kgy_*_get3d
     CREATED BY:
           Yuki Harada on 2018-05-11

     $LastChangedBy: haraday $
     $LastChangedDate: 2018-05-10 19:25:52 -0700 (Thu, 10 May 2018) $
     $LastChangedRevision: 25196 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/kaguya/map/pace/kgy_pace_conv_sabin.pro $

(See projects/kaguya/map/pace/kgy_pace_conv_sabin.pro)

## KGY_PACE_INTERP

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

     FUNCTION:
           kgy_pace_interp
     PURPOSE:
           Interpolates irregular [phi,theta] sampling into a regular grid
     CALLING SEQUENCE:
           dnew = kgy_pace_interp(d)
     INPUTS:
           3d data structure returned by kgy_*_get3d(sabin=0)
     KEYWORDS:
           thld_gf: ignore data points w/ gfactor < thld_gf (Def: 1e-7)
     CREATED BY:
           Yuki Harada on 2018-05-10

     $LastChangedBy: haraday $
     $LastChangedDate: 2018-05-10 19:25:52 -0700 (Thu, 10 May 2018) $
     $LastChangedRevision: 25196 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/kaguya/map/pace/kgy_pace_interp.pro $

(See projects/kaguya/map/pace/kgy_pace_interp.pro)

## KGY_PACE_PARASPEC

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

     PROCEDURE:
           kgy_pace_paraspec
     PURPOSE:
           generates energy spectra for 6 pitch angle ranges:
           parapara  paramid  paraperp  antiperp  antimid  antipara
           0-30      30-60    60-90     90-120    120-150  150-180
     CALLING SEQUENCE:
           kgy_pace_paraspec, sensor=0
     KEYWORDS:
           trange: time range
           sensor: 0: ESA-S1, 1: ESA-S2, 2: IMA, 3: IEA (Def. [0,1])
           units: (Def: 'eflux')
     CREATED BY:
           Yuki Harada on 2016-10-26

     $LastChangedBy: haraday $
     $LastChangedDate: 2016-10-26 10:34:33 -0700 (Wed, 26 Oct 2016) $
     $LastChangedRevision: 22200 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/kaguya/map/pace/kgy_pace_paraspec.pro $

(See projects/kaguya/map/pace/kgy_pace_paraspec.pro)

## KGY_PACE_PLOT3D_SNAP

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

     PROCEDURE:
           kgy_pace_plot3d_snap
     PURPOSE:
           Plots 3D snapshots for times selected with the cursor in a tplot window.
           Hold down the left mouse button and slide for a movie effect.
     CALLING SEQUENCE:
           plot3d_options,map='cylindrical'
           kgy_pace_plot3d_snap,/log,units='counts',zrange=[1,100]
     KEYWORDS:
           frame: 'MOON_ME', 'SSE', 'GSE', or 'SELENE_M_SPACECRAFT'
                  (Def. 'SELENE_M_SPACECRAFT')
           window: window number (Def. a new window will be generated)
           sensor: sensor number (Def. selected according to the clicked tplot)
                   0: ESA-S1, 1: ESA-S2, 2: IMA, 3: IEA
           keepwin: do not delete the snap window
           other keyword will be passed to plot3d_new
     CREATED BY:
           Yuki Harada on 2016-09-17

     $LastChangedBy: haraday $
     $LastChangedDate: 2016-09-17 15:54:11 -0700 (Sat, 17 Sep 2016) $
     $LastChangedRevision: 21852 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/kaguya/map/pace/kgy_pace_plot3d_snap.pro $

(See projects/kaguya/map/pace/kgy_pace_plot3d_snap.pro)

## KGY_P_3D

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

    FUNCTION:	kgy_p_3d
    INPUT:
    	dat:	structure,	2d data structure filled by get_eesa_surv, get_eesa_burst, etc.
    PURPOSE:
    	Returns the pressure tensor, [Pxx,Pyy,Pzz,Pxy,Pxz,Pyz], eV/cm^3
    CREATED BY:
    	Yuki Harada on 2018-05-09
           modified from p_3d and p_3d_new
           sc_pot correction is NOT included!

(See projects/kaguya/map/pace/kgy_p_3d.pro)

## KGY_READ_FOV

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

     PROCEDURE:
         kgy_read_fov
     PURPOSE:
         reads in Kaguya MAP/PACE FOV files
         and stores data in a common block (kgy_pace_com)
     CALLING SEQUENCE:
         kgy_raed_fov, files
     INPUTS:
         files: full paths to the FOV files (gziped or decompressed)
                e.g., ['dir/esas1-ch_angle', $
                       'dir/esas1-pol_angle-RAM0', ...]
     KEYWORDS:
         load: if set, download and read in publicly available files
               (override any inputs)
     CREATED BY:
         Yuki Harada on 2014-07-01

     $LastChangedBy: haraday $
     $LastChangedDate: 2018-07-05 01:00:43 -0700 (Thu, 05 Jul 2018) $
     $LastChangedRevision: 25438 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/kaguya/map/pace/kgy_read_fov.pro $

(See projects/kaguya/map/pace/kgy_read_fov.pro)

## KGY_READ_INF

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

     PROCEDURE:
         kgy_read_inf
     PURPOSE:
         reads in Kaguya MAP/PACE information files
         and stores data in a common block (kgy_pace_com)
     CALLING SEQUENCE:
         kgy_raed_inf, files
     INPUTS:
         files: full paths to the info files (gziped or decompressed)
                e.g., ['dir/IEA_ENE_POL_AZ_GFACTOR_16X64_20080225.dat', $
                       'dir/IEA_ENE_POL_AZ_GFACTOR_4X16_20080226.dat', ...]
     KEYWORDS:
         load: if set, download and read in publicly available files
               (override any inputs)
     CREATED BY:
         Yuki Harada on 2014-06-29

     $LastChangedBy: haraday $
     $LastChangedDate: 2018-07-05 01:00:43 -0700 (Thu, 05 Jul 2018) $
     $LastChangedRevision: 25438 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/kaguya/map/pace/kgy_read_inf.pro $

(See projects/kaguya/map/pace/kgy_read_inf.pro)

## KGY_READ_PBF

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

     PROCEDURE:
         kgy_read_pbf
     PURPOSE:
         reads in Kaguya MAP/PACE PBF format files
         and stores data in a common block (kgy_pace_com)
     CALLING SEQUENCE:
         kgy_load_pbf, files, trange=trange
     INPUTS:
         files: full paths to the data files (gziped or decompressed)
                e.g., [ 'dir/PBF1_C_20080101_ESA1_V001_I.DAT.gz', $
                        'dir/PBF1_C_20080101_IEA_V001_I.DAT' ]
     KEYWORDS:
         trange: 2-element array specifying time range (optional, Def. 1day),
                 e.g., ['yyyy-mm-dd/hh:mm:ss','yyyy-mm-dd/hh:mm:ss']
                 Can be in any format accepted by time_double.
     NOTES:
         65535 = uint(-1) and 4294967295 = ulong(-1) mean NaN.
     CREATED BY:
         Yuki Harada on 2014-06-30
         Modified from 'read_pbf_v2.c' and 'paceql_outputdata_090805.h'

     $LastChangedBy: haraday $
     $LastChangedDate: 2016-09-09 11:33:47 -0700 (Fri, 09 Sep 2016) $
     $LastChangedRevision: 21810 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/kaguya/map/pace/kgy_read_pbf.pro $

(See projects/kaguya/map/pace/kgy_read_pbf.pro)

## KGY_READ_TOF

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

     PROCEDURE:
         kgy_read_tof
     PURPOSE:
         reads in Kaguya MAP/PACE TOF files
         and stores data in a common block (kgy_pace_com)
     CALLING SEQUENCE:
         kgy_raed_tof, files
     INPUTS:
         files: full paths to the TOF files
                e.g., ['dir/TOF_DATA_3He_8KeV.txt', $
                       'dir/TOF_DATA_3He_10KeV.txt', ...]
     KEYWORDS:
         load: if set, download and read in publicly available files
               (override any inputs)
     CREATED BY:
         Yuki Harada on 2021-11-08

     $LastChangedBy: haraday $
     $LastChangedDate: 2018-07-05 17:00:43 +0900 (Thu, 05 Jul 2018) $
     $LastChangedRevision: 25438 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/kaguya/map/pace/kgy_read_fov.pro $

(See projects/kaguya/map/pace/kgy_read_tof.pro)

## KGY_T_3D

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

    FUNCTION:	kgy_t_3d
    INPUT:
    	dat:	structure,	2d data structure filled by get_eesa_surv, get_eesa_burst, etc.
    PURPOSE:
    	Returns the temperature, [Tx,Ty,Tz,Tavg], eV
    NOTES:
    	Function normally called by "get_3dt" or "get_2dt" to
    	generate time series data for "tplot.pro".

    CREATED BY:
    	Yuki Harada on 2018-05-09
           modified from t_3d and t_3d_new

(See projects/kaguya/map/pace/kgy_t_3d.pro)

## KGY_V_3D

[Previous Routine] [List of Routines]

    FUNCTION:	kgy_v_3d
    INPUT:
    	dat:	structure,	2d data structure filled by get_eesa_surv, get_eesa_burst, etc.
    PURPOSE:
    	Returns the velocity, [Vx,Vy,Vz], km/s
    CREATED BY:
    	Yuki Harada on 2018-05-09
           modified from v_3d and v_3d_new

(See projects/kaguya/map/pace/kgy_v_3d.pro)