This page was created by the IDL library routine
mk_html_help2
.
Last modified: Fri May 29 15:15:21 2009.
PRO: THM_EFI_DERIVE_EZ, Edsl, Bdsl, new_name=new_name PURPOSE: DERIVES EZ ASSUMING EdotB = 0 INPUT: Edsl - REQUIRED. STRING Efield data name (tplot). Bdsl - REQUIRED. STRING Bfield data (tplot) CALLING: thm_efi_derive_Ez, Edsl, Bdsl OUTPUT: Tplot INITIAL VERSION: REE 08-11-04 MODIFICATION HISTORY: LASP, CU
(See themis/spacecraft/fields/LASP/thm_efi_derive_ez.pro)
PRO: THM_EFI_ExB, Ename, Bname, Sname=Sname, Vname=Vname, $ EdotB=EdotB, Btot=Btot PURPOSE: Calculate Poynting Flux and Flow Velocity INPUT: Eanme - REQUIRED. STRING Efield data name (tplot). Bname - REQUIRED. STRING Bfield data (tplot) Sname - OPTIONAL. Poynting Flux name (tplot) Vname - OPTIONAL. Velocity Flow name (tplot) CALLING: thm_efi_exb, Ename, Bname, Sname OUTPUT: Poynting Flux is Calculated INITIAL VERSION: REE 08-10-31 MODIFICATION HISTORY: LASP, CU
(See themis/spacecraft/fields/LASP/thm_efi_exb.pro)
PROCEEDURE: THM_EFI_SIN_FIT, e, t, es=es, ec=ec, per=per Called by THM_EFI_REMOVE_OFFSET_AND_SPIN, name, ask=ask PURPOSE: DOES A QUICK SIN AND COS FIT INPUT: E - REQUIRED (Electric Field) T - REQUIRED WARNING: USE SHORT SEGMENTS OUTPUT: AMP - AMPLITUDE PHS - PHASE Per - PERIOD (Sypply and save a lot of time!) INITIAL VERSION: REE 08-10-31 University of Colorado MODIFICATION HISTORY:
(See themis/spacecraft/fields/LASP/thm_efi_sin_fit.pro)
FUNCTION: THM_EFI_DERIVE_EZ, E, B, minBz=minBz, minRat=minRat, ratio=ratio PURPOSE: DERIVES EZ ASSUMING EdotB = 0 INPUT: E - REQUIRED. Data structure in DSL B - REQUIRED. Data structure in DSL KEYWORDS: minBz - OPTIONAL. Keeps from divide by zero. DEFAULT = 0.01 nT minRat - OPTIONAL. Minimum value of Bz/|B|. DEFAULT = 0.1 ratio - OUTPUT. = Bz/|B| CALLING: thm_efi_derive_Ez, Edsl, Bdsl OUTPUT: Tplot INITIAL VERSION: REE 08-11-04 MODIFICATION HISTORY: REE 09_05_01 LASP, CU
(See themis/spacecraft/fields/LASP/thm_lsp_derive_ez.pro)
FUNCTION: THM_LSP_FILTER, x, dt, freq, db=db PURPOSE: Filters the data COMP*. INPUT: x - NEEDED. Just the data. Not a structure or name. dt - NEEDED. Time between points. freq - NEEDED. Pole of filter. If band_pass: [f1,f2] f1<f2 - If low-pass: [0,f]. If high-pass [f,0] KEYWORDS: db - OPTIONAL. If convol option is taken, default = 120. CREATED BY: REE, 97-03-17 - modified 97-10-03 REE added buf_dt FILE: fa_fields_filter.pro VERSION: 0.0 LAST MODIFICATION: REE 08-11-02, rewrite for THEMIS - no call external so much slower. REE 09-04-30, made it a simple function. REE 09-05-05, Added Gaussian option. Chnaged passband to match digital_fliter
(See themis/spacecraft/fields/LASP/thm_lsp_filter.pro)
FUNCTION: THM_LSP_REMOVE_SPIKES, t, xx, per, nwin=nwin, nfit=nfit NOT FOR GENERAL USE. CALLED BY THM_EFI_REMOVE_SPIKES ONLY FOR ISOLATED PARTICLE OR WAVE BURSTS NOT FOR ENTIRE ORBIT. PURPOSE: Remove the non-physical spiky signals in the efw data. INPUT: t -NEEDED. Time array x -NEEDED. Data per -NEEDED. Spin period. KEYWORD: nwin -OPTIONAL. Number of points in spike search window. DFLT = 16 spikesig -OPTIONAL. Sigma of spikes. DFLT = 5 sigmin -OPTIONAL. Minimun of sigma. DFLT = 0 mV/m. nfit -OPTIONAL. Number of points in the fit window. DFLT = 16 HISTORY: 2008-11-08: Created by Jianbao Tao at LASP@CU-Boulder. 2008-11-10: The head comment was added. 2009-03-30: REE. Rewrite to test epoch analysis. 2009-04-30: REE. Rewrite to use median smooth.
(See themis/spacecraft/fields/LASP/thm_lsp_remove_spikes.pro)
FUNCTION: THM_LSP_REMOVE_SPINTONE, t, x, per, SpinPoly=SpinPoly, $ nsmooth=nsmooth, talk=talk NOT FOR GENERAL USE. CALLED BY THM_EFI... ONLY FOR ISOLATED PARTICLE OR WAVE BURSTS NOT FOR ENTIRE ORBIT. PURPOSE: GETS RID OF SPIN TONE AND OFFSET ON MEDIUM SIZE STRETCHES INPUT: t -NEEDED. Time array. x -NEEDED. Data array. per -NEEDED. Spin period. NOTE: input per/2 for 2nd harmonic, etc. KEYWORDS: -DEFAULT ACTION. If neither nsmooth or SpinPoly are set, sin and cos fits over entire period are used. nsmooth -OPTIONAL. If set, it takes precedence. It uses qfit and "median smooth" sin and cos over nsmooth points. SpinPoly -OPTIONAL. If set (and nsmooth not set), it uses qfit and polyfits sin and cos over nsmooth points. talk -OPTIONAL. Plots diagnostics. OUTPUT: TPLOT STORE INITIAL VERSION: REE 99-03-25 (ff_remove_spintone) Space Scienes Lab, UCBerkeley MODIFICATION HISTORY: 08-10-31 Modified for THEMIS by REE University of Colorado
(See themis/spacecraft/fields/LASP/thm_lsp_remove_spintone.pro)
FUNCTION: THM_LSP_REMOVE_SPIN_EPOCH, t, x, per, talk=talk NOT FOR GENERAL USE. CALLED BY THM_EFI_REMOVE_SPIKES ONLY FOR ISOLATED PARTICLE OR WAVE BURSTS NOT FOR ENTIRE ORBIT. PURPOSE: Remove the non-physical spiky signals in the efw data. INPUT: t -NEEDED. Time array x -NEEDED. Data per -NEEDED. Spin period. KEYWORDS: talk -OPTIONAL. Provides diagnostic plots. HISTORY: 2008-11-08: Created by Jianbao Tao at LASP@CU-Boulder. 2008-11-10: The head comment was added. 2009-03-30: REE. Rewrite to test epoch analysis.
(See themis/spacecraft/fields/LASP/thm_lsp_remove_spin_epoch.pro)
FUNCTION: THM_QFIT, data, phs, phsf=phsf, es=es, ec=ec, zero=zero, do_sigma=do_sigma, sigma=sigma, period=period, slide=slide, n_fitpts=n_fitpts, out=out, max_err=max_err, bad_pts=bad_pts PURPOSE: User unfriendly fit routine. NOTE: REQUIRES CONTINUOUS BUFFERS! NOT FOR GENERAL USE. INPUT: data - REQUIRED. A DATA ARRAY - NOT A STRUCTURE! RECOMMEND: dat_in does not have NANS. One nan may destroy entire period. phs - REQUIRED. An array of phases. IMPORTANT! All phases must be valid! No NANs! KEYWORDS: period - INPUT. Fit period. DEFAULT = 4pi slide - NO LONGER AN OPTION! NOTE: Slide will be forced to be pi/2. n_fitpts - INPUT. Number of points per fit. DEFAULT = 64. do_sigma - OPTION. /do_sigma fills sigma. out - OPTION. /out fills bad_pts. NOTE: FOR OUTLYER REJECTION, SEE BELOW! max_err - INPUT. Maximum allowable error of bad_pts. DEFAULT=25 nT OUTPUT: phsf - OUTPUT. Phase of fit -> Time of fit. es - OUTPUT. Sin phase of fit. es - OUTPUT. Cos phase of fit. zero - OUTPUT. Zero level of fit. sigma - OUTPUT. Deviation in nT. Only filled if /do_sigma bad_pts - OUTPUT. Deviation in nT. Only filled if /out CALLING: SEE ff_magdc for an example. MUST USE fa_fields_bufs, and ff_zero_crossing first. OUT-LYING POINTS REJECTION: The program must be iterated. For example, below shows one interation: ff_qfit,data,phs,phsf=phsf,es=es,ec=ec,zero=zero,/out, bad_pts=bad_pts data(bad_pts) = !values.f_nan index = where(finite(data), n_index) IF n_index GT 0 then BEGIN data = data(index) phs = phs(index) ff_qfit,data,phs,phsf=phsf,es=es,ec=ec,zero=zero ENDIF ELSE print, "Big trouble! No valid points." INITIAL VERSION: REE 97-10-05 Space Sciences Lab, UCBerkeley MODIFICATION HISTORY:
(See themis/spacecraft/fields/LASP/thm_qfit.pro)
HEAD: pro trange_clip,name, t1, t2, newname=newname, data_in=data_in,$ remove_match=remove_match NAME: trange_clip PURPOSE: Utility to trim the time range of a tplot variable and remove excess data. Inputs: name: Either tplot variable name or data structure (if data_in keyword specified) t1: Start time (double, time since 1970) t2: Stop time (double, time since 1970) Options: data_in: Set to specify that the input is a data structure, not a tplot name. remove_match: Removes data between t1 and t2 (default is keep only data between t1 and t2) Outputs: Modifies the specified tplot name or data structure.
(See themis/spacecraft/fields/LASP/trange_clip.pro)