This page was created by the IDL library routine
mk_html_help2
.
Last modified: Tue Aug 12 14:47:10 2008.
Procedure: thm_cotrans Purpose: Transform between various THEMIS and geophysical coordinate systems keywords: probe = Probe name. The default is 'all', i.e., transform data for all available probes. This can be an array of strings, e.g., ['a', 'b'] or a single string delimited by spaces, e.g., 'a b' datatype = The type of data to be transformed, can take any of the values allowed for datatype for the various thm_load routines. You can use wildcards like ? and [lh]. 'all' is not accepted. You can use '*', but you may get unexpected results if you are using suffixes. in_coord = 'spg', 'ssl', 'dsl', 'gse', 'gsm','sm', 'gei',or 'geo' coordinate system of input. This keyword is optional if the dlimits.data_att.coord_sys attribute is present for the tplot variable, and if present, it must match the value of that attribute. See cotrans_set_coord, cotrans_get_coord out_coord = 'spg', 'ssl', 'dsl', 'gse', 'gsm', 'sm', 'gei',or 'geo' coordinate system of output. This keyword is optional if out_suffix is specified and last 3 characters of suffix specify the output coordinate system. in_suffix = optional suffix needed to generate the input data quantity name: 'th'+probe+'_'datatype+in_suffix out_suffix = optional suffix to add to output data quantity name. If in_suffix is present, then in_suffix will be replaced by out_suffix in the output data quantity name. valid_names:return valid coordinate system names in named varibles supplied to in_coord and/or out_coord keywords. support_suffix: if support_data is loaded with a suffix you can specify it here ignore_dlimits: set this keyword to true so that an error will not be produced if the internal label of the coordinate system clashed with the user provided coordinate system. Optional Positional Parameters: in_name Name(s) of input tplot variable(s) (or glob patern) (space-separated list or array of strings.). If the in_name parameter is provided, the probe and datatype keywords will be ignored. However, if the input name is not of format 'th[a-e]_*', use the probe keyword to indicate which probe's state data should be used for each input variable. out_name Name(s) of output tplot variable(s). glob patterns not accepted. Number of output names must match number of input names (after glob expansion of input names). (single string, or array of strings.) Examples: thm_load_state, /get_support thm_cotrans, probe='a', datatype='fgl', out_suffix='_gsm' ; or equivalently thm_cotrans, 'tha_fgl', 'tha_fgl_gsm', out_coord='gsm' ; to transform all th?_fg?_dsl to th?_fg?_gsm thm_cotrans, 'th?_fg?', in_suffix='_dsl', out_suffix='_gsm' ; for arbitrary input variables, specify in_coord and probe: thm_cotrans,'mydslvar1 mydslvar2 mydslvar3', $ in_coord='dsl', probe='b c d', out_suff='_gse' $LastChangedBy: jwl $ $LastChangedDate: 2008-08-12 11:11:29 -0700 (Tue, 12 Aug 2008) $ $LastChangedRevision: 3380 $ $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/thmsoc/tags/tdas_4_01/idl/themis/state/thm_cotrans.pro $
(See themis/state/thm_cotrans.pro)
Procedure: thm_fac_matrix_make Purpose: generates a field aligned coordinate transformation matrix from an input B vector array(and sometimes a position vector array) then stores it in a tplot variable. This code has been modified from fac_matrix_make to handle input data that are in DSL coordinates. Arguments: mag_var_name=the name of the tplot variable storing the magnetic field vectors to be used in transformation matrix generation pos_var_name(optional)=the name of the tplot variable storing the position vectors to be used in transformation matrix generation newname(optional)=the name of the tplot variable in which to store the output error(optional) = named variable that holds the error state of the computation 1 = success 0 = failure other_dim(optional) = the second axis for the field aligned coordinate system. /DEGAP: Set to call TDEGAP to remove any gaps from the data. See TDEGAP for for other options that can be invoked using the _extra keyword. E.g. thm_fac_matrix_make, 'tha_fgs', other_dim='xgse', /degap, dt=3 ************For all transformations Z = B************ Warning about coordinate systems: B field tplot variable must be in gse,gsm, or dsl coordinates, depending on what transformation has been selected. Position tplot variable must be in gei coordinates. Gei is the default coordinate system of thm_load_state. Warning: The resulting transformation matrices will only correctly transform data from the coordinate system of the input variable to the field aligned coordinate system. So if mag_var_name is in dsl coordinates then you should only use the output matrices to transform other data in dsl coordinates. valid second coord(other_dim) options: 'Xgse', (DEFAULT) translates from gse or gsm into FAC Definition(works on GSE, or GSM): X Axis = on plane defined by Xgse - Z Second coordinate definition: Y = Z x X_gse Third coordinate, X completes orthogonal RHS (right hand system) triad: XYZ 'Rgeo',translate from geo into FAC using radial position vector Rgeo is radial position vector, positive radialy outwards. Second coordinate definition: Y = Z x Rgeo (westward) Third coordinate, X completes orthogonal RHS XYZ. 'mRgeo',translate into FAC using radial position vector mRgeo is radial position vector, positive radially inwards. Second coordinate definition: Y = Z x mRgeo (eastward) Third coordinate, X completes orthogonal RHS XYZ. 'Phigeo', translate into FAC using azimuthal position vector Phigeo is the azimuthal geo position vector, positive Eastward First coordinate definition: X = Phigeo x Z (positive outwards) Second coordinate, Y ~ Phigeo (eastward) completes orthogonal RHS XYZ 'mPhigeo', translate into FAC using azimuthal position vector mPhigeo is minus the azimuthal geo position vector; positive Westward First coordinate definition: X = mPhigeo x Z (positive inwards) Second coordinate, Y ~ mPhigeo (Westward) completes orthogonal RHS XYZ 'Phism', translate into FAC using azimuthal Solar Magnetospheric vector. Phism is "phi" vector of satellite position in SM coordinates. Y Axis = on plane defined by Phism-Z, normal to Z Second coordinate definition: X = Phism x Z Third completes orthogonal RHS XYZ 'mPhism', translate into FAC using azimuthal Solar Magnetospheric vector. mPhism is minus "phi" vector of satellite position in SM coordinates. Y Axis = on plane defined by Phism-Z, normal to Z Second coordinate definition: X = mPhism x Z Third completes orthogonal RHS XYZ 'Ygsm', translate into FAC using cartesian Ygsm position as other dimension. Y Axis on plane defined by Ygsm and Z First coordinate definition: X = Ygsm x Z Third completes orthogonal RHS XYZ Example: fac_matrix_make,'tha_fgs',other_dim='Xgse',pos_var_name='tha_pos',out_var_name='tha_fgs_fac_mat'
(See themis/state/thm_fac_matrix_make.pro)
function: thm_interpolate_state Purpose: interpolates the low res STATE file all variables are structures as produced by get_data keywords: Examples: tha_spinper_highres=thm_interpolate_state(thx_xxx_in=thx_xxx_in,thx_spinper=thx_spinper) --> linear interpolation tha_spinphase_highres=thm_interpolate_state(thx_xxx_in=thx_xxx_in,thx_spinper=thx_spinper,thx_spinphase=thx_spinphase) --> phase constructed according to the nearest neighbor spin phase, spin period tha_spinras_highres=thm_interpolate_state(thx_xxx_in=thx_xxx_in,thx_spinras=thx_spinras) --> linear interpolation tha_spindec_highres=thm_interpolate_state(thx_xxx_in=thx_xxx_in,thx_spindec=thx_spindec) --> linear interpolation tha_spinalpha_highres=thm_interpolate_state(thx_xxx_in=thx_xxx_in,thx_spinalpha=thx_spinalpha) --> linear interpolation tha_spinbeta_highres=thm_interpolate_state(thx_xxx_in=thx_xxx_in,thx_spinbeta=thx_spinbeta) --> linear interpolation tha_pos_highres=thm_interpolate_state(thx_xxx_in=thx_xxx_in,thx_pos=thx_pos) --> spline interpolation tha_vel_highres=thm_interpolate_state(thx_xxx_in=thx_xxx_in,thx_vel=thx_vel) --> spline interpolation Notes: under construction!! Written by Hannes Schwarzl $LastChangedBy: kenb-mac $ $LastChangedDate: 2007-05-29 15:08:39 -0700 (Tue, 29 May 2007) $ $LastChangedRevision: 712 $ $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/thmsoc/tags/tdas_4_01/idl/themis/state/thm_interpolate_state.pro $
(See themis/state/thm_interpolate_state.pro)
Procedure: THM_LOAD_STATE Purpose: Loads THEMIS STATE (orbit and attitude) data ;keywords: probe = Probe name. The default is 'all', i.e., load all available probes. This can be an array of strings, e.g., ['a', 'b'] or a single string delimited by spaces, e.g., 'a b' datatype = The type of data to be loaded, can be an array of strings or single string separate by spaces. The default is 'pos vel' 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 version = the version of the state file, one of 'v00', 'v01', 'v02', 'v03'. defaults to 'v01' level = the level of the data, the default is 'l1', or level-1 data. A string (e.g., 'l2') or an integer can be used. 'all' can be passed in also, to get all levels. suffix= suffix to add to tplot variable names. Note: this will get added support_data variables as well as regular data variables. CDF_DATA: named variable in which to return cdf data structure: only works for a single spacecraft and datafile name. VARNAMES: names of variables to load from cdf: default is all. /GET_SUPPORT_DATA: load support_data variables as well as data variables into tplot variables. /DOWNLOADONLY: download file but don't read it. /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 routine will return the valid probe, datatype level, and version options in named variables supplied as arguments to the corresponding keywords. files named varible for output of pathnames of local files. /VERBOSE set to output some useful info coord: Can specify the coordinate system you would like data returned in. no_spin: if set, do not call thm_load_spin to load spinmodel data. Example: thm_load_state Notes: Modifications: If /GET_SUPPORT_DATA and ~/NO_SPIN, then call THM_LOAD_SPIN, W.M.Feuerstein, 4/10/2008. Delete th?_spin* TPLOT variables after calling THM_LOAD_SPIN (as long as ~/KEEP_SPIN_DATA), add KEEP_SPIN_DATA kw, include a couple of (normally commented) lines to chck consistency of spinmodel, WMF, 4/10/08. coordinate systems of returned variables: *_pos : gei *_vel : gei *_ras : gei *_dec : gei *_alpha : spg *_beta : spg *_spinper : none(listed in dlimits as unknown) *_spinphase : none(listed in dlimits as unknown) *_roi : none(listed in dlimits as unknown) *_man : none(listed in dlimits as unknown) If you modify the d_names constant make sure to make the corresponding changes to the c_names constant $LastChangedBy: jimm $ $LastChangedDate: 2008-05-20 13:33:33 -0700 (Tue, 20 May 2008) $ $LastChangedRevision: 3120 $ $URL $
(See themis/state/thm_load_state.pro)
Procedure: THM_LOAD_STATE2 Purpose: Loads THEMIS STATE (orbit and attitude) data ;keywords: probe = Probe name. The default is 'all', i.e., load all available probes. This can be an array of strings, e.g., ['a', 'b'] or a single string delimited by spaces, e.g., 'a b' datatype = The type of data to be loaded, can be an array of strings or single string separate by spaces. The default is '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 version = the version of the state file, one of 'v01', 'v02', 'v03', 'v04'. defaults to 'v01' level = the level of the data, the default is 'l1', or level-1 data. A string (e.g., 'l2') or an integer can be used. 'all' can be passed in also, to get all levels. CDF_DATA: named variable in which to return cdf data structure: only works for a single spacecraft and datafile name. VARNAMES: names of variables to load from cdf: default is all. /GET_SUPPORT_DATA: load support_data variables as well as data variables into tplot variables. /DOWNLOADONLY: download file but don't read it. /valid_names, if set, then this routine will return the valid probe, datatype and/or level options in named variables supplied as arguments to the corresponding keywords. files named varible for output of pathnames of local files. /VERBOSE set to output some useful info Example: thm_load_state Notes: $LastChangedBy: davin-win $ $LastChangedDate: 2008-04-04 08:36:56 -0700 (Fri, 04 Apr 2008) $ $LastChangedRevision: 2619 $ $URL $
(See themis/state/thm_load_state2.pro)
Procedure: THM_LOAD_STATE2 Purpose: Loads THEMIS STATE (orbit and attitude) data ;keywords: probe = Probe name. The default is 'all', i.e., load all available probes. This can be an array of strings, e.g., ['a', 'b'] or a single string delimited by spaces, e.g., 'a b' datatype = The type of data to be loaded, can be an array of strings or single string separate by spaces. The default is '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 version = the version of the state file, one of 'v01', 'v02', 'v03', 'v04'. defaults to 'v01' level = the level of the data, the default is 'l1', or level-1 data. A string (e.g., 'l2') or an integer can be used. 'all' can be passed in also, to get all levels. CDF_DATA: named variable in which to return cdf data structure: only works for a single spacecraft and datafile name. VARNAMES: names of variables to load from cdf: default is all. /GET_SUPPORT_DATA: load support_data variables as well as data variables into tplot variables. /DOWNLOADONLY: download file but don't read it. /valid_names, if set, then this routine will return the valid probe, datatype and/or level options in named variables supplied as arguments to the corresponding keywords. files named varible for output of pathnames of local files. /VERBOSE set to output some useful info Example: thm_load_state Notes: $LastChangedBy: kenb-mac $ $LastChangedDate: 2007-08-21 09:11:07 -0700 (Tue, 21 Aug 2007) $ $LastChangedRevision: 1464 $ $URL $
(See themis/state/thm_load_state3.pro)
NAME: thm_spin_phase Purpose: Use sunpulse data produced by thm_sunpulse to get spinphase at abitrary times Input Parameters: time_dat: double precision array: times of data points at which interpolates are desired. Output Parameters: spinpha_int: interpolated spin phase Keywords: Probe: a single probe name. e.g. 'a' suffix: suffix on tplot variable (thx_state_sunpulse[_suffix]) Optional Input Parameters (If not present, then state data will be loaded from standard state tplot variables, using probe keyword) sunpulse: double precision array: times of sunpulses sunp_spinper: spin period at each sunpulse time K. Bromund, SPSystems/NASA/GSFC, May 2007 $LastChangedBy: bckerr $ $LastChangedDate: 2007-10-18 18:57:15 -0700 (Thu, 18 Oct 2007) $ $LastChangedRevision: 1733 $ $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/thmsoc/tags/tdas_4_01/idl/themis/state/thm_spin_phase.pro $
(See themis/state/thm_spin_phase.pro)
NAME: thm_sunpulse Purpose: Interpolate spin phase to have same time resolution as time_dat Keyword: probe: string indicating probe. Array of strings, or a string like 'a b'. Not used if positional parameters are present. suffix: suffix to add to default tplot name in which to store sunpulse data: thx_state_sunpulse (x = probe letter designation) This suffix is expected on the names of the state data inputs. Optional Inputs/Output parameters: (if not present, then standard state tplot variable names will be used for i/o) Input Parameters: time_state: double precision array: times of data from state file spinpha: spin phase from state file spinper: spin period from state file Output Parameters: sunpulse: sunpulse times (times of zero spin phase) sunp_spinper: spin period at time of each sunpulse. Keywords: sunpulse_name: string. If present, store sunpulse/spinperiod in tplot variable with this name. Has no effect if probe keyword is provided. Notes: Written by K. Bromund, SPSystems/NASA/GSFC, May 2007 $LastChangedBy: kenb-mac $ $LastChangedDate: 2007-05-29 15:08:39 -0700 (Tue, 29 May 2007) $ $LastChangedRevision: 712 $ $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/thmsoc/tags/tdas_4_01/idl/themis/state/thm_sunpulse.pro $
(See themis/state/thm_sunpulse.pro)