projects/themis/spacecraft/fields/
thm_spinavg.pro
NAME: thm_spinavg PURPOSE: average data over spin periods, and return a tplot variable CALLING SEQUENCE: thm_spinavg,var_name_in, $ sigma=sigma, npoints=npoints, spinaxis=spinaxis, median=median, $ plane_dim=plane_dim, axis_dim=axis_dim, $ min_points=min_points,alpha=alpha,beta=beta, $ phase_mask_starts=phase_mask_starts,phase_mask_ends=phase_mask_ends, $ sun2sensor=sun2sensor INPUT: var_name_in = tplot variable name containing data to fit keywords: sigma = If set, will cause program to output tplot variable with sigma for each period. npoints = If set, will cause program to output tplot variable with of points in fit. spin_frac_offset = If set, the time array of the variable will be offset by this fraction of an average spin period before averaging. absv = if set, fit the absolute value. min_points = Minimum number of points to fit. Default = 5. alpha = A parameter for finding fits. Points outside of sigma*(alpha + beta*i) will be thrown out for the ith iteration. Default 1.4. beta = A parameter for finding fits. See above. Default = 0.4 $LastChangedBy: aaflores $ $LastChangedDate: 2012-01-26 16:43:03 -0800 (Thu, 26 Jan 2012) $ $LastChangedRevision: 9624 $ $URL:
Routines
Routines from thm_spinavg.pro
result = tmp_outlier_reject(x0, alpha, beta, min_points, sigma, nkeep, x_out=x_out)
spinavg, arr_in_t, arr_in_data, arr_in_spin_t, arr_out_data, arr_out_sigma, npoints, sun_data, min_points=min_points, alpha=alpha, beta=beta, _extra=_extra
Name: spinavgPurpose: performs a spinavg on B or E field data, results are average values over the spin periods -- nothing elseCalling Sqeuence: spinavg,arr_in_t,arr_in_data,arr_in_sunpulse_t,arr_in_sunpulse_data, $ arr_out_data,arr_out_sigma,npoints,sun_data,$ min_points=min_points,alpha=alpha,beta=betaInput: arr_in_t = time array for the data arr_in_data = the data to be spin fit arr_in_sunpulse_t = time array for sunpulse data arr_in_sunpulse_data = sunpulse dataOutput: arr_out_data = the array averaged over the spin periods sigma = sigma for each spin period npoints = number of points in fit for each spin period sun_data = midpoint times of spitfit datakeywords: min_points = Minimum number of points to fit.
thm_spinavg, var_name_in, sigma=sigma, npoints=npoints, spin_frac_offset=spin_frac_offset, absv=absv, _extra=_extra
Routine details
File attributes
Modification date: | Thu Feb 13 16:42:39 2014 |
Lines: | 127 |