projects/themis/spacecraft/particles/SST/
thm_sst_erange_bin_val.pro
PROCEDURE: THM_SST_ERANGE_BIN_VAL Purpose: This routine generates the values that will be subtracted to remove electronic noise. The actual subtraction is done by thm_sst_remove_sunpulse.pro A separate value will be calculated for each combination of bin and energy, but a single value will be calculated for all times(at a particular bin/energy). This value will be generated using one of several different functions of the values across time. The functions can be specified by the user. The user should never call this routine directly, but should instead provide the appropriate arguments to thm_part_moments,thm_part_moments2, & thm_part_getspec These routines will guarantee that this routine is called correctly. Arguments(note these arguments are generated correctly in thm_part_moments & thm_part_moments2) thx: a string representing a probe prefix(ie 'tha') instrument: a string representing the instrument(ie 'psif') Note that this routine will only perform an operation if it is passed a string representing sst full distribution data. (ie 'psif', 'psef') times: a list of times for the sst measurements, this list is generated by thm_part_dist Keywords: method_clean: If set to 'manual', this keyword disables the enoise code, as another method will be used by thm_sst_remove_sunpulse.pro enoise_bins: A 0-1 array that indicates which bins should be used to calculate electronic noise. A 0 indicates that the bin should be used for electronic noise calculations. This is basically the output from the bins argument of edit3dbins. It should have dimensions 16x4. enoise_bgnd_times: This should be either a 2 element array or a 2xN element array(where n is the number of elements in enoise_bins). The arguments represents the start and end times over which the electronic background will be calculated for each bin. If you pass a 2 element array the same start and end times can be used for each bin. If you pass a 2xN element array, then the Ith bin in enoise_bins will use the time enoise_bgnd_time[0,I] as the start time and enoise_bgnd_time[1,I] as the end time for the calculation of the background for that bin. If this keyword is not set then electronic noise will not be subtracted. enoise_remove_method(default: 'fit_median') set the keyword to a string specifying the method you want to use to calculate the electronic noise that will be subtracted This function combines values across time. The allowable options are: 'min': Use the minimum value in the time interval for each bin/energy combination. 'average': Use the average value in the time interval for each bin/energy combination. 'median': Use the median value in the time interval for each bin/energy combination. 'fit_average': Fill in selected bins with a value that is interpolated across phi then subtracts the average of the difference between the interpolated value and the actual value from each selected bin/energy combination. 'fit_median' :Fill in selected bins with a value that is interpolated across phi then subtracts the median of the difference between the interpolated value and the actual value from each selected bin/energy combination. 'fill': Fill the selected bins using the technique specified by enoise_remove_method_fit, or interpolation by default. (note that if this method is used, enoise_bgnd_time is not required) enoise_remove_fit_method(default:'interpolation'): Set this keyword to control the method used in 'fit_average' & 'fit_median' to fit across phi. Options are 'interpolation' & 'spin_fit' By default, missing bins are interpolated across phi. Setting enoise_remove_fit_method='spin_fit' will instead try to fill by fitting to a curve of the form A+B*sin(phi)+C*cos(phi). SEE ALSO: thm_part_moments.pro, thm_part_moments2.pro, thm_part_getspec.pro thm_part_dist.pro, thm_sst_psif.pro, thm_sst_psef.pro,thm_crib_sst_contamination.pro thm_sst_find_masking.pro, thm_sst_remove_sunpulse.pro $LastChangedBy: pcruce $ $LastChangedDate: 2014-01-03 12:10:47 -0800 (Fri, 03 Jan 2014) $ $LastChangedRevision: 13737 $ $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/themis/spacecraft/particles/SST/thm_sst_erange_bin_val.pro $
Routines
Routines from thm_sst_erange_bin_val.pro
result = do_enoise_spin_fill(dat, ref, phi)
result = thm_sst_erange_bin_val(thx, instrument, times, enoise_bins=enoise_bins, enoise_bgnd_times=enoise_bgnd_times, enoise_remove_method=enoise_remove_method, enoise_remove_fit_method=enoise_remove_fit_method, method_clean=method_clean, limit_sunpulse_clean=limit_sunpulse_clean, _extra=_extra)
Routine details
top source thm_sst_erange_bin_val
result = thm_sst_erange_bin_val(thx, instrument, times, enoise_bins=enoise_bins, enoise_bgnd_times=enoise_bgnd_times, enoise_remove_method=enoise_remove_method, enoise_remove_fit_method=enoise_remove_fit_method, method_clean=method_clean, limit_sunpulse_clean=limit_sunpulse_clean, _extra=_extra)
Parameters
- thx
- instrument
- times
Keywords
- enoise_bins
- enoise_bgnd_times
- enoise_remove_method
- enoise_remove_fit_method
- method_clean
- limit_sunpulse_clean
- _extra
File attributes
Modification date: | Thu Feb 13 16:42:42 2014 |
Lines: | 232 |