projects/themis/spacecraft/fields/
thm_efi_despin.pro
Despin routine for EFI high-res (eff/efp/efw) data.
Syntax:
thm_efi_despin , probe, datatype, offset, gain [, NOTCH ] [, TWEAK_GAINS ] [, STORED_TNAMES ]
Inputs:
PROBE: Input, 1-character string identifying which spacecraft.
DATATYPE: Input, string. 3-character string identifying data type ('eff','efp' or 'efw')
OFFSET: Input, float, 1 x n (2 dimensions) 3-element array: Ex, Ey, Ez offset.
GAIN: Input, float. 3-element array: E12, E34, E56 gain.
TPLOT_NAME: Input. String scalar containing the name of the TPLOT variable to operate on (regardless of PROBE and DATATYPE kwd's).
Options:
NOTCH: Numeric, 0 or 1. Set equal to the # of harmonics to remove (including fundamental) (i.e. notch=1 removes fundamental only, notch=2 also
removes 1st harmonic) (default=0 does not notch filter anything). *** DISABLED ***.
TWEAK_GAINS: Numeric, 0 or 1. Set flag to tweak the E12/E34 gains to minimize the spin tone newname: If specified, the cleaned data is stored as a
tplot variable with name=newname instead of the default 'th'+sc+'_'+datatype+'_dsl'.
Outputs:
*** Creates a new tplot variable with the name 'th'+sc+'_'+datatype+'_dsl' or whatever is specified by the newname keyword. ***
STORED_TNAMES: Returns a string array containing each TPLOT variable name invoked in a STORE_DATA operation (chronological order). (Not sorted or uniqued.)
Restrictions:
Required data must be loaded, including spin phase data.
Notes:
This routine ignores E56 when despinning. That is desireable over
the full transform (a la THM_COTRANS.PRO) because the resolution on E56
is much lower than for the spin plane sensors (E12 and E34) so mixing
in E56 would often increase the noise, and because the geometric
axis is w/in 1 degree of the spin axis making the result effectively
in DSL.
Modifications:
Switched from THM_SPIN_PHASE.PRO to Jim Lewis' SPINMODEL_INTERP_T.PRO,
(commented out GET_DATA's to _state_spinper/spinphase, modified error
conditional), edited warning message, up'd doc'n, W.M.Feuerstein,
3/19/08.
Added TPLOT_NAME to specify var. to read. Otherwise, PROBE and DATATYPE
parameters are used to derive tplot var. name to read. Changed default
suffix to "_dsz" to match the "THEMIS Science Coordinate Systems
Definition" (THM-SOC-110).
Made sure "V" field is carried through data (otherwise it crashes
THM_CAL_EFI.PRO), redined suffix to "_dsl" (effectively true), fixed
potential bitwise vs. logical conditional bug, updated doc'n, WMF,
3/21/2008 (F).
Put in return on errors w/ messages for DLIMITS.DATA_ATT.COORD_SYS equal
to 'dsl' or 'spg', set said field to 'dsl' on conclusion of
processing, updat'd doc'n, WMF, 3/24/2008.
Checks validity of pointer from SPINMODEL_GET_PTR.PRO and calls
THM_LOAD_SPIN,PROBE=PROBE[0] on fail, installed an alternate test for
spinmodel data (TNAMES('th?_spin*')) to check an error from
SPINMODEL_INTERP_T.PRO but the error is unrelated, WMF, 3/26/2008.
Removed check on pointer in favor of incorporating THM_LOAD_SPIN.PRO into
THM_LOAD_STATE.PRO, WMF, 3/27/2008.
Updated doc'n, WMF, 3/27/2008.
Changed "Despinning
Routines
top source thm_efi_despin
thm_efi_despin, probe, datatype, offset, gain, newname=newname, tweak_gains=tweak_gains, tplot_name=tplot_name, stored_tnames=stored_tnames, use_eclipse_corrections=use_eclipse_corrections, _extra=_extra
Parameters
- probe
- datatype
- offset
- gain
Keywords
- newname
- tweak_gains
- tplot_name
- stored_tnames
- use_eclipse_corrections
- _extra
File attributes
Modification date: | Thu Feb 13 16:42:38 2014 |
Lines: | 71 |