Documentation for /home/davin/idl/socware/

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

projects/themis/spacecraft/fields/LASP/

thm_efi_clean_efp.pro


PRO: THM_EFI_CLEAN_EFP PURPOSE: FIXES AXIAL, REMOVES SPIKES, SPINTONE, SC POTENTIAL, AND OTHER EFP ERRORS. This routine is designed for general use. It will take EFP data in DSL as input, clean up the data, and transform the data into FAC and GSM, and return the cleaned EFP data in DSL, FAC, and GSM. If the data is gathered in the dayside, set keyword /SUBSOLAR to use keyword defaults specifically for dayside data. The routine can work on one-day long data, but if only a single particle burst data is interesting, use the keyword TRANGE to specify the time range of that burst can greatly reduce run time. CAUTION: The input keyword ENAME is optional. When it is not specified, ENAME is defaulted to 'thx_efp', where 'x' is probe name and should be one of these: 'a', 'b', 'c', 'd', and 'e'. In this case, if the existed 'thx_efp' is not in DSL, the output will be wrong. So, make sure the existed 'thx_efp' is in DSL, or specify ENAME to another tplot variable which is EFP data in DSL. NOTE: 1) Spike removal does not always work, so don't be surprised if there still are spikes left on the data. Hopefully the spike issue can be resolved in the future. 2) Merge can exhibit pathological behavior if B is near the spin plane. spike removal does not always work. 3) Make sure thx_state_spinper is available! Best to set up for gsm. Make sure timespan is set!!!! EXAMPLES: For typical use, see thm_crib_cleanefp.pro and thm_crib_cleanefi.pro which are typically located under TDAS_DIR/idl/themis/examples. INPUT: KEYWORDS (general): probe NEEDED: Program does only one sc at a time! Ename OPTIONAL: Valid TPLOT name for E, DEFAULT = 'thX_efp' (will fetch) Vname OPTIONAL: Valid TPLOT name for E, DEFAULT = 'thX_vap' (will fetch) Bdslname OPTIONAL, Valid TPLOT name for B, DEFAULT = 'thX_fgh_dsl' (will fetch) trange OPTIONAL. Time range. USE TRANGE TO ISOLATE SINGLE PARTICLE BURST AND GREATLY REDUCE RUN TIME!!!! subsolar OPTIONAL. If set, defaults for subsolar region are used. DEFAULT = TAIL talk OPTIONAL. Plots diagnostics. Can be fun. Slow. DEFAULT = 0 duration_threshold: OPTIONAL. If the duration of a burst is less than duration_threshold, it is skipped. DEFAULT = 15. In units of seconds. KEYWORDS (for output tplot variables): Edslname OPTIONAL: Name for the cleaned efp in DSL. DEFAULT = Ename + '_clean_dsl' Egsmname OPTIONAL: Name for the cleaned efp in DSL. DEFAULT = Ename + '_clean_gsm' Efacname OPTIONAL: Name for the cleaned efp in DSL. DEFAULT = Ename + '_clean_fac' KEYWORDS (Remove_SpinTone): SpinRemove If entered as 0, suppresses spintone removal. DEFAULT = 4 (Spintone removed). The following are the behaviors for different values of SpinRemove. 1: Only spintone, 2: Spintone and 2nd harm. 3: Spintone and 4th harm. 4: Spintone, 2nd, and 4th harm. SpinNsmooth Activates median smoothing. # of half periods. Must be odd. DEFAULT = 19 for subsolar and 39 otherwise. SpinPoly Activates polyfit smoothing. Can be unstable if >9. DEFAULT = 0 KEYWORDS (Remove_Potential): VscRemove If entered as 0, suppresses potential removal. DEFAULT = 1 (Potential removed.) VscPole Frequency to median smooth Vsc before applying to Ez. DEFAULT = 5.0 Hz Vpoly Actives polyfit of Ez to Vsc. DEFAULT = 2 (5 /Subsolar) Use_Electrons (OBSOLETE) Kept for backward compatibility. TeName (OBSOLETE) Kept for backward compatibility. KEYWORDS (Remove_Spikes): SpikeRemove If entered as 0, suppresses spike removal. DEFAULT = 1 (Spikes are removed.) SpikeNwin Number of points in spike search window. DFLT = 16 SpikeSig Sigma of spikes. DFLT = 5 (Sometimes Sig = 6 works better) SpikeSigmin Minimun of sigma. DFLT = 0.01 mV/m. (Sometimes Sigmin = 0 works better) SpikeNfit Number of points in the fit window. DFLT = 16 SpikeFit If set, will do a Gaussian fit to Spikes. DFLT = 0 KEYWORDS (Remove_Spin_Epoch): EpochRemove If set, removes all spin-epoch signals. DEFAULT = 0 (Not used.) Only useful for short stretches or if plasma condtitions are constant. KEYWORDS (Fix_Axial) FixAxial If entered as 0, suppresses axial fix. DEFAULT=1 (Axial is fixed.) AxPoly Forces polynomial fit of Ez-Eder of order AxPoly. DEFAULT=2 (9 /SubSolar) Merge Merges Ederived with Eaxial. DEFAULT = 0 No merging (1 /Subsolar) 1 - Abrupt merging. If Eder is avaliable Eder is used (0 - Fmerge). Else Ez. 2 - Soft merging. Bz/|B| is considered when merging. WARNING: MERGE=1 OR 2 CAN EXHIBIT PATHOLOGICAL BEHAVIOR IF MAGNETIC FIELD IS NEAR THE SPIN PLANE. PLEASE DOUBLE CHECK RESULTS IF USED. Fmerge Frequency of crossover for merging Ederived with Eaxial. DEFAULT = 5.0 Hz (/Subsolar). MergeRatio Mimimum value of Bz/|B| to start merge (USED IF MERGE=2). DEFAULT = 0.05 MinBz Needed to avoid divide by zero in Ederive. DEFAULT = 0.01 nT MinRatio Mimimum value of Bz/|B| to calculate Ederive. DEFAULT = 0.1 (0.05 /Subsolar) KEYWORDS (B_Smooth) BspinPoly Activates polyfit smoothing. Can be unstable if >9. DEFAULT = 2. -1 suppresses. Bsmooth Activates B smoothing for fac rotation. DEFAULT = 11. 1 or less suppresses. HISTORY: 2013-06-20: JBT. Added deconvolution of sheath response. 2011-05-21: JBT. Added keyword DURATION_THRESHOLD. 2011-05-20: JBT. Fixed a bug that happens when the spin-tone removing fails. 2010-09-13: JBT. The default of FixAxial was changed to 0 (not to fix axial E-field component). Updated documents. 2010-04-08: JBT. Fixed some bugs. 2009-06-04: REE/JBT. Second Release. 2009-06-04: Jianbao Tao (JBT). The metadata (dlim.data_att) was improved. 2009-05-05: REE. First Release.

