fft

fft( QDataSet ds ) → QDataSet

Performs an FFT on the provided rank 1 dataset. A rank 2 dataset of complex numbers is returned. The data must not contain fill and must be uniformly spaced. DEPEND_0 is used to identify frequencies if available.

Parameters

ds - a rank 1 dataset.

Returns:

a rank 2 dataset of complex numbers.

See Also:

Schemes#rank2ComplexNumbers()
Ops#ifft(QDataSet)


[search for examples] [view on GitHub] [view on old javadoc] [view source]

fft( QDataSet ds, QDataSet window, int stepFraction, ProgressMonitor mon ) → QDataSet

fftFilter

fftFilter( QDataSet ds, int len, org.das2.qds.ops.Ops.FFTFilterType filt ) → QDataSet

Apply windows to the data to prepare for FFT. The data is reformed into a rank 2 dataset [N,len]. The filter is applied to the data to remove noise caused by the discontinuity. This is deprecated, and windowFunction should be used so that the filter is applied to records just before each fft is performed to save space.

Parameters

ds - rank 1, 2, or 3 data
len - size of the window.
filt - FFTFilterType.Hanning or FFTFilterType.TenPercentEdgeCosine

Returns:

data[N,len] with the window applied.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


fftLinearSpectralDensity

fftLinearSpectralDensity( QDataSet ds, QDataSet window, int stepFraction, ProgressMonitor mon ) → QDataSet

Perform the linear spectral density function

Parameters

ds - waveform data
window - the window to apply window to apply
stepFraction - advance by this much for each window (2 means 50% overlap, 4 means 75% overlap, etc.)
mon - progress monitor

Returns:

the linear spectral density

See Also:

https://holometer.fnal.gov/GH_FFT.pdf page 7 page 7


[search for examples] [view on GitHub] [view on old javadoc] [view source]


fftLinearSpectrum

fftLinearSpectrum( QDataSet ds, QDataSet window, int stepFraction, ProgressMonitor mon ) → QDataSet

Perform the linear spectrum function

Parameters

ds - waveform data
window - the window to apply window to apply
stepFraction - advance by this much for each window (2 means 50% overlap, 4 means 75% overlap, etc.)
mon - progress monitor

Returns:

the linear spectral density

See Also:

https://holometer.fnal.gov/GH_FFT.pdf page 7 page 7


[search for examples] [view on GitHub] [view on old javadoc] [view source]


fftPower

fftPower( QDataSet ds, int len, ProgressMonitor mon ) → QDataSet

create a power spectrum on the dataset by breaking it up and doing FFTs on each segment. A unity (or "boxcar") window is used. data may be rank 1, rank 2, or rank 3. Looks for DEPEND_1.USER_PROPERTIES.FFT_Translation, which should be a rank 0 or rank 1 QDataSet. If it is rank 1, then it should correspond to the DEPEND_0 dimension.

Parameters

ds - rank 2 dataset ds(N,M) with M>len
len - the number of elements to have in each fft.
mon - a ProgressMonitor for the process

Returns:

rank 2 FFT spectrum

[search for examples] [view on GitHub] [view on old javadoc] [view source]

fftPower( QDataSet ds, QDataSet window, ProgressMonitor mon ) → QDataSet
fftPower( QDataSet ds, int windowLen, int stepFraction, String windowName, ProgressMonitor mon ) → QDataSet
fftPower( QDataSet ds, QDataSet window, int stepFraction, ProgressMonitor mon ) → QDataSet
fftPower( QDataSet ds ) → QDataSet

fftPowerMultiThread

fftPowerMultiThread( QDataSet ds, int len, ProgressMonitor mon ) → QDataSet

Experiment with multi-threaded FFTPower function. This breaks up the task into four independent tasks that can be run in parallel.

Parameters

ds - rank 2 dataset ds(N,M) with M>len
len - the number of elements to have in each fft.
mon - a ProgressMonitor for the process

Returns:

rank 2 FFT spectrum

[search for examples] [view on GitHub] [view on old javadoc] [view source]


fftPowerSpectralDensity

fftPowerSpectralDensity( QDataSet ds, QDataSet window, int stepFraction, ProgressMonitor mon ) → QDataSet

Perform the power spectral density function

Parameters

ds - waveform data
window - the window to apply
stepFraction - advance by this much for each window (2 means 50% overlap, 4 means 75% overlap, etc.)
mon - a progress monitor

Returns:

the power spectral density

See Also:

https://holometer.fnal.gov/GH_FFT.pdf page 7 page 7


[search for examples] [view on GitHub] [view on old javadoc] [view source]


fftPowerSpectrum

fftPowerSpectrum( QDataSet ds, QDataSet window, int stepFraction, ProgressMonitor mon ) → QDataSet

Perform the linear spectrum function

Parameters

ds - waveform data
window - the window to apply window to apply
stepFraction - advance by this much for each window (2 means 50% overlap, 4 means 75% overlap, etc.)
mon - progress monitor

Returns:

the linear spectral density

See Also:

https://holometer.fnal.gov/GH_FFT.pdf page 7 page 7


[search for examples] [view on GitHub] [view on old javadoc] [view source]


fftWindow

fftWindow( QDataSet ds, int len ) → QDataSet

perform ffts on the rank 1 dataset to make a rank2 spectrogram.

Parameters

ds - rank 1 dataset
len - the window length

Returns:

rank 2 dataset.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


fillIsDifferent

fillIsDifferent( QDataSet ds1, QDataSet ds2 ) → boolean

return true of the representation of fill is different in the two data sets. TODO: this does not consider WEIGHTS.

Parameters

ds1 - a QDataSet
ds2 - a QDataSet

Returns:

true of the representation of fill is different in the two data sets.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


findex

findex( QDataSet uu, QDataSet vv ) → QDataSet

returns the "floating point index" of each element of vv within the monotonically increasing dataset uu. This handy number is the index of the lower bound plus the fractional position between the two bounds. For example, findex([100,110,120],111.2) is 1.12 because it is just after the 1st element (110) and is 12% of the way from 110 to 120. The result dataset will have the same geometry as vv. The result will be negative when the element of vv is below the smallest element of uu. The result will be greater than or equal to the length of uu minus one when it is greater than all elements. When the monotonic dataset contains repeat values, the index of the first is returned. Paul Ricchiazzi wrote this routine first for IDL as a fast replacement for the interpol routine, but it is useful in other situations as well.

Parameters

uu - rank 1 monotonically increasing dataset, non-repeating, containing no fill values.
vv - rank N dataset with values in the same physical dimension as uu. Fill is allowed.

Returns:

rank N dataset with the same geometry as vv. It will have DEPEND_0=vv when vv is rank 1.

[search for examples] [view on GitHub] [view on old javadoc] [view source]

findex( Object x, Object y ) → QDataSet

findgen

findgen( int len0 ) → QDataSet

returns rank 1 dataset with values [0.,1.,2.,...]

Parameters

len0 - an int

Returns:

a QDataSet

[search for examples] [view on GitHub] [view on old javadoc] [view source]

findgen( int len0, int len1 ) → QDataSet
findgen( int len0, int len1, int len2 ) → QDataSet
findgen( int len0, int len1, int len2, int len3 ) → QDataSet

finite

finite( QDataSet ds ) → QDataSet

returns 1 where the data is not NaN, Inf, etc I needed this when I was working with the RBSP polar scatter script. Note valid should be used to check for valid data, which also checks for NaN.

Parameters

ds - qdataset of any rank.

Returns:

1 where the data is not Nan or Inf, 0 otherwise.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


flatten

flatten( QDataSet ds ) → QDataSet

flatten a rank N dataset, though currently rank 4 is not supported. The result for rank 2 is an n,3 dataset of [x,y,z], or if there are no tags, just [z]. The last index will be the dependent variable, and the first indices will be the independent variables sorted by dimension.

Parameters

ds - the rank N dataset (note only Rank 2 is supported for now).

Returns:

rank 2 dataset bundle

See Also:

org.das2.qds.DataSetOps#flattenRank2(QDataSet)
grid(QDataSet)
flattenWaveform(QDataSet)


[search for examples] [view on GitHub] [view on old javadoc] [view source]


flattenWaveform

flattenWaveform( QDataSet ds ) → QDataSet

flatten a rank 2 dataset where the y depend variable is just an offset from the xtag. Note the new DEPEND_0 may have different units from ds.property(DEPEND_0).

Parameters

ds - rank 2 waveform with tags for DEPEND_0 and offsets for DEPEND_1

Returns:

rank 1 waveform

See Also:

flatten(QDataSet)
DataSetOps#flattenWaveform(QDataSet)
synchronizeNN(QDataSet, QDataSet)


[search for examples] [view on GitHub] [view on old javadoc] [view source]


floor

floor( QDataSet ds1 ) → QDataSet

element-wise floor function.

Parameters

ds1 - a QDataSet

Returns:

a QDataSet

[search for examples] [view on GitHub] [view on old javadoc] [view source]

floor( double x ) → double
floor( Object ds1 ) → QDataSet

fltarr

fltarr( int len0 ) → QDataSet

create a dataset filled with zeros, stored in 4-byte floats.

Parameters

len0 - the zeroth dimension length

Returns:

rank 1 dataset filled with zeros.

See Also:

zeros(int)
dblarr(int)
strarr(int)


[search for examples] [view on GitHub] [view on old javadoc] [view source]

fltarr( int len0, int len1 ) → QDataSet
fltarr( int len0, int len1, int len2 ) → QDataSet