Documentation for /home/davin/idl/socware/

Generated by IDLdoc

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

general/misc/

dpwrspc.pro


Routines

top source dpwrspc

dpwrspc, time, quantity, tdps, fdps, dps, nboxpoints=nboxpoints, nshiftpoints=nshiftpoints, bin=bin, tbegin=tbegin, tend=tend, noline=noline, nohanning=nohanning, notperhz=notperhz, fail=fail, noTmVariance=noTmVariance, tm_sensitivity=tm_sensitivity, _extra=_extra

NAME: dpwrspc PURPOSE: Called with times time and data quantity, dpwrspc returns a dps spectrum at frequencies fdps. A Hanning window is applied to the input data, and its power is divided out of the returned spectrum. A straight line is subtracted from the data to reduce spurious power due to sawtooth behavior of a background. UNITS ARE (UNITS)^2 WHERE UNITS ARE THE UNITS OF time. fdps is in Hz. THUS THE OUTPUT REPRESENTS THE MEAN SQUARED AMPLITUDE OF THE SIGNAL AT EACH SPECIFIC FREQUENCY. THE TOTAL (SUM) POWER UNDER THE CURVE IS EQUAL TO THE MEAN (OVER TIME) POWER OF THE OSCILLATION IN TIME DOMAIN. NOTE: IF KEYWORD notperhz IS SET, THEN POWER IS IN UNITS OF NT^2 ELSE IT IS IN UNITS OF NT^2/HZ. CALLING SEQUENCE: dpwrspc, time, quantity, tdps, fdps, dps, nboxpoints = nboxpoints, $ nshiftpoints = nshiftpoints, bin = bin, tbegin = tbegin,$ tend = tend, noline = noline, nohanning = nohanning, $ notperhz = notperhz INPUT: time = the time array quantity = the function for which you want to obtain a power spectrum OUTPUT: tps = the time array for the dynamic power spectrum, the center time of the interval used for the spectrum fdps = the frequency array (units =1/time units) dps = the power spectrum, (units of quantity)^2/frequency_units KEYWORDS: nboxpoints = the number of points to use for the hanning window, the default is 256 nshiftpoints = this is the number of points to shift for each spectrum, the first spectrum will cover the range from 0 to nboxpoints, then next will cover the range from nshiftpoints to nshiftpoints+nboxpoints, etc.. the default is 128. bin = a binsize for binning of the data along the frequency domain, the default is 3 tbegin = a start time, the default is time[0] tend = an end time, the default is time[n_elements(time)-1] noline = if set, no straight line is subtracted nohanning = if set, then no hanning window is applied to the input notperhz = if set, the output units are simply the square of the input units noTmVariance = if set replaces output spectrum for any windows that have variable cadence with NaNs tm_sensitivity = If noTmVariance is set, this number controls how much of a dt anomaly is accepted. The program will flag a time resolution discontinuity if the time resolution dt changes by a value greater than dt/dt_sensitivity; the default is 100.0; i.e. If, for a given spectrum, if there are points with abs(dt[i]-median(dt) Gt median(dt)/100.0, then this will be set to NaN. A larger value means more sensitivity. If you want to flag round-off errors then try a value of 1.0e8. fail = if set to a named variable, returns 1 if an error occurs, 0 otherwise $LastChangedBy: $ $LastChangedDate: $ $LastChangedRevision: $ $URL: $

Parameters

time
quantity
tdps
fdps
dps

Keywords

nboxpoints
nshiftpoints
bin
tbegin
tend
noline
nohanning
notperhz
fail
noTmVariance
tm_sensitivity
_extra

File attributes

Modification date: Thu Feb 13 16:43:47 2014
Lines: 136