Routines

Routines from thm_efi_clean_efp.pro

result = thm_efi_clean_efp_deconvol_inst_resp(E_array, srate, boom_type)
thm_efi_clean_efp, probe=probe, Ename=Ename, Vname=Vname, Bdslname=Bdslname, trange=trange, talk=talk, subsolar=subsolar, duration_threshold=duration_threshold, Edslname=Edslname, Egsmname=Egsmname, Efacname=Efacname, SpinNsmooth=SpinNsmooth, SpinPoly=SpinPoly, SpinRemove=SpinRemove, VscPole=VscPole, Vpoly=Vpoly, VscRemove=VscRemove, use_electrons=use_electrons, TeName=TeName, SpikeRemove=SpikeRemove, SpikeNwin=SpikeNwin, SpikeSig=SpikeSig, SpikeSigmin=SpikeSigmin, SpikeNfit=SpikeNfit, SpikeFit=SpikeFit, EpochRemove=EpochRemove, FixAxial=FixAxial, AxPoly=AxPoly, Merge=Merge, FMerge=FMerge, MergeRatio=MergeRatio, MinBz=MinBz, MinRatio=MinRatio, BspinPoly=BspinPoly, Bsmooth=Bsmooth

Routine details

top source thm_efi_clean_efp_deconvol_inst_resp

result = thm_efi_clean_efp_deconvol_inst_resp(E_array, srate, boom_type)

Parameters

E_array
srate
boom_type

top source thm_efi_clean_efp

thm_efi_clean_efp, probe=probe, Ename=Ename, Vname=Vname, Bdslname=Bdslname, trange=trange, talk=talk, subsolar=subsolar, duration_threshold=duration_threshold, Edslname=Edslname, Egsmname=Egsmname, Efacname=Efacname, SpinNsmooth=SpinNsmooth, SpinPoly=SpinPoly, SpinRemove=SpinRemove, VscPole=VscPole, Vpoly=Vpoly, VscRemove=VscRemove, use_electrons=use_electrons, TeName=TeName, SpikeRemove=SpikeRemove, SpikeNwin=SpikeNwin, SpikeSig=SpikeSig, SpikeSigmin=SpikeSigmin, SpikeNfit=SpikeNfit, SpikeFit=SpikeFit, EpochRemove=EpochRemove, FixAxial=FixAxial, AxPoly=AxPoly, Merge=Merge, FMerge=FMerge, MergeRatio=MergeRatio, MinBz=MinBz, MinRatio=MinRatio, BspinPoly=BspinPoly, Bsmooth=Bsmooth

Keywords

probe
Ename
Vname
Bdslname
trange
talk
subsolar
duration_threshold
Edslname
Egsmname
Efacname
SpinNsmooth
SpinPoly
SpinRemove
VscPole
Vpoly
VscRemove
use_electrons
TeName
SpikeRemove
SpikeNwin
SpikeSig
SpikeSigmin
SpikeNfit
SpikeFit
EpochRemove
FixAxial
AxPoly
Merge
FMerge
MergeRatio
MinBz
MinRatio
BspinPoly
Bsmooth

File attributes

Modification date: Thu Feb 13 16:42:36 2014
Lines: 379