This page was created by the IDL library routine
mk_html_help2
.
Last modified: Fri Dec 15 20:04:55 2006.
PRO themis_environment This file will set up the location of data files at a particular location. Typically this procedure is called from within the IDL_startup file. This should be the only THEMIS file that requires modification for different locals, On UNIX-like systems, the environment can be modified (e.g. using a modifed version of setup_themis or setup_themis_bash), rather than modifying this file.
(See themis/common/themis_environment.pro)
PROCEDURE: themis_init PURPOSE: Initializes system variables for themis. The system variable !THEMIS is defined here. The elements of this structure are explained below: !THEMIS.LOCAL_DATA_DIR This is the root location for all THEMIS data files. The THEMIS software expects all data files to reside in specific subdirectories relative to this root directory.; !THEMIS.REMOTE_DATA_DIR This is the URL of the server that can provide the data files. (default is: "http://sprg.ssl.berkeley.edu/data/themis/") if the software does not find a needed file in LOCAL_DATA_DIR, and REMOTE_DATA_DIR is defined, the software will attempt to download the file from REMOTE_DATA_DIR, place it in LOCAL_DATA_DIR with the same relative pathname, and then continue processing. Typical examples: Desktop UNIX/LINUX computer located at SSL LOCAL_DATA_DIR = '/disks/data/themis/' ; This master directory is read only. REMOTE_DATA_DIR = '' ; Should be empty sting. (/disks/data/themis and server are the same) Desktop WINDOWS computer located at SSL LOCAL_DATA_DIR = '\\justice\data\themis\' ; Justice is a samba server (physically the same as /disk/data/themis) REMOTE_DATA_DIR = '' laptop WINDOWS computer located far from a data server, but with internet connection. LOCAL_DATA_DIR = 'C;\data\themis\' ; Local (portable) directory on laptop REMOTE_DATA_DIR = 'http://sprg.ssl.berkeley.edu/data/themis/' ; URL used to download data to LOCAL_DATA_DIR MacOS computer located away from SSL without a nearby data server LOCAL_DATA_DIR = '/data/themis/' ; Local (portable) directory on laptop REMOTE_DATA_DIR = 'http://sprg.ssl.berkeley.edu/data/themis/' ; URL used to download data to LOCAL_DATA_DIR Note: If automatic downloads are used. (i.e. REMOTE_DATA_DIR is not an empty string) the user must ensure that LOCAL_DATA_DIR is writeable. Note to WINDOWS users: the WINDOWS version of IDL accepts both the '\' and '/' character as the directory separation character. The converse is not true.
(See themis/common/themis_init.pro)
NAME: Themis_w PURPOSE: Widget program for THEMIS data Analysis, to get the infomation in the widget use widget_control, widget_id, uval = state state = {wmaster:master, $ ;master widget id exitbut:exitbut, $ ;exit button id loadbut:loadbut, $ ;load button id plotbut:plotbut, $ ;plot button id histbut:histbut, $ ;history button id sttimebut:sttimebut, $ ;start_time button id entimebut:entimebut, $ ;end_time button id sttime_display:sttime_display, $ ;start_time display id entime_display:entime_display, $ ;end_time display id datalist:datalist, $ ;datalist id plottypelist:plottypelist, $ ;plot type list id dtyplist:dtyplist, $ ;data type list id stationlist:stationlist, $ ;station list id lvllist:lvllist, $ ;data level list id sclist:sclist, $ ;spacecraft list id plot_type:'X', $ ;plot_type st_time:tt0, $ ;start_time, double en_time:tt1, $ ;end_time data:ptr_new(), $ ;a pointer to the data_quants array in the tplot common tplot_vars:ptr_new(), $ ;points to the tplot_vars structure plot_configs:ptr_new(), $ ;points to the plot_configs structure current_config:ptr_new(), $;points to the current_config data_id:ptr_new(), $ ;a pointer to an array of strings, 1 for each loaded dataset active_dset:ptr_new(), $ ;points to the data structures that are 'active' history:ptr_new(init_history), $ ;a string array with the analysis history dtypstring:'mag', $ ;the most recently loaded datatype lvl:'l2', $ ;level 0, 1 or 2 sc:'thg', $ ;spacecraft_id, 'thg' is ground magnetometer station:'all'} CALLING SEQUENCE: themis_w HISTORY: sep-2006, jmm, jimm@ssl.berkeley.edu 13-dec-2006, jmm, changed format of times in history strings, added clear_history button 14-dec-2006, jmm, added delete_data button $LastChangedBy J McTiernan$ $LastChangedDate 14-Dec-2006$ $LastChangedRevision$ $URL mailto:jimm@ssl.berkeley.edu $
(See themis/common/themis_w.pro)
NAME: thm_mk_data_dir PURPOSE: Given the root directory for themis data, and a themis data filename, create a directory structure. CALLING SEQUENCE: path = thm_mk_data_dir(filename, themis_data_dir=themis_data_dir) INPUT: filename=The cdf filename that you are looking for OUTPUT: path = the string for the data path KEYWORDS: themis_data_dir= the root directory, the default is THEMIS_DATA_DIR name_only= only return the name, don't try to create directories HISTORY: 14-nov-2006, jmm, jimm@ssl.berkeley.edu 12-dec-2006, jmm, No need for slahses to be checked... concat_dir is not needed $LastChangedBy J McTiernan $ $LastChangedDate 12-Dec-2006 $ $LastChangedRevision$ $URL mailto:jimm@ssl.berkeley.edu $
(See themis/common/thm_mk_data_dir.pro)
NAME: thm_mk_filename PURPOSE: creates a themis cdf filename from the input components; CALLING SEQUENCE: filename=thm_mk_filename(time,sc=sc,level=level,data_type=data_type,$ station=station, version=version) INPUT: time = file time, can be seconds from 01-01-1970, or a string, 'yyyy-mm-dd/hh:mm:ss' OUTPUT: filename = e.g.,'thg_l2_mag_bmls_20060313_v01.cdf' KEYWORDS: sc = spacecraft id , 'tha', 'thb', etc..., default is 'thg' for ground data level = level, 'l0','l1','l2', or 0, 1, 2, default is 'l2' data_type = data type, 'mag', 'efi', 'fgm', etc..., default is 'mag' station = station for ground data, default is 'bmls' version = a version number, in a string, such as 'v01', or a number. The default is to insert a '*', as a wild card when searching for files. All inputs are scalars, all are case-insensitive, HISTORY: 27-nov-2006, jmm, jimm@ssl.berkeley.edu $LastChangedBy$ J McTiernan $LastChangedDate$ 5-Dec-2006 $LastChangedRevision$ Added comments $URL$ mailto:jimm@ssl.berkeley.edu
(See themis/common/thm_mk_filename.pro)
NAME: thm_ui_asi_stationlist PURPOSE: creates an array for different ground stations, to be used in a list widget CALLING SEQUENCE: asi_stationlist = thm_ui_asi_stationlist() INPUT: none OUTPUT: asi_stationlist = ['ALL', 'BMLS', 'CCNV', 'DRBY', 'EKAT', 'FSIM', 'FSMI', 'FYKN', $ 'FYTS', 'GAKO', 'GBAY', 'GILL', 'HOTS', 'KAPU', 'KIAN', 'LOYS', $ 'MCGR', 'PGEO', 'PINA', 'PINE', 'PTRS', 'RANK', 'RMUS', 'SWNO', $ 'TAHO', 'TBD1', 'TPAS', 'UKIA', 'WHIT'] $LastChangedBy$ J McTiernan $LastChangedDate$ 15-Dec-2006 $LastChangedRevision$ Added comments $URL$ mailto:jimm@ssl.berkeley.edu
(See themis/common/thm_ui_asi_stationlist.pro)
NAME: thm_ui_call_tplot PURPOSE: A widget interface for calling tplot from the themis_w widget, currently of limited usefulness, but expandable CALLING SEQUENCE: thm_ui_call_tplot, master_widget_id INPUT: master_widget_id = the id number of the widget that calls this OUTPUT: none, there are buttons to push for plotting, setting limits, not sure what else yet... HISTORY: 14-dec-2006, jmm, jimm@ssl.berkeley.edu $LastChangedBy J McTiernan$ $LastChangedDate 14-Dec-2006$ $LastChangedRevision$ $URL mailto:jimm@ssl.berkeley.edu $
(See themis/common/thm_ui_call_tplot.pro)
NAME: thm_ui_check_dbase PURPOSE: Check for, and download files CALLING SEQUENCE: thm_ui_check_dbase, st_time, En_time, datatype, station, spacecraft, data_level INPUT: st_time, en_time = start and end times in seconds from 1-jan-1970 0:00 datatype, the type of data, a string, of form 'thg_gmag', for example station, the ground station of the gmag data spacecraft = the spacecraft_id string, or 'thg' for ground data data_level = 'L0','L1', or 'l2' HISTORY: 27-nov-2006, jmm, jimm@ssl.berkeley.edu 12-dec-2006, changed to call sock_copy, instead of thm_ui_temp_sock_copy. changed datatype to dtpye to avoid conflicts with ssw function $LastChangedBy J McTiernan $ $LastChangedDate 12-Dec-2006 $ $LastChangedRevision changed to call file_retrieve, then sock_copy$ $URL mailto:jimm@ssl.berkeley.edu $
(See themis/common/thm_ui_check_dbase.pro)
NAME: thm_ui_dataselect PURPOSE: A widget to choose what type of data to input CALLING SEQUENCE: thm_ui_dataselect HISTORY: sep-2006, jmm, jimm@ssl.berkeley.edu $LastChangedBy$ J McTiernan $LastChangedDate$ 5-Dec-2006 $LastChangedRevision$ Added comments $URL$ mailto:jimm@ssl.berkeley.edu
(See themis/common/thm_ui_dataselect.pro)
Wrapper for thm_ui_dataselect.pto HISTORY: sep-2006, jmm, jimm@ssl.berkeley.edu $LastChangedBy$ J McTiernan $LastChangedDate$ 5-Dec-2006 $LastChangedRevision$ Added comments $URL$ mailto:jimm@ssl.berkeley.edu
(See themis/common/thm_ui_dataselect_fn.pro)
NAME: thm_ui_datatypes PURPOSE: creates an array for the different themis spacecraft, to be used in a list widget CALLING SEQUENCE: datatypes = thm_ui_datatypes() INPUT: none OUTPUT: datatypes = ['ASI', 'EFI', 'FGM', 'FIT', 'MAG (Ground)', 'SST'] HISTORY: 27-nov-2006, jmm, jimm@ssl.berkeley.edu $LastChangedBy$ J McTiernan $LastChangedDate$ 5-Dec-2006 $LastChangedRevision$ Added comments $URL$ mailto:jimm@ssl.berkeley.edu
(See themis/common/thm_ui_datatypes.pro)
NAME: thm_ui_history PURPOSE: A widget to display the string array for the history of programs called, given the themis_w state structure INPUT: state structure, with a tag that is a pointer to a string array OUTPUT: The history array can be written to a file called 'themis_w_history.pro', which in principle, should be callable from IDL HISTORY: 5-oct-2006, jmm, jimm@ssl.berkeley.edu $LastChangedBy$ J McTiernan $LastChangedDate$ 5-Dec-2006 $LastChangedRevision$ Added comments $URL$ mailto:jimm@ssl.berkeley.edu
(See themis/common/thm_ui_history.pro)
NAME: thm_ui_load_data_fn PURPOSE: A widget interface to load CDF data for whatever instrument CALLING SEQUENCE: varnames = thm_ui_load_data_fn(st_time, En_time, dtype, station, $ id_string,data_ss) INPUT: st_time, en_time = start and end times in seconds from 1-jan-1970 0:00 dtype, the type of data, a string, of form 'thg_gmag', for example station, the ground station of the gmag data spacecraft = the spacecraft_is string, or 'thg' for ground data data_level = 'L0','L1', or 'l2' OUTPUT: varnames = an array of tplot variable names, to pass into tplot data_ss = the subscripts of the new data in the tplot data_quants structure The tplot common is loaded, or appended HISTORY: 22-sep-2006, jmm, jimm@ssl.berkeley.edu 23-oct-2006, jmm, changed to call cdf2tplot 30-oct-2006, jmm, changed again, to call load_thg_mag, also added dtype and station as inputs 13-nov-2006, jmm, changed the argument list, now the output is a data id string, added a check for start time > end time 08-dec-2006, krb, changed load_thg_mag to thm_load_gmag 13-dec-2006, jmm, Added call to cdf2tplot for data for which there is no load program... 14-dec-2006, jmm, returns an array of variable names and subscripts, which should be easier to read.. 15-dec-2006, jmm, Added calls to thm_load_fgm, fit, sst, efi, ask,spacecraft can be an array $LastChangedBy J McTiernan$ $LastChangedDate 15-Dec-2006$ $LastChangedRevision Changes argument list$ $URL mailto:jimm@ssl.berkeley.edu $
(See themis/common/thm_ui_load_data_fn.pro)
NAME: thm_ui_mag_stationlist PURPOSE: creates an array for different ground magnetometer stations, to be used in a list widget CALLING SEQUENCE: mag_stationlist = thm_ui_mag_stationlist() INPUT: none OUTPUT: mag_stationlist = ['ALL', 'BMLS', 'DRBY', 'FYKN', 'GAKO', 'GBAY', 'KAPU', 'LOYS', 'PGEO', 'PTRS', 'SWNO', 'UKIA', 'CCNV', 'EKAT', 'FYTS', 'HOTS', 'KIAN', 'MCGR', 'PINE', 'RMUS', 'TPAS', 'WHIT'] $LastChangedBy$ J McTiernan $LastChangedDate$ 5-Dec-2006 $LastChangedRevision$ Added comments $URL$ mailto:jimm@ssl.berkeley.edu
(See themis/common/thm_ui_mag_stationlist.pro)
NAME: thm_ui_only_trange PURPOSE: This program oprerates on the tplot data_quants to strip out data the is not in the input time range: start time, end time, and the subscripts of the appropriate data_quants structures are used, this is designed to be used in thm_ui_load_data_fn only... jmm, 13-nov-2006 INPUT: st_time, en_time = time in seconds from 1-jan-1970 0:00 data_ss = the subscripts of the data array to on which to operate OUTPUT: None explicit, the tplot variables are changed HISTORY: jmm, 13-nov-2006, jimm@ssl.berkeley.edu jmm, 13-dec-2006, made to work for non thg_mag data $LastChangedBy J McTiernan$ $LastChangedDate 13-Dec-2006$ $LastChangedRevision Works for all data $ $URL mailto:jimm@ssl.berkeley.edu $
(See themis/common/thm_ui_only_trange.pro)
NAME: thm_ui_plot_data PURPOSE: A widget interface to load CDF data for whatever instrument CALLING SEQUENCE: thm_ui_plot_data, st_time, en_time, data_struct, datatype INPUT: st_time, en_time = start and end times in seconds from 1-jan-1970 0:00 data_ss, the subscripts for the data structures that are to be plotted, for tplot data datatype, the type of data, a string, of form 'thg_mag', for example OUTPUT: None explicit, it just plots the data HISTORY: 13-Nov-2006, jmm, jimm@ssl.berkeley.edu, currently only calls the stackmagplot routine, and needs a different mastercdf path, $LastChangedBy$ J McTiernan $LastChangedDate$ 5-Dec-2006 $LastChangedRevision$ Added comments $URL$ mailto:jimm@ssl.berkeley.edu
(See themis/common/thm_ui_plot_data.pro)
This puts the input data structure into the tplot common block as the data_quants structure, and undefines all of the other variables in the common block, using temporary, the original common block is saved in a different common block. This is needed to call the stackmagplot routine on a subset of stations 13-nov-2006, jmm, jimm@ssl.berkeley.edu $LastChangedBy$ J McTiernan $LastChangedDate$ 5-Dec-2006 $LastChangedRevision$ Added comments $URL$ mailto:jimm@ssl.berkeley.edu
(See themis/common/thm_ui_reset_common_block.pro)
NAME: thm_ui_sclist PURPOSE: creates an array for the different themis spacecraft, to be used in a list widget CALLING SEQUENCE: sclist = thm_ui_sclist() INPUT: none OUTPUT: sclist = ['THA', 'THB', 'THC', 'THD', 'THE'] $LastChangedBy$ J McTiernan $LastChangedDate$ 5-Dec-2006 $LastChangedRevision$ Added comments $URL$ mailto:jimm@ssl.berkeley.edu
(See themis/common/thm_ui_sclist.pro)
NAME: thm_ui_set_state_ptrs PURPOSE: This program sets the values of the pointers in the themis_w state structure to their counterparts in the tplot common block: INPUT: state = themis_w state structure: See the doc_header for themis_w.pro HISTORY: 13-nov-2006, jmm, jimm@ssl.berkeley.edu 14-dec-2006, jmm, deals with no data $LastChangedBy J McTiernan $ $LastChangedDate 14-Dec-2006 $ $LastChangedRevision deals with no data $ $URL mailto:jimm@ssl.berkeley.edu $
(See themis/common/thm_ui_set_state_ptrs.pro)
Changes an array of strings to 1 string with spaces in between, to pass arrays of strings into tplot. This must exist somewhere else, but i cant find it.... $LastChangedBy J McTiernan$ $LastChangedDate 14-Dec-2006$ $LastChangedRevision$ $URL mailto:jimm@ssl.berkeley.edu $
(See themis/common/thm_ui_temp_arr2str.pro)
NAME: thm_ui_tselect PURPOSE: A list widget for time selection, this is a blocking widget, it must be exited for anything to happen CALLING SEQUENCE: thm_ui_teslect INPUT: none OUTPUT: the selected time is held in the common block saved_time_sel HISTORY: sep-2006, jmm, jimm@ssl.berkeley.edu $LastChangedBy$ J McTiernan $LastChangedDate$ 5-Dec-2006 $LastChangedRevision$ Added comments $URL$ mailto:jimm@ssl.berkeley.edu
(See themis/common/thm_ui_tselect.pro)
Calls the thm_tselect widget, returns the value.. $LastChangedBy$ J McTiernan $LastChangedDate$ 5-Dec-2006 $LastChangedRevision$ Added comments $URL$ mailto:jimm@ssl.berkeley.edu
(See themis/common/thm_ui_tselect_fn.pro)
NAME: thm_ui_update_history PURPOSE: Adds the string input to the state structure history array INPUT: string = a string to add to the history array state = the themis_w state structure, OUTPUT: state.history is updated HISTORY: sep-2006, jmm, jimm@ssl.berkeley.edu $LastChangedBy$ J McTiernan $LastChangedDate$ 5-Dec-2006 $LastChangedRevision$ Added comments $URL$ mailto:jimm@ssl.berkeley.edu
(See themis/common/thm_ui_update_history.pro)
NAME: yesno_widget_fn PURPOSE: Simple widget that asks for a yes or no CALLING SEQUENCE: yn=yesno_widget_fn(title, list = list, _extra = _extra) INPUT: title = a title, or a question OUTPUT: yn = 0 for no, 1 for yes KEYWORDS: list, a string array to put in the widget, as an aid HISTORY: 27-nov-2006, jmm, jimm@ssl.berkeley.edu $LastChangedBy$ J McTiernan $LastChangedDate$ 5-Dec-2006 $LastChangedRevision$ Added comments $URL$ mailto:jimm@ssl.berkeley.edu
(See themis/common/yesno_widget_fn.pro)