This page was created by the IDL library routine mk_html_help2.

Last modified: Thu Aug 6 12:53:14 2020.


Directory Listing of Routines


Routine Descriptions

TEST_ASK_CAL2

[Next Routine] [List of Routines]
Checks ASK MLAT and MLON values for v02 cal files versus v01 values
for the first tme in each file.
Input station, output cal01 and cal02 are the output cal structures.
example: 
test_ask_cal2, 'gill'
Plots will show version 02 ask mlat, mlon as line, version 01 ask
mlat, mlon as red plus signs.
ro test_ask_cal2, station, cal01, cal02

(See projects/themis/ground/test_ask_cal2.pro)


THM_ALT_STACKPLOT.PRO

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       thm_alt_stackplot.pro

 PURPOSE:
       To create 3 PNG files displaying the H,D and Z components of the magnetic field
	from multiple GBO stations out of GMAG data that is stored in CDF file.

 CALLING SEQUENCE:
       thm_alt_stackplot, date, duration, stack_shift=stack_shift, no_expose=no_expose, make_png=make_png

 INPUTS:
       date: The start of the time interval to be plotted. (Format:
       'YYYY-MM-DD/hh:mm:ss')
	duration: The length of the interval being plotted. (Floating
	point number of days -> 12hr=0.5), default=1
	stack_shift: Space between stations on the y-axis (units are
	nanotesla), default=50
	no_expose: Set this keyword to prevent the plot from being
	printed to the screen. 
       make_png: Set this keyword to make the 3 PNG files. (OPTION
	NOT IMPLEMENTED
	max_deviation:  Large spikes in the data (probably gliches)
	can screw up the y-axis scales.  This keyword allows you to
	set the maximum deviation the data can go from the median;
	points that exceed this value are omitted. default value is
	plus or minus 1500 nT
	no_data_load:  This keyword prevents new data from being
	loaded; the routine will try to plot existing data if it exists.
 OUTPUTS:
       Plots...
; PROCEDURE:
       Read in data from CDF files; plot the data using tplot.pro routines;
       make PNG files with makegif.pro routine
 EXAMPLE:
       thm_alt_stackplot, '2006-11-11',1,/make_png, max_deviation=1500, stack_shift=200.
 MODIFICATION HISTORY:
       Written by:       Matt Davis
       October 23, 2006     Initial version
       Added dydt_spike_test, 7-apr-2008, jmm, jimm@ssl.berkeley.edu
       Hacked from thm_gmag_stackplot, this version makes no
       distinction between lo and hi lat's, just plots 8 per page,
       jmm, 31-aug-2009
 $LastChangedBy: aaflores $
 $LastChangedDate: 2012-01-09 09:54:03 -0800 (Mon, 09 Jan 2012) $
 $LastChangedRevision: 9515 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/themis/ground/thm_alt_stackplot.pro $

(See projects/themis/ground/thm_alt_stackplot.pro)


THM_ASI_CREATE_MOSAIC

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
    THM_ASI_CREATE_MOSAIC

 PURPOSE:
    create mosaic with all THEMIS ASI

 CATEGORY:
    None

 CALLING SEQUENCE:
    THM_ASI_CREATE_MOSAIC,time

 INPUTS:
    Time	like '2006-01-01/05:00:00'

 OPTIONAL INPUTS:
    None

 KEYWORD PARAMETERS:
    cal_files		calibration files if they do not need to be read
    pgm_file   	do not read CDF, but pgm-files
    verbose    	print some diagnostics
    insert		insert stop before end of program

    gif_out    	create a gif-file
    gif_dir		directory for gif-output

    exclude   		string of station names that should not be plotted
    show      		string of station names that should only be plotted
    minval		minimum value for black
    maxval		maximum value for white
    minimum_elevation	minimum elevation to plot in degrees
    mask		mask certain parts of image

    scale              scale for map set
    central_lon        geographic longitude of center of plot
    central_lat        geographic latitude of center of plot
    rotation		rotate map
    projection 	projection for map set, MAP_PROJ_INFO, PROJ_NAMES=names
    color_continent    shade of continent fill
    color_background   shade of background

    zbuffer   		do in z-buffer, not on the screen
    cursor    		finish with cursor info, loop if cursor>1
    window    		set window number
    xsize              xsize of window
    ysize              ysize of window
    position=position  position of plot on window (normal coordinates)
    noerase=noerase    do not erase current window (no effect if {x,y}size set
    keep_z		keep z-buffer open for further plotting

    no_grid=no_grid	do not plot geomagnetic grid
    no_midnight=no_midnight	do not plot midnight meridian
    no_label		do not label mosaic with date and time
    add_plot           stop because we want to add something
    force_map		plot map even if there are no images

    xy_pos             xy position
    location		mark geographic location [lo,la]
    track1             mark geographic location [lo,la]
    track2             mark geographic location [lo,la]

    top       		top color to be used for polyfill
    no_color		do not load color table, use existing
    xy_cursor		create array of cursor selected values to pass to upper program
    ssize		size of symbol for location
    sym_color		color of location

    stoptime		create multiple mosaics
    timestep		time steps for multiple mosaics in seconds

 OUTPUTS:
    None

 OPTIONAL OUTPUTS:
    None

 COMMON BLOCKS:
    None

 SIDE EFFECTS:
    None

 RESTRICTIONS:
    None

 EXAMPLE:
    THM_ASI_CREATE_MOSAIC,'2006-01-01/05:00:00'
    THM_ASI_CREATE_MOSAIC,'2007-03-01/04:00:00',/thumb,exclude='ekat'

 MODIFICATION HISTORY:
    Written by: Harald Frey, 02/06/2007
                based on example from Donovan/Jackel

                2007-03-15, hfrey, thumbnails, keyword exclude
                2007-03-27, hfrey, special treatment for not mapped thumbsnails
                2007-12-21, jmm, added explicit set_plot,'z' for zbuffer
                2008-07-21, jmm, added gif_dir, for output directory option
                2009-06-17, hfrey, a few additions to make my life easier
		 2009-11-10, cgabrielse, added xy_cursor keyword for
		 sending cursor values up level
                2012-07-02,  jmm, Added color_annotation keyword
                2017-01-26, jmm, Fixed proble with crashing on
                set_plot,'x' for windows

 NOTES:

 VERSION:
   $LastChangedBy: hfrey $
   $LastChangedDate: 2017-12-20 11:41:21 -0800 (Wed, 20 Dec 2017) $
   $LastChangedRevision: 24450 $
   $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/themis/ground/thm_asi_create_mosaic.pro $

(See projects/themis/ground/thm_asi_create_mosaic.pro)


THM_ASI_MERGE_MOSAIC

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
    THM_ASI_MERGE_MOSAIC

 PURPOSE:
    create mosaic with all THEMIS ASI

 CATEGORY:
    None

 CALLING SEQUENCE:
    THM_ASI_MERGE_MOSAIC,time

 INPUTS:
    Time	like '2006-01-01/05:00:00'

 OPTIONAL INPUTS:
    None

 KEYWORD PARAMETERS:
    cal_files		calibration files if they do not need to be read
    pgm_file   	do not read CDF, but pgm-files
    verbose    	print some diagnostics
    insert		insert stop before end of program

    gif_out    	create a gif-file
    gif_dir		directory for gif-output

    exclude   		string of station names that should not be plotted
    show      		string of station names that should only be plotted
    minval		minimum value for black
    maxval		maximum value for white
    minimum_elevation	minimum elevation to plot in degrees
    mask		mask certain parts of image

    scale              scale for map set
    central_lon        geographic longitude of center of plot
    central_lat        geographic latitude of center of plot
    rotation		rotate map
    projection 	projection for map set, MAP_PROJ_INFO, PROJ_NAMES=names
    color_continent    shade of continent fill
    color_background   shade of background

    zbuffer   		do in z-buffer, not on the screen
    cursor    		finish with cursor info, loop if cursor>1
    window    		set window number
    xsize              xsize of window
    ysize              ysize of window
    position=position  position of plot on window (normal coordinates)
    noerase=noerase    do not erase current window (no effect if {x,y}size set
    keep_z		keep z-buffer open for further plotting

    no_grid=no_grid	do not plot geomagnetic grid
    no_midnight=no_midnight	do not plot midnight meridian
    no_label		do not label mosaic with date and time
    add_plot           stop because we want to add something
    force_map		plot map even if there are no images

    xy_pos             xy position
    location		mark geographic location [lo,la]
    track1             mark geographic location [lo,la]
    track2             mark geographic location [lo,la]

    top       		top color to be used for polyfill
    no_color		do not load color table, use existing
    xy_cursor		create array of cursor selected values to pass to upper program
    ssize		size of symbol for location
    sym_color		color of location

    stoptime		create multiple mosaics
    timestep		time steps for multiple mosaics in seconds

 OUTPUTS:
    None

 OPTIONAL OUTPUTS:
    None

 COMMON BLOCKS:
    None

 SIDE EFFECTS:
    None

 RESTRICTIONS:
    None

 EXAMPLE:
    THM_ASI_MERGE_MOSAIC,'2006-01-01/05:00:00'
    THM_ASI_MERGE_MOSAIC,'2007-03-01/04:00:00',exclude='ekat'

 MODIFICATION HISTORY:
    Written by: Harald Frey, 09/06/2011
                based on example from Donovan/Jackel and thm_asi_create_mosaic

 NOTES:
     WARNING!!!!!!!!!!!!!!
     This program may not be perfect and may not work in every situation. Especially if stations
     are influenced by stray or moon light it may still be better to use thm_asi_create_mosaic.
     Also occasionally there are still sharp borders between overlapping images. If you encounter
     such a situation send me an email hfrey@ssl.berkeley.edu. (hfrey, 09/21/2011)

 VERSION:
   $LastChangedBy:
   $LastChangedDate:
   $LastChangedRevision:
   $URL:

(See projects/themis/ground/thm_asi_merge_mosaic.pro)


THM_ASI_RECREATE_MOSAIC

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
    THM_ASI_RECREATE_MOSAIC

 PURPOSE:
    recreate mosaic from gif-input

 CATEGORY:
    None

 CALLING SEQUENCE:
    THM_ASI_RECREATE_MOSAIC,file

 INPUTS:
    filename	like 'MOSA.2008.01.28.10.58.30.gif'

 OPTIONAL INPUTS:
    None

 KEYWORD PARAMETERS:
    no_view	do not regenerate mosaic, only show command

 OUTPUTS:
    None

 OPTIONAL OUTPUTS:
    None

 COMMON BLOCKS:
    None

 SIDE EFFECTS:
    None

 RESTRICTIONS:
    None

 EXAMPLE:
    THM_ASI_RECREATE_MOSAIC,'MOSA.2008.01.28.10.58.30.gif'

 MODIFICATION HISTORY:
    Written by: Harald Frey, 23/06/2009

 NOTES:
     
 VERSION:
   $LastChangedBy: aaflores $
   $LastChangedDate: 2012-01-09 09:54:03 -0800 (Mon, 09 Jan 2012) $
   $LastChangedRevision: 9515 $
   $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/themis/ground/thm_asi_recreate_mosaic.pro $

(See projects/themis/ground/thm_asi_recreate_mosaic.pro)


THM_ASI_STATIONS.PRO

[Previous Routine] [Next Routine] [List of Routines]
 NAME: 
    THM_ASI_STATIONS.PRO

 PURPOSE: 
    define quantities for GBO stations

 CATEGORY:
    None

 CALLING SEQUENCE:
    thm_asi_stations,labels,location

 INPUTS:
    None

 OPTIONAL INPUTS:
    None

 KEYWORD PARAMETERS:
    id		IP Adress of stations, now obsolete but we keep them for now
    epo        names and locations of EPO sites

 OUTPUTS:
    labels	Names of GBO stations
    location	Geographic location of stations

 OPTIONAL OUTPUTS:
    None

 COMMON BLOCKS:
    None

 SIDE EFFECTS:
    None

 RESTRICTIONS:
    None

 EXAMPLE:
 

 MODIFICATION HISTORY:
    Written by: Harald Frey
                Version 1.0 August, 23, 2006
                        1.1 09/29/06 changed order of UMIJ and CHBG
			 1.2 10/04/06 replaced UMIJ with SNKQ
                        1.3 03/19/07 added EPO, corrected typo
			 1.4 11/16/07 exchanged NAIN for KUUJ
			 1.5 03/17/08 added YKNF
                        1.6 10/09/08 added NRSQ

 VERSION:
   $LastChangedBy: hfrey $
   $LastChangedDate: 2008-11-19 14:50:04 -0800 (Wed, 19 Nov 2008) $
   $LastChangedRevision: 4004 $
   $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/themis/ground/thm_asi_stations.pro $
     

(See projects/themis/ground/thm_asi_stations.pro)


THM_GMAG_STACKPLOT.PRO

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       thm_gmag_stackplot.pro

 PURPOSE:
       To create 3 PNG files displaying the H,D and Z components of the magnetic field
	from multiple GBO stations out of GMAG data that is stored in CDF file.

 CALLING SEQUENCE:
       thm_gmag_stackplot, date, duration, stack_shift=stack_shift, no_expose=no_expose, make_png=make_png

 INPUTS:
       date: The start of the time interval to be plotted. (Format: 'YYYY-MM-DD/hh:mm:ss')
	duration: The length of the interval being plotted. (Floating point number of days -> 12hr=0.5), default=1
	stack_shift: Space between stations on the y-axis (units are nanotesla), default=50
	no_expose: Set this keyword to prevent the plot from being printed to the screen.
	make_png: Set this keyword to make the 3 PNG files.
	max_deviation:  Large spikes in the data (probably gliches) can screw up the y-axis scales.  This keyword allows
		you to set the maximum deviation the data can go from the median; points that exceed this value are omitted.
		The default value is plus or minus 1500 nT
	no_data_load:  This keyword prevents new data from being loaded; the routine will try to plot existing data if it exists.
	hi_lat:  Set this keyword to plot high latitude stations (above 49 degrees)
	lo_lat:  Set this keyword to plot low latitude stations (below 49 below)

 OUTPUTS:
       None, but it creates 3 PNG files in the directory that IDL is being run.

 PROCEDURE:
       Read in data from CDF files; plot the data using tplot.pro routines;
       make PNG files with makegif.pro routine

 EXAMPLE:
       thm_gmag_stackplot, '2006-11-11',1,/make_png, max_deviation=1500, stack_shift=200.

 MODIFICATION HISTORY:
       Written by:       Matt Davis
       October 23, 2006     Initial version
       Added dydt_spike_test, 7-apr-2008, jmm, jimm@ssl.berkeley.edu

NOTE: This program is still in development.  Features to be added:
	-generalizing the routine

(See projects/themis/ground/thm_gmag_stackplot.pro)


THM_GMAG_STACKPLOT_INTERVALS.PRO

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       thm_gmag_stackplot_intervals.pro

 PURPOSE:
       To create 3 PNG files displaying the H,D and Z components of the magnetic field
	from multiple GBO stations out of GMAG data that is stored in CDF file.

 CALLING SEQUENCE:
       thm_gmag_stackplot, date, duration, stack_shift=stack_shift, no_expose=no_expose, make_png=make_png

 INPUTS:
       date: The start of the time interval to be plotted. (Format: 'YYYY-MM-DD/hh:mm:ss')
	duration: The length of the interval being plotted. (Floating point number of days -> 12hr=0.5), default=1
	stack_shift: Space between stations on the y-axis (units are nanotesla), default=50
	no_expose: Set this keyword to prevent the plot from being printed to the screen.
	make_png: Set this keyword to make the 3 PNG files.
	max_deviation:  Large spikes in the data (probably gliches) can screw up the y-axis scales.  This keyword allows
		you to set the maximum deviation the data can go from the median; points that exceed this value are omitted.
		The default value is plus or minus 1500 nT
	no_data_load:  This keyword prevents new data from being loaded; the routine will try to plot existing data if it exists.
	hi_lat:  Set this keyword to plot high latitude stations (above 49 degrees)
	lo_lat:  Set this keyword to plot low latitude stations (below 49 below)

 OUTPUTS:
       None, but it creates 3 PNG files in the directory that IDL is being run.

 PROCEDURE:
       Read in data from CDF files; plot the data using tplot.pro routines;
       make PNG files with makegif.pro routine

 EXAMPLE:
       thm_gmag_stackplot, '2006-11-11',1,/make_png, max_deviation=1500, stack_shift=200.

 MODIFICATION HISTORY:
       Written by:       Matt Davis
       October 23, 2006     Initial version
       Added dydt_spike_test, 7-apr-2008, jmm, jimm@ssl.berkeley.edu

NOTE: This program is still in development.  Features to be added:
	-generalizing the routine

(See projects/themis/ground/thm_gmag_stackplot_intervals.pro)


THM_LOAD_ASI

[Previous Routine] [Next Routine] [List of Routines]
Procedure: THM_LOAD_ASI

 KEYWORD PARAMETERS:
  site  = Observatory name, example, thm_load_gmag, site = 'fykn', the
          default is 'all', i.e., load all available stations . This
          can be an array of strings, e.g., ['fykn', 'gako'] or a
          single string delimited by spaces, e.g., 'fykn gako'
  datatype = request 'ast' or 'asf', default is 'asf', can also be 'all'.
  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
  level = the level of the data, the default is 'l2', or level-2
          data. A string (e.g., 'l2') or an integer can be used. 'all'
          can be passed in also, to get all levels.
  /VERBOSE : set to output some useful info
  /downloadonly, if set, then only download the data, do not load it
                 into variables.
  /no_download: use only files which are online locally.
  relpathnames_all: named variable in which to return all files that are
          required for specified timespan, probe, datatype, and level.
          If present, no files will be downloaded, and no data will be loaded.
  /valid_names, if set, then this will return the valid site, datatype
                and/or level options in named variables, for example,

                thm_load_gmag, site = xxx, /valid_names

                will return the array of valid sites in the
                variable xxx
   /CURSOR	get time range with cursor
   /TIME       specify just one time (record) for data

Example:
   thm_load_asi,site='atha',time='2007-03-23/05:00:00'

Notes:

 To get an array of valid names make the following call;
   thm_load_asi,site=vn,/valid_names
 No further action will be taken.


Written by: Ken Bromund ????,   Jan 5 2007
 $LastChangedBy: egrimes $
 $LastChangedDate: 2018-12-21 11:50:27 -0800 (Fri, 21 Dec 2018) $
 $LastChangedRevision: 26397 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/themis/ground/thm_load_asi.pro $

(See projects/themis/ground/thm_load_asi.pro)


THM_LOAD_ASI_CAL

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
    THM_LOAD_ASI_CAL

 SYNTAX:
    thm_load_asi_cal,'fykn',fykn_cal

 PURPOSE:
   load the ASI calibration parameters into tplot variables

 INPUTS:
   SITE	names of GBO stations requested

 OUTPUTS:
   CAL_STRUC   structure containing pointers to calibration parameters

 KEYWORDS:
   TRANGE= (Optional) Time range of interest  (2 element array).
   /VERBOSE : set to output some useful info
   /ALL	get data from all 20 THEMIS-GBO
   /DOWNLOADONLY   
   /VALID_NAMES
   /CURSOR	get time range with cursor
   REGO	read cal-file for REGO camera instead of THEMIS

 HISTORY:
   adapted from thm_load_asi
   2015-07-21, hfrey, included call to REGO cal-files
   2020-06-09, jmm, checks for v02 files and corrects mlat and mlon
   variables for ASK data.

 Notes:

 To get an array of valid names make the following call;
   thm_load_asi_cal,valid_names=vn
 No further action will be taken.

Written by: Harald Frey,   Jan 26 2007
   $LastChangedBy: jimm $
   $LastChangedDate: 2020-07-20 10:58:45 -0700 (Mon, 20 Jul 2020) $
   $LastChangedRevision: 28913 $
   $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/themis/ground/thm_load_asi_cal.pro $

(See projects/themis/ground/thm_load_asi_cal.pro)


THM_LOAD_ASK

[Previous Routine] [Next Routine] [List of Routines]
Procedure: THM_LOAD_ASK

Purpose:  Loads THEMIS All Sky Keograms

keywords:
  site  = Observatory name, example, thm_load_gmag, site = 'fykn', the
          default is 'all', i.e., load all available stations . This
          can be an array of strings, e.g., ['fykn', 'gako'] or a
          single string delimited by spaces, e.g., 'fykn gako'
  datatype = request 'ast' or 'asf', default is 'asf', can also be 'all'.
  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
  level = the level of the data, the default is 'l2', or level-2
          data. A string (e.g., 'l2') or an integer can be used. 'all'
          can be passed in also, to get all levels.
  /VERBOSE : set to output some useful info
  /downloadonly, if set, then only download the data, do not load it
                 into variables.
  /no_download: use only files which are online locally.
  relpathnames_all: named variable in which to return all files that are
          required for specified timespan, probe, datatype, and level.
          If present, no files will be downloaded, and no data will be loaded.
  /valid_names, if set, then this will return the valid site, datatype
                and/or level options in named variables, for example,

                thm_load_gmag, site = xxx, /valid_names

                will return the array of valid sites in the
                variable xxx
  get_support_data = does nothing.  present only for consistency with other
                load routines
  rego		read red-line data instead of THEMIS white light

Example:
   thg_load_ask
Notes:
  This routine is (should be) platform independent.


 $LastChangedBy: hfrey $
 $LastChangedDate: 2016-02-29 12:10:52 -0800 (Mon, 29 Feb 2016) $
 $LastChangedRevision: Added valid_names output option$
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/themis/ground/thm_load_ask.pro $

(See projects/themis/ground/thm_load_ask.pro)


THM_LOAD_CARISMA_GMAG

[Previous Routine] [Next Routine] [List of Routines]
Procedure: THM_LOAD_CARISMA_GMAG,
 thm_load_carisma_gmag, site = site, datatype = datatype, trange = trange, $
                level = level, verbose = verbose, $
                subtract_average = subtract_average, $
                subtract_median = subtract_median, $
                varname_out = varname_out, $
                subtracted_values = subtracted_values, $
                downloadonly = downloadonly, $
                valid_names = valid_names
                
 NOTE: 
 1. Data from the CARISMA gmag sites loaded by this routine is not mirrored by THEMIS. The data is downloaded
 directly from CARISMA (UAlberta) to the user's computer.
 Users of CARISMA data should be sure to read the Data Policy information at http://themis.ssl.berkeley.edu/roadrules.shtml
 before using this data for publication.
 
 2. The data for some sites in the CARISMA network is mirrored by THEMIS: namely Rankin Inlet, Fort Smith, Gillam, Pinawa
 Fort Simpson. Data for these sites is loaded using the standard thm_load_gmag process.
 
 

keywords:
  site  = Observatory name, example, thm_load_carisma_gmag, site = 'daws', the
          default is 'all', i.e., load all available stations . This
          can be an array of strings, e.g., ['daws', 'isll'] or a
          single string delimited by spaces, e.g., 'daws isll'. The
          valid site names for this case are:

          anna back cont daws eski fchp fchu 
          gull isll lgrr mcmu mstk norm
          osak oxfo pols rabb sach talo 
          thrf vulc weyb wgry 

          These names correspond to gmags at these locations:
          Ann Arbor, Back Lake, Contwoyto, Dawson City, Eskimo Point, Fort Chipewyan, Fort Churchill, 
          Gull Lake, Island Lake, Little Grand Rapids, Fort McMurray, Ministik Lake, Norman Wells,
          Osakis, Oxford House, Polson, Rabbit Lake, Rankin Inlet, Sachs Harbour, Taloyoak,
          Thief River Falls, Vulcan, Weyburn, Wells Gray.
          
          NB: 
          1. The CARISMA fchu (Fort Churchill) magnetometer is distinct from the CANMOS fcc magnetometer at Fort Churchill.
          2. The gmag site TALO is a CARISMA site. There is also a THEMIS ASI site TALO.
          3. Data for some sites may not yet be available.  
            
  datatype = The type of data to be loaded, for this case, there is only
          one option, the default value of 'mag', so this is a
          placeholder should there be more that one data type. 'all'
          can be passed in also, to get 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
  level = the level of the data, the default is 'l2', or level-2
          data. A string (e.g., 'l2') or an integer can be used. 
          (in this case there is only one level of data available)
  /VERBOSE : set to output some useful info
  /SUBTRACT_AVERAGE, if set, then the average values are subtracted
                     from the loaded variables,
  /SUBTRACT_MEDIAN, if set, then the median values are subtracted
                     from the loaded variables,
  varname_out= a string array containing the tplot variable names for
               the loaded data, useful for the following keyword:
  subtracted_values = returns N_elements(varname_out) by 3 array
                      containing the average or median (or 0) values
                      subtracted from the data.
  /downloadonly, if set, then only download the data, do not load it
                 into variables.
  no_download: use only files which are online locally.
  relpathnames_all: named variable in which to return all files that are
          required for specified timespan, probe, datatype, and level.
          If present, no files will be downloaded, and no data will be loaded.
  /valid_names, if set, then this will return the valid site, datatype
                and/or level options in named variables, for example,

                thm_load_carisma_gmag, site = xxx, /valid_names

                will return the array of valid sites in the
                variable xxx
 get_support_data = does nothing.  present only for consistency with other
                load routines

Example:
   timespan, '2010-06-04',1
   thm_load_carisma_gmag, site = 'daws'


 $LastChangedBy: egrimes $
 $LastChangedDate: 2014-02-13 12:14:35 -0800 (Thu, 13 Feb 2014) $
 $LastChangedRevision: 14372 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/themis/ground/thm_load_carisma_gmag.pro $

(See projects/themis/ground/thm_load_carisma_gmag.pro)


THM_LOAD_GMAG

[Previous Routine] [Next Routine] [List of Routines]
Procedure: THM_LOAD_GMAG,
 thm_load_gmag, site = site, datatype = datatype, trange = trange, $
                level = level, verbose = verbose, $
                subtract_average = subtract_average, $
                subtract_median = subtract_median, $
                varname_out = varname_out, $
                subtracted_values = subtracted_values, $
                downloadonly = downloadonly, $
                valid_names = valid_names
keywords:
  site  = Observatory name, example, thm_load_gmag, site = 'bmls', the
          default is 'all', i.e., load all available stations . This
          can be an array of strings, e.g., ['bmls', 'ccmv'] or a
          single string delimited by spaces, e.g., 'bmls ccnv'
  datatype = The type of data to be loaded, for this case, there is only
          one option, the default value of 'mag', so this is a
          placeholder should there be more that one data type. 'all'
          can be passed in also, to get 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
  level = the level of the data, the default is 'l2', or level-2
          data. A string (e.g., 'l2') or an integer can be used. 'all'
          can be passed in also, to get all levels.
  /VERBOSE : set to output some useful info
  /SUBTRACT_AVERAGE, if set, then the average values are subtracted
                     from the loaded variables,
  /SUBTRACT_MEDIAN, if set, then the median values are subtracted
                     from the loaded variables,
  varname_out= a string array containing the tplot variable names for
               the loaded data, useful for the following keyword:
  subtracted_values = returns N_elements(varname_out) by 3 array
                      containing the average or median (or 0) values
                      subtracted from the data.
  /downloadonly, if set, then only download the data, do not load it
                 into variables.
  no_download: use only files which are online locally.
  relpathnames_all: named variable in which to return all files that are
          required for specified timespan, probe, datatype, and level.
          If present, no files will be downloaded, and no data will be loaded.
  /valid_names, if set, then this will return the valid site, datatype
                and/or level options in named variables, for example,
0
                thm_load_gmag, site = xxx, /valid_names

                will return the array of valid sites in the
                variable xxx
                Valid names will be returned sorted by network unless the keyword /sort_by_alpha
                is set in which case the sites will be alphabetized
 /sort_by_alpha = Set this keyword to return the list of valid names sorted alphabetically rather
                  than by network                
 get_support_data = does nothing.  present only for consistency with other
                load routines
       
 /thm_sites = Set this keyword to load magnetometer from the THEMIS GBO network
 
 /tgo_sites = Set this keyword to load magnetometers from the TGO magnetometer network(Courtesy of DTU, Norway)
 
 /dtu_sites = Set this keyword to load magnetometers from the DTU magnetometer network
 (note that this keyword does not currently load (dnb, nrd) as only old uncalibrated data is available)
 /ua_sites = Set this keyword to load magnetometers from the University of Alaska magnetometer network.
 
 /maccs_sites = Set this keyword to load magnetometers from the MACCS network.
 
 /usgs_sites = Set this keyword to load magnetometers from the USGS network.

 /atha_sites = Set this keyword to load magnetometers from the U Athabasca or AUTUMN network.
 
 /epo_sites = Set this keyword to load magnetometers that are EPO sites

 /falcon_sites = Set this keyword to load magnetometers that are Falcon netword sites

 /carisma_sites = Set this keyword to load magnetometers that are carisma sites

 /mcmac_sites = Set this keyword to load magnetometers that are mcmac sites

 /nrcan_sites = Set this keyword to load magnetometers that are nrcan sites

 /step_sites = Set this keyword to load magnetometers that are STEP sites

 /fmi_sites = Set this keyword to load magnetometers that are FMI sites
 
 /aari_sites = Set this keyword to load magnetometers that are AARI sites
 
Example:
   thm_load_gmag, site = 'bmls', trange =
   ['2007-01-22/00:00:00','2007-01-24/00:00:00']

 WARNING:  As with all GMAG data, users should be careful to verify data units and coordinate
           systems, as calibrations can drift from true values over time.  Users should be particularly
           careful with the older data from the DMI/DTU network.

Written by: Davin Larson,   Dec 2006
 22-jan-2007, jmm, jimm@ssl.berkeley.edu rewrote argument list, added
 keywords,
 1-feb-2007, jmm, added subtract_median, subtracted_value keywords
 19-mar-2007, jmm, fixed the station list...
 1-may-2009, jmm, removed greenland_data keyword, the greenland
                  stations are now valid site names
 3-jun-2009, jmm, added stations cdrt, crvr, gjoa, rbay, pang, tbdl
                  MACCS data from Augsburg
 1-Jan-2011, prc, Extended support for DTU gmag provider. (DTU & TGO networks) Detailed info on sites is here: http://flux.phys.uit.no/geomag.html
 7-Jan-2011, prc, Added site selection keywords for MACCS and University of Alaska. 
 6-May-2011, lphilpott, Updated site lists for DTU and TGO ('greenland') networks and added a warning about uncalibrated data.
 20_Aug-2012, clrussell, Added new USGS sites and new site VLDR to list of valid sites
 11-Sep-2012, clrussell, Added site network keywords for UAthabasca (AUTUMN) and USGS and EPO
 24-Sep-2012, clrussell, Added new keyword /sort_by_alpha which will return the list of valid stations sorted by order 
                         rather than by network.
 04-Apr-2012, clrussell, Added units to the data_att structure
 
 $LastChangedBy: crussell $
 $LastChangedDate: 2019-04-12 11:58:43 -0700 (Fri, 12 Apr 2019) $
 $LastChangedRevision: 27009 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/themis/ground/thm_load_gmag.pro $

(See projects/themis/ground/thm_load_gmag.pro)


THM_LOAD_GMAG_NETWORKS

[Previous Routine] [Next Routine] [List of Routines]
NAME:
   thm_load_gmag_networks
 
PURPOSE:   
   Loads the GMAG networks and stations from file gmag_stations.txt, which recides in the same directory. 

KEYWORDS:
   gmag_networks: list of gmag networks (gima, carisma, etc)
   gmag_stations: list of gmag station codes (abk, atha, etc)
   selected_network: list of selected networks
   
EXAMPLES:
   thm_load_gmag_networks, gmag_networks=gmag_networks, gmag_stations=gmag_stations
   thm_load_gmag_networks, gmag_networks=gmag_networks, gmag_stations=gmag_stations, selected_network=['gima', 'autumnx']

HISTORY:
 $LastChangedBy: nikos $
 $LastChangedDate: 2018-10-04 10:33:24 -0700 (Thu, 04 Oct 2018) $
 $LastChangedRevision: 25913 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/themis/ground/thm_load_gmag_networks.pro $

(See projects/themis/ground/thm_load_gmag_networks.pro)


THM_LOAD_GREENLAND_GMAG

[Previous Routine] [Next Routine] [List of Routines]
Procedure: THM_LOAD_GREENLAND_GMAG,
 thm_load_greenland_gmag, site = site, datatype = datatype, trange = trange, $
                level = level, verbose = verbose, $
                subtract_average = subtract_average, $
                subtract_median = subtract_median, $
                varname_out = varname_out, $
                subtracted_values = subtracted_values, $
                downloadonly = downloadonly, $
                valid_names = valid_names
keywords:
  site  = Observatory name, example, thm_load_greenland_gmag, site = 'amk', the
          default is 'all', i.e., load all available stations . This
          can be an array of strings, e.g., ['amk', 'atu'] or a
          single string delimited by spaces, e.g., 'amk atu'. The
          valid site names for this case are:

          amk and atu bfe bjn dmh dob don fhb gdh ghb hop jck kar kuv lyr
          nal naq nor nrd roe rvk sco skt sol sor stf svs tdc thl tro umq upn

          These names correspond to gmags at these locations:
          Ammassalik(Tasiilaq) Andenes Attu Brorfelde Bjornoya Danmarkshavn Dombas Donna Paamiut(Frederickshap) Qeqertarsuaq(Godhavn) Nuuk(Godthap) Hopen Jackvik Karmoy
          Kullorsuaq Longyearbyen NyAlesund Naqsarsuaq Nordkapp Nord Roemoe Rorvik Ittoqqortoormiit Maniitsoq(SukkerToppen) Solund Soroya
          Kangerlussuaq(SondreStromFjord) Savissivik TristanDaCunha Qaanaaq(Thule) Tromso Umanaq Upernavik
          
          Note that the station 'naq' is the THEMIS GMAG
            station 'NRSQ'
            
  datatype = The type of data to be loaded, for this case, there is only
          one option, the default value of 'mag', so this is a
          placeholder should there be more that one data type. 'all'
          can be passed in also, to get 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
  level = the level of the data, the default is 'l2', or level-2
          data. A string (e.g., 'l2') or an integer can be used. 'all'
          can be passed in also, to get all levels.
  /VERBOSE : set to output some useful info
  /SUBTRACT_AVERAGE, if set, then the average values are subtracted
                     from the loaded variables,
  /SUBTRACT_MEDIAN, if set, then the median values are subtracted
                     from the loaded variables,
  varname_out= a string array containing the tplot variable names for
               the loaded data, useful for the following keyword:
  subtracted_values = returns N_elements(varname_out) by 3 array
                      containing the average or median (or 0) values
                      subtracted from the data.
  /downloadonly, if set, then only download the data, do not load it
                 into variables.
  no_download: use only files which are online locally.
  relpathnames_all: named variable in which to return all files that are
          required for specified timespan, probe, datatype, and level.
          If present, no files will be downloaded, and no data will be loaded.
  /valid_names, if set, then this will return the valid site, datatype
                and/or level options in named variables, for example,

                thm_load_greenland_gmag, site = xxx, /valid_names

                will return the array of valid sites in the
                variable xxx
 get_support_data = does nothing.  present only for consistency with other
                load routines

Example:
   timespan, '2007-06-04',1
   thm_load_greenland_gmag, site = 'amk'

 19-mar-2007, jmm, chnaged name from thm_load_gmag, to read greenland
              gmag stations not included in the usual GMAG distribution
 05-may-2011 lphilpott, updated site lists
 $LastChangedBy: crussell $
 $LastChangedDate: 2017-01-10 09:41:22 -0800 (Tue, 10 Jan 2017) $
 $LastChangedRevision: 22560 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/themis/ground/thm_load_greenland_gmag.pro $

(See projects/themis/ground/thm_load_greenland_gmag.pro)


THM_LOAD_PSEUDOAE

[Previous Routine] [Next Routine] [List of Routines]
Procedure: THM_LOAD_PSEUDOAE,
 thm_load_pseudoAE, datatype = datatype, trange = trange, $
                verbose = verbose, $
                varname_out = varname_out, $
                downloadonly = downloadonly, $
                no_download=no_download,
                relpathnames_all=relpathnames_all,$
                files=files,$
                valid_names = valid_names,$
                suffix=suffix
                
Purpose:
  loads pregenerated Pseudo AE,AU,AL from CDF.  These are called "Pseudo" because
  while they use the same algorithm as the global AE,AU,AL, they are generated
  only from THEMIS GMAGs and thus represent, only a sampling of the Northern Hemisphere
  
  
keywords:
  datatype = The type of data to be loaded. Can be 'al','au','ae', or 'all'
  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
   level = ignored, only one level for this datatype: L1
  /VERBOSE : set to output some useful info
  varname_out= a string array containing the tplot variable names for
               the loaded data
  /downloadonly, if set, then only download the data, do not load it
                 into variables.
  /no_download: use only files which are online locally.
  relpathnames_all: named variable in which to return all files that are
          required for specified timespan, probe, datatype, and level.
          If present, no files will be downloaded, and no data will be loaded.
  files   named varible for output of pathnames of local files.
  /valid_names, if set, then this will return the valid site, datatype
                and/or level options in named variables, for example,
                thm_load_gmag, site = xxx, /valid_names
                will return the array of valid sites in the
                variable xxx
  suffix= suffix to add to output data quantity (not added to support data)

Examples:
   timespan,'2007-03-23'
   thm_load_pseudoAE
   thm_load_pseudoAE,datatype='AE',trange=['2007-01-22/00:00:00','2007-01-24/00:00:00']

 $LastChangedBy: egrimes $
 $LastChangedDate: 2018-12-21 11:50:27 -0800 (Fri, 21 Dec 2018) $
 $LastChangedRevision: 26397 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/themis/ground/thm_load_pseudoae.pro $

(See projects/themis/ground/thm_load_pseudoae.pro)


THM_LOAD_REGO

[Previous Routine] [Next Routine] [List of Routines]
Procedure: THM_LOAD_ASI

 KEYWORD PARAMETERS:
  site  = Observatory name, example, thm_load_gmag, site = 'fykn', the
          default is 'all', i.e., load all available stations . This
          can be an array of strings, e.g., ['fykn', 'gako'] or a
          single string delimited by spaces, e.g., 'fykn gako'
  datatype = request 'ast' or 'asf', default is 'asf', can also be 'all'.
  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
  level = the level of the data, the default is 'l2', or level-2
          data. A string (e.g., 'l2') or an integer can be used. 'all'
          can be passed in also, to get all levels.
  /VERBOSE : set to output some useful info
  /downloadonly, if set, then only download the data, do not load it
                 into variables.
  /no_download: use only files which are online locally.
  relpathnames_all: named variable in which to return all files that are
          required for specified timespan, probe, datatype, and level.
          If present, no files will be downloaded, and no data will be loaded.
  /valid_names, if set, then this will return the valid site, datatype
                and/or level options in named variables, for example,

                thm_load_gmag, site = xxx, /valid_names

                will return the array of valid sites in the
                variable xxx
   /CURSOR	get time range with cursor
   /TIME       specify just one time (record) for data

Example:
   thm_load_asi,site='atha',time='2007-03-23/05:00:00'

Notes:

 To get an array of valid names make the following call;
   thm_load_asi,site=vn,/valid_names
 No further action will be taken.


Written by: Ken Bromund ????,   Jan 5 2007
 $LastChangedBy: egrimes $
 $LastChangedDate: 2018-12-21 11:50:27 -0800 (Fri, 21 Dec 2018) $
 $LastChangedRevision: 26397 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/themis/ground/thm_load_rego.pro $

(See projects/themis/ground/thm_load_rego.pro)


THM_MAKE_AE

[Previous Routine] [Next Routine] [List of Routines]
	Name:       THM_MAKE_AE

	Purpose:    This routine calculates the "pseudo" AE, AL, and AU geomagnetic
                   indices by using ground magnetometer data from THEMIS GBOs. The names
                   of all stations used for calculation are printed on the screen.
                   In future, it will be possible to include ground data from other
                   magnetometer networks. Note that currently the calculation of
                   the "pseudo" indices does not subtract quiet day variation but
                   simply the median.

       Syntax:     THM_MAKE_AE [, RES = float] [, SITES = string ] [, /NO_LOAD ]

	Parameters: None.

	Keywords:   res     = sampling interval (by default 60 sec)
                   sites   = observatory name; default is to use high-latitude
                             For dates prior to 2015-01-01 THEMIS sites are: 
                             ['atha', 'chbg', 'ekat', 'fsim', 'fsmi', 'fykn', $
                              'gako', 'gbay', 'gill', 'inuv', 'kapu', 'kian', $
                              'kuuj', 'mcgr', 'pgeo', 'pina', 'rank', 'snap', $
                              'snkq', 'tpas', 'whit', 'yknf', 'fcc', 'cmo', $
                              'naq', 'lrv'] ;made an array to facilitate the use of split_vec later
                             For dates on or after 2015-01-01 sites are:
                   sites = ['atha', 'chbg', 'ekat', 'fsim', 'fsmi', 'fykn', $
                             'gako', 'gbay', 'gill', 'inuv', 'kapu', 'kian', $
                             'kuuj', 'mcgr', 'pgeo', 'pina', 'rank', 'snap', $
                             'snkq', 'tpas', 'whit', 'yknf', 'fcc', 'cmo', $
                             'naq', 'lrv'] 
                              ** Sites were changed from 2015 because many of the 
                                 original sites were no longer operational or 
                                 had poor quality data. Also because so many new
                                 networks were added to the magnetometer data
                                 served at UCB and UCLA
                             If set to 'all', all available sites
                             will be loaded and used.
                             
                             
                   no_load = if set, use existing gmag (THEMIS) tplot variables which have
                             already been loaded into the active TDAS environment
                             if not set, load gmag data (either
                             remotely or from computer disk)
                   max_deviation = The maximum deviation that the
                                   magnetic field  data can go from the median;
                                   points that exceed this value are omitted.
                   		    The default value is plus or minus 1500 nT


	Example:    see crib sheet "thm_crib_make_AE.pro"

       Notes:      Written by Andreas Keiling, 15 May 2008

       Modifications:
                   Edited header, put subroutine before main body so
                   that it would compile before being called by the
                   main body, W.M.Feuerstein, 6/2/2008.
                   Changed default sites to be only high-lat THEMIS
                   stations:  jmm, 25-nov-2009
                   Added FCC, CMO, NAQ, LRV as sites, 17-sep-2012,
                   jmm
                   Added max deviation, extra despike of magnetic
                   field prior to index calculation, 4-nov-2013, jmm
                   Added new site list for 2015 and later 22-may-2015, clr

 $LastChangedBy: egrimes $
 $LastChangedDate: 2015-08-24 12:33:21 -0700 (Mon, 24 Aug 2015) $
 $LastChangedRevision: 18592 $
 $URL $

(See projects/themis/ground/thm_make_ae.pro)


THM_MULT_GMAG_PLOT.PRO

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       thm_mult_gmag_plot.pro
 PURPOSE:
       Plots all GMAG data, in groups of 3 (or anything set by
       keyword n_per_page) for quick viewing
 CALLING SEQUENCE:
       thm_mult_gmag_plot, date, duration
 INPUTS:
       date: The start of the time interval to be plotted. (Format:
       'YYYY-MM-DD/hh:mm:ss')
	duration: The length of the interval being plotted. (Floating
	point number of days -> 12hr=0.5), default=1
	no_data_load:  This keyword prevents new data from being
	loaded; the routine will try to plot existing data if it
	exists.
       n_per_page: plots this many stations at a time, default is 3
 OUTPUTS:
       Plots...
 MODIFICATION HISTORY:
       jmm, 1-sep-2009, jimm@ssl.berkeley.edu
 $LastChangedBy: aaflores $
 $LastChangedDate: 2012-01-09 09:54:03 -0800 (Mon, 09 Jan 2012) $
 $LastChangedRevision: 9515 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/themis/ground/thm_mult_gmag_plot.pro $

(See projects/themis/ground/thm_mult_gmag_plot.pro)


THM_PLOT_GMAG_BY_SOURCE

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       thm_plot_gmag_by_source
 PURPOSE:
       Plots all GMAG data, arranged by the data source (e.g., THEMIS
       EPO, GBO, u of alaska, etc...) for quick viewing
 CALLING SEQUENCE:
       thm_mult_gmag_plot, date, duration
 INPUTS:
       date: The start of the time interval to be plotted. (Format:
       'YYYY-MM-DD/hh:mm:ss')
	duration: The length of the interval being plotted. (Floating
	point number of days -> 12hr=0.5), default=1
	no_data_load:  This keyword prevents new data from being
	loaded; the routine will try to plot existing data if it
	exists.
       source_in: Any or all of 'EPO/UCLA', 'GBO/UCalgary',
       'GBO/Ualberta', 'Ualaska', 'MACCS', 'Misc'. The default is to
       use all. Can be an array or string with spaces.
 OUTPUTS:
       Plots...
 MODIFICATION HISTORY:
       jmm, 4-Jan-2010, jimm@ssl.berkeley.edu
 $LastChangedBy: nikos $
 $LastChangedDate: 2018-10-04 10:33:24 -0700 (Thu, 04 Oct 2018) $
 $LastChangedRevision: 25913 $
 $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/tags/spedas_4_0/projects/themis/ground/thm_plot_gmag_by_source.pro $

(See projects/themis/ground/thm_plot_gmag_by_source.pro)


THM_REGO_CREATE_MOSAIC

[Previous Routine] [List of Routines]
 NAME:
    THM_REGO_CREATE_MOSAIC

 PURPOSE:
    create mosaic with all REGO ASI

 CATEGORY:
    None

 CALLING SEQUENCE:
    THM_REGO_CREATE_MOSAIC,time

 INPUTS:
    Time	like '2006-01-01/05:00:00'

 OPTIONAL INPUTS:
    None

 KEYWORD PARAMETERS:
    cal_files		calibration files if they do not need to be read
    pgm_file   	do not read CDF, but pgm-files
    verbose    	print some diagnostics
    insert		insert stop before end of program

    gif_out    	create a gif-file
    gif_dir		directory for gif-output

    exclude   		string of station names that should not be plotted
    show      		string of station names that should only be plotted
    minval		minimum value for black
    maxval		maximum value for white
    minimum_elevation	minimum elevation to plot in degrees
    mask		mask certain parts of image

    scale              scale for map set
    central_lon        geographic longitude of center of plot
    central_lat        geographic latitude of center of plot
    rotation		rotate map
    projection 	projection for map set, MAP_PROJ_INFO, PROJ_NAMES=names
    color_continent    shade of continent fill
    color_background   shade of background

    zbuffer   		do in z-buffer, not on the screen
    cursor    		finish with cursor info, loop if cursor>1
    window    		set window number
    xsize              xsize of window
    ysize              ysize of window
    position=position  position of plot on window (normal coordinates)
    noerase=noerase    do not erase current window (no effect if {x,y}size set
    keep_z		keep z-buffer open for further plotting

    no_grid=no_grid	do not plot geomagnetic grid
    no_midnight=no_midnight	do not plot midnight meridian
    no_label		do not label mosaic with date and time
    add_plot           stop because we want to add something
    force_map		plot map even if there are no images

    xy_pos             xy position
    location		mark geographic location [lo,la]
    track1             mark geographic location [lo,la]
    track2             mark geographic location [lo,la]

    top       		top color to be used for polyfill
    no_color		do not load color table, use existing
    xy_cursor		create array of cursor selected values to pass to upper program
    ssize		size of symbol for location
    sym_color		color of location

    stoptime		create multiple mosaics
    timestep		time steps for multiple mosaics in seconds

 OUTPUTS:
    None

 OPTIONAL OUTPUTS:
    None

 COMMON BLOCKS:
    None

 SIDE EFFECTS:
    None

 RESTRICTIONS:
    None

 EXAMPLE:
    THM_REGO_CREATE_MOSAIC,'2014-12-01/00:50:00'
    THM_REGO_CREATE_MOSAIC,'2014-12-01/00:50:00',/thumb,exclude='atha'

 MODIFICATION HISTORY:
    Written by: Harald Frey, 02/06/2007
                based on example from Donovan/Jackel

                2007-03-15, hfrey, thumbnails, keyword exclude
                2007-03-27, hfrey, special treatment for not mapped thumbsnails
                2007-12-21, jmm, added explicit set_plot,'z' for zbuffer
                2008-07-21, jmm, added gif_dir, for output directory option
                2009-06-17, hfrey, a few additions to make my life easier
		 2009-11-10, cgabrielse, added xy_cursor keyword for
		 sending cursor values up level
                2012-07-02,  jmm, Added color_annotation keyword
                2015-07-21, hfrey, adapted for REGO images

 NOTES:

 VERSION:
   $LastChangedBy: hfrey $
   $LastChangedDate: 2014-01-07 12:17:57 -0800 (Tue, 07 Jan 2014) $
   $LastChangedRevision: 13811 $
   $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/ground/thm_asi_create_mosaic.pro $

(See projects/themis/ground/thm_rego_create_mosaic.pro)