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

Last modified: Tue Aug 5 18:17:40 2025.

# Directory Listing of Routines

# projects/kaguya/map

- KGY_CLEAR_COM
  undefine structures in the kgy common blocks
- KGY_MAP_LOAD
  downloads and reads in Kaguya MAP/PACE+LMAG and SPICE data files
- KGY_MAP_MAKE_PAD
  generates PAD tplot vairables
- KGY_MAP_MAKE_TPLOT
  generates tplot variables from data stored in common blocks:
- KGY_MAP_QL_DL
  downloads Kaguya MAP quicklook plots

# Routine Descriptions

## KGY_CLEAR_COM

[Next Routine] [List of Routines]

     PROCEDURE:
           kgy_clear_com
     PURPOSE:
           undefine structures in the kgy common blocks
     CALLING SEQUENCE:
           kgy_clear_com
     KEYWORDS:
           onlydata: undefines data structures and keeps info and fov structures
     CREATED BY:
           Yuki Harada on 2014-07-03

     $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/kgy_clear_com.pro $

(See projects/kaguya/map/kgy_clear_com.pro)

## KGY_MAP_LOAD

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

     PROCEDURE:
         kgy_map_load
     PURPOSE:
         downloads and reads in Kaguya MAP/PACE+LMAG and SPICE data files
         and generates tplot variables
          (wrapper routine for 'kgy_read_*' and 'kgy_map_make_tplot')
     CALLING SEQUENCE:
         timespan,'2008-01-01',2
         kgy_map_load, sensor=[0,1,4]
     OPTIONAL KEYWORDS:
         sensor: 0: ESA-S1, 1: ESA-S2, 2: IMA, 3: IEA, 4: LMAG (Def. all)
         append: if set, does not clear data common blocks
         trange: time range
         bkgd: background counts
               currently just subtracts uniform bkgd from each solid angle bin
         nospice: if set, does not load SPICE
     NOTES:
         Eflux is converted from total counts at each energy step
         without taking into account relative sensitivity variation and
         count correction.
     CREATED BY:
         Yuki Harada on 2014-07-02

     $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/kgy_map_load.pro $

(See projects/kaguya/map/kgy_map_load.pro)

## KGY_MAP_MAKE_PAD

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

     PROCEDURE:
         kgy_map_make_pad
     PURPOSE:
         generates PAD tplot vairables
     CALLING SEQUENCE:
         kgy_map_make_pad,sensor=[0,1],erange=[100,200]
     INPUTS:
         none
     OPTIONAL KEYWORDS:
         sensor: 0: ESA-S1, 1: ESA-S2, 2: IMA, 3: IEA (Def. [0,1])
         trange: time range (Def. all)
         erange: energy range (Def: [150,250])
         num_pa: number of pitch angle bins
                 (Def: 32 for high-angular resolutions, 16 for low res)
         noinfoangle: if set, uses FOV angles instead of accurate INFO angles
         nocntcorr: if set, does not conduct count correction (event & trash correction)
         gf_thld: gfactor thresholds = [ esa1, esa2, ima, iea ]
                  gf < gf_thld => gf = 0
                  Def: [ 2.e-4, 2.e-5, 1.e-6, 1.e-6 ]
         bkgd: background counts (Def. 0)
               currently just subtracts uniform bkgd from each solid angle bin
         thrange: |theta| range (def. [10,80])
         suffix: suffix of the tplot variable name
     NOTES:
         In high angular resolution mode, only high sensitivity angles
         are used by default (i.e., counts in small gfactor bins are
         discarded).
     CREATED BY:
         Yuki Harada on 2015-01-23

     $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/kgy_map_make_pad.pro $

(See projects/kaguya/map/kgy_map_make_pad.pro)

## KGY_MAP_MAKE_TPLOT

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

     PROCEDURE:
         kgy_map_make_tplot
     PURPOSE:
         generates tplot variables from data stored in common blocks:
            energy-time spectrograms from PACE data,
            time-series B-fields and s/c locations from LMAG data
     CALLING SEQUENCE:
         kgy_map_make_tplot, sensor=[0,1]
     INPUTS:
         none
     OPTIONAL KEYWORDS:
         sensor: 0: ESA-S1, 1: ESA-S2, 2: IMA, 3: IEA, 4: LMAG (Def. all)
         trange: time range (Def. all)
         bkgd: background counts (Def. 0)
               currently just subtracts uniform bkgd from each solid angle bin
         suffix: suffix of the tplot variable names
     CREATED BY:
         Yuki Harada on 2015-01-23

     $LastChangedBy: haraday $
     $LastChangedDate: 2025-02-24 23:31:40 -0800 (Mon, 24 Feb 2025) $
     $LastChangedRevision: 33148 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/kaguya/map/kgy_map_make_tplot.pro $

(See projects/kaguya/map/kgy_map_make_tplot.pro)

## KGY_MAP_QL_DL

[Previous Routine] [List of Routines]

     PROCEDURE:
           kgy_map_ql_dl
     PURPOSE:
           downloads Kaguya MAP quicklook plots
     CALLING SEQUENCE:
           timespan,'2008-01-01',30
           kgy_map_ql_dl
     KEYWORDS:
           trange: time range
           outfiles: returns plot file paths
     CREATED BY:
           Yuki Harada on 2016-10-07

     $LastChangedBy: haraday $
     $LastChangedDate: 2017-11-21 12:02:46 -0800 (Tue, 21 Nov 2017) $
     $LastChangedRevision: 24333 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/kaguya/map/kgy_map_ql_dl.pro $

(See projects/kaguya/map/kgy_map_ql_dl.pro)