MediaWiki API result

This is the HTML representation of the JSON format. HTML is good for debugging, but is unsuitable for application use.

Specify the format parameter to change the output format. To see the non-HTML representation of the JSON format, set format=json.

See the complete documentation, or the API help for more information.

{
    "batchcomplete": "",
    "continue": {
        "gapcontinue": "SPEDAS_Presentations",
        "continue": "gapcontinue||"
    },
    "warnings": {
        "main": {
            "*": "Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes."
        },
        "revisions": {
            "*": "Because \"rvslots\" was not specified, a legacy format has been used for the output. This format is deprecated, and in the future the new format will always be used."
        }
    },
    "query": {
        "pages": {
            "5183": {
                "pageid": 5183,
                "ns": 0,
                "title": "SPEDAS Archive",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "== Nightly builds ==\n\n * [http://themis.ssl.berkeley.edu/socware/bleeding_edge/ Previous nightly builds] - This directory contains all the nightly \"bleeding edge\" SPEDAS source code zip files.  \n\n== Previous SPEDAS versions ==\n\n * [http://spedas.org/downloads/spedas_1_00.zip SPEDAS 1.0] - SPEDAS version 1.0 source code zip file.  \n * [http://spedas.org/downloads/spedas_2_00.zip SPEDAS 2.0] - SPEDAS version 2.0 source code zip file.  \n * [http://spedas.org/downloads/spedas_3_00.zip SPEDAS 3.0] - SPEDAS version 3.0 source code zip file."
                    }
                ]
            },
            "5161": {
                "pageid": 5161,
                "ns": 0,
                "title": "SPEDAS Developer's Guide",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "== Command Line ==\n\n=== Load Data ===\nCentral to all command-line plug-ins in SPEDAS is a routine (typcailly yyy_load_xyz, where YYY is the mission and XYZ is the instrument) or set of routines that grab remote data files from an HTTP/FTP server and loads those data into tplot variables. The simplest way to get started is to host your data on a [https://github.com/hapi-server HAPI server], and implement a yyy_load_xyz routine that loads the XYZ data from your HAPI server using hapi_load_data; the following is a simple example that loads Voyager LECP data:\n\n\n<syntaxhighlight lang=\"idl\">\n;+\n; NAME:\n;   voy_load_lecp\n;  \n; PURPOSE:\n;   Loads Voyager LECP flux data into tplot variables\n;\n; KEYWORDS:\n;  PROBE    = S/C number to load (default: 1)\n;  TRANGE   = Time range of interest  (2 element array), if\n;             this is not set, the default is to prompt the user. Note\n;             that if the input time range is not a full day, a full\n;             days data is loaded\n;\n; EXAMPLE:\n;   voy_load_lecp, trange=['1977-09-10', '1977-09-20'], probe=2\n;\n;-\n\npro voy_load_lecp, probe=probe, trange=trange, tplotnames=tplotnames, suffix=suffix\n  ; default to probe 1, and convert to a string if the user does supply the probe via a keyword\n  if undefined(probe) then probe = '1' else probe = strcompress(string(probe), /remove_all)\n  \n  ; simply load the LECP data from the example server\n  hapi_load_data, prefix='voy'+probe+'_', $\n                  trange=trange, $\n                  suffix=suffix, $\n                  dataset='spase://VEPO/NumericalData/Voyager'+probe+'/LECP/Flux.Proton.PT1H', $\n                  server='http://datashop.elasticbeanstalk.com/hapi', $\n                  tplotnames=tplotnames\n\nend\n</syntaxhighlight>\n\nFor more information on loading data from HAPI servers, see: [[Heliophysics_Application_Programmer\u2019s_Interface]].\n\n\nIf your data files are in CDF format, you can download them using spd_download, then load them into tplot variables using cdf2tplot. An example of loading CDF data files can be found below:\n\n\n<syntaxhighlight lang=\"idl\">\n;+\n; NAME:\n;   yyy_load_xyz\n;\n; PURPOSE:\n;   Loads data from the XYZ instrument onboard the YYY mission into tplot variables\n;\n; KEYWORDS:\n;  PROBE    = S/C ID to load\n;  TRANGE   = Time range of interest  (2 element array), if\n;             this is not set, the default is to prompt the user. Note\n;             that if the input time range is not a full day, a full\n;             days data is loaded\n;\n;  DATATYPE  = instrument datatype (allows you to set multiple types of data for\n;             the instrument)\n;             \n; EXAMPLE:\n;   yyy_load_xyz, trange=['1977-09-10', '1977-09-20'], probe='2'\n;\n; NOTES:\n;   this routine uses MGF data from Geotail hosted at SPDF as an example\n;   \n;-\n\n\npro yyy_load_xyz, probe=probe, trange=trange, datatype=datatype, no_color_setup=no_color_setup\n\n  ; initialize the system variable for this mission\n  yyy_init, no_color_setup=no_color_setup\n  \n  ; if the user provided a time range via the trange keyword, convert it to doubles\n  ; otherwise, prompt the user for their time range\n  if (keyword_set(trange) && n_elements(trange) eq 2) $\n    then tr = timerange(trange) $\n  else tr = timerange()\n  \n  ; set the top level directory for the remote server; this example shows the\n  ; MGF Geotail data at SPDF (so in this example, YYY = Geotail, XYZ = MGF\n  if not keyword_set(remote_data_dir) then remote_data_dir = 'https://spdf.sci.gsfc.nasa.gov/pub/data/geotail/mgf/'\n\n  ; set a default datatype if the user did not specify one via the datatype keyword\n  if undefined(datatype) then datatype = 'edb3sec_mgf'\n\n  ; next, we need to create an array of paths to the remote filenames; these paths \n  ; start at the remote_data_dir and go all the way to the file extension (i.e., .cdf);\n  ; note that wildcards ('*' and '?') are allowed and encouraged when you do not know part\n  ; of the CDF filename (e.g., the version numbers), and date/times are represented as:\n  ; YYYY = year\n  ; MM = month\n  ; DD = day\n  ; hh = hour\n  ; mm = minute\n  ; ss = second\n  for datatype_idx = 0, n_elements(datatype)-1 do begin\n    case strlowcase(datatype[datatype_idx]) of\n      'eda3sec_mgf': begin\n        append_array, pathformat, 'eda3sec_mgf/YYYY/ge_eda3sec_mgf_YYYYMMDD_v??.cdf'\n      end\n      'edb3sec_mgf': begin\n        append_array, pathformat, 'edb3sec_mgf/YYYY/ge_edb3sec_mgf_YYYYMMDD_v??.cdf'\n      end\n      'mgf_k0': begin\n        append_array, pathformat, 'mgf_k0/YYYY/ge_k0_mgf_YYYYMMDD_v??.cdf'\n      end\n    endcase\n  endfor\n\n  ; now we loop over the paths, convert the times using the requesed time range, download\n  ; the data files and load the files into tplot variables\n  for path_idx = 0, n_elements(pathformat)-1 do begin\n    ; use the file_dailynames routine to convert the time formats in the paths using\n    ; the users requested time range\n    relpathnames = file_dailynames(file_format=pathformat[path_idx], trange=tr, /unique, resolution=24l*3600)\n\n    ; use spd_download to download the data to the local data directory\n    files = spd_download(remote_file=relpathnames, remote_path=remote_data_dir, local_path = local_data_dir, ssl_verify_peer=0, ssl_verify_host=0)\n    \n    ; finally, load the CDF files into tplot variables using cdf2tplot\n    cdf2tplot, files, /all\n  endfor\n\nend\n</syntaxhighlight>\n\n\nFor reference, the data model for tplot variables can be found at:\nhttp://spedas.org/wiki/index.php?title=Data_model\n\n\n=== Configuration Settings ===\nThe main routine for controlling command-line configuration settings for mission YYY (stored in a system variable called !yyy) is called yyy_init; below is an example yyy_init file. \n\n\n<syntaxhighlight lang=\"idl\">\n;+\n; NAME:  \n;   yyy_init\n; \n; PURPOSE:    \n;   Initializes system variables for yyy data. Can be called from idl_startup to set\n;   custom locations.\n;-\n\npro yyy_init, reset=reset, local_data_dir=local_data_dir, remote_data_dir=remote_data_dir, no_color_setup=no_color_setup\n  defsysv,'!yyy',exists=exists\n  if not keyword_set(exists) then begin\n     defsysv,'!yyy',  file_retrieve(/structure_format)\n  endif\n  \n  if keyword_set(reset) then !yyy.init=0\n  \n  if !yyy.init ne 0 then return\n  \n  !yyy = file_retrieve(/structure_format)\n  \n  ;Read saved values from file\n  ftest = yyy_read_config()\n  \n  If(size(ftest, /type) Eq 8) && ~keyword_set(reset) Then Begin\n      !yyy.local_data_dir = ftest.local_data_dir\n      !yyy.remote_data_dir = ftest.remote_data_dir\n      !yyy.no_download = ftest.no_download\n      !yyy.no_update = ftest.no_update\n      !yyy.downloadonly = ftest.downloadonly\n      !yyy.verbose = ftest.verbose\n  Endif else begin; use defaults\n      if keyword_set(reset) then begin\n        print,'Resetting yyy to default configuration'\n      endif else begin\n        print,'No yyy config found...creating default configuration'\n      endelse\n      !yyy.local_data_dir = spd_default_local_data_dir()\n      !yyy.remote_data_dir = ''\n  endelse\n  \n  if file_test(!yyy.local_data_dir+'yyy/.master') then begin  ; Local directory IS the master directory\n      !yyy.no_server = 1\n  endif\n  \n  !yyy.init = 1\n  \n  printdat,/values,!yyy,varname='!yyy\n\nend\n</syntaxhighlight>\n\n\n=== Part Get Spec (PGS) ===\n\nTo learn about developing tools that work with particle data, i.e., PGS plug-ins, see: [http://spedas.org/presentations/pgs_development_v1.1.pdf]\n\n== Graphical User Interface (GUI) ==\nGUI plug-ins are described by a simple text file located in the folder: spedas_gui/plugins/. Each mission has its own text file describing the various components of the plugin. \n\n\nSeveral types of GUI plug-in components are available, including:\n* Load Data (load_data)\n* Configuration Settings (config)\n* Tools Menu (menu)\n* Data Processing (data_processing)\n* About (about)\n\n\nA GUI plug-in consists of one or more of the above components, and can have multiple components of any type (e.g., the THEMIS plug-in in SPEDAS contains 2 load_data components, 13 data_processing components, 2 menu components, 1 about component and 1 config component). The suggested way of creating a component for your mission is to fork the example code found in the spedas_gui/api_examples/ folder and modify it for your own mission. \n\n\nThe following is an example of the GUI plug-in file for the MMS mission; note that all plug-in files must start with \"project: \" followed by the mission name.\n\n\n[[File:Mms_plugin_textfile.png|center|MMS Plug-in]]\n\n\n=== Load Data ===\nLoad Data (load_data) components allow you to add a new mission tab to the Load Data window found at the menu: Data -> Load Data from Plug-ins... These tabs are essentially wrappers around the command-line load routine used to load data into tplot variables. \n\nAn example of adding a new tab can be found at: spedas_gui/api_examples/load_data_tab/\n\n[[File:Mms_load_data.png|340px|center|MMS Load Data component]]\n\n=== Configuration Settings ===\nConfig Settings components allow you to add a new mission tab to the Configuration Settings window found at the menu: File -> Configuration Settings...; these tabs allow your users to modify various configuration settings that persist through SPEDAS sessions. For most missions, these are wrappers meant to override settings in your mission system variable (!yyy), usually set in yyy_init. For example, config plug-ins allow your users to change the local data directory and whether data are downloaded from a remote site or only loaded from the local cache.\n\nAn example of adding a new configuration settings tab can be found at: spedas_gui/api_examples/file_configuration_tab/\n\n[[File:Mms_config.png|340px|center|MMS Config Settings component]]\n\n\n=== Tools Menu ===\nMenu components allow you to add a new item to the 'Tools' menu in the GUI. These are currently used in SPEDAS to generate mission overview plots, but can also be used to act as wrappers around more complex functionality (e.g., generating 2D particle slices for your mission). \n\nAn example of adding a new item to the \"Tools\" menu can be found at: spedas_gui/api_examples/plugin_menu/\n\n[[File:Tools.png|340px|center|Tools menu component]]\n\n\n=== Data Processing ===\nData Processing components allow you to add a new item to the \"More...\" menu in the \"Data Processing\" window, found at Analysis -> Data Processing. Data Processing components allow you to add additional data processing operations to the Data Processing window (e.g., mission specific coordinate transformations). \n\nAn example of adding a new item to the \"More...\" menu in the data processing panel can be found at: spedas_gui/api_examples/data_processing/\n\n[[File:Data_processing.png|340px|center|Data Processing component]]\n\n\n=== About ===\nAbout components allow you to add a new item describing your mission to the \"About SPEDAS Plugins...\" menu found at Help -> About. \n\n[[File:About-plugin.png|340px|center|About plugin component]]"
                    }
                ]
            }
        }
    }
}