Trees | Index | Help |
---|
Module gwy :: Class DataLine |
|
DataLine
struct contains private data
only and should be accessed using the functions below.
Method Summary | |
---|---|
Creates a new data line. | |
Coputes autocorrelation function and stores the values in target_line | |
Adds a specified value to all values in a data line. | |
Computes cumulative distribution of angles in interval [ ymin , ymax ). | |
Computes cumulative distribution of heighs in interval [ ymin , ymax ). | |
Checks whether two data lines are compatible. | |
Fills a data line with zeroes. | |
Copies the contents of a data line to another already allocated data line of the same size. | |
Sets lateral and value units of a data field to match a data line. | |
Transforms a distribution in a data line to cummulative distribution. | |
Computes distribution of angles in interval [ ymin ,
ymax ). | |
Emits signal "data_changed" on a data line. | |
Computes distribution of heights in interval [ ymin , ymax ). | |
Calculates the distribution of data line values. | |
Performs steps of the wavelet decomposition. | |
Calculates Fast Fourier Transform of a data line. | |
Calculates Fast Fourier Transform of a data line. | |
Fills a data line with specified value. | |
Computes average value of a data line. | |
Gets the raw data buffer of a data line. | |
Computes central derivaltion at given index in a data line. | |
Gets interpolated value at arbitrary data line point indexed by pixel coordinates. | |
Gets interpolated value at arbitrary data line point indexed by real coordinates. | |
Calculates physical length of a data line. | |
Finds the maximum value of a data line. | |
Finds median of a data line. | |
Finds the minimum value of a data line. | |
Finds approximate modus of a data line. | |
Gets the offset of data line origin. | |
Gets the physical size of a data line. | |
Gets the number of data points in a data line. | |
Computes root mean square value of a data line. | |
Returns: SI unit corresponding to the lateral (X) dimension of the data | |
Returns: SI unit corresponding to the "height" (Z) dimension of the data | |
Computes sum of all values in a data line. | |
Computes root mean square slope in a data line. | |
Gets value at given position in a data line. | |
Computes height-height correlation function and stores results in target_line . | |
Reflects amd/or inverts a data line. | |
Transforms pixel coordinate to real (physical) coordinate. | |
Performs line leveling. | |
Performs line rotation. | |
Multiplies all values in a data line with a specified value. | |
Creates a new data line similar to an existing one. | |
Creates a new data line by resampling an existing one. | |
Adds specified value to all values in a part of a data line. | |
Fills a data line part with zeroes. | |
Extracts a part of a data line to a new data line. | |
Calculates Fast Fourier Transform of a part of a data line. | |
Fills specified part of data line with specified number | |
Computes mean value of all values in a part of a data line. | |
Finds the maximum value of a part of a data line. | |
Finds median of a data line part. | |
Finds the minimum value of a part of a data line. | |
Finds approximate modus of a data line part. | |
Computes root mean square value of a part of a data line. | |
Computes sum of all values in a part of a data line. | |
Computes root mean square slope in a part of a data line. | |
Multiplies all values in a part of data line by specified value. | |
Subtracts a polynomial from a part of a data line. | |
Sets all the values within interval to bottom or
top value depending on whether the original values
are below or above threshold value. | |
Calculates the power spectral density function of a data line. | |
Resamples a data line. | |
Resizes (crops) a data line. | |
Performs line rotation. | |
Transforms real (physical) coordinate to pixel coordinate. | |
Sets the offset of a data line origin. | |
Sets the real data line size. | |
Sets the SI unit corresponding to the lateral (X) dimension of a data line. | |
Sets the SI unit corresponding to the "height" (Z) dimension of a data line. | |
Sets the value at given position in a data line. | |
Subtracts a polynomial from a data line. | |
Sets all the values to bottom or
top value depending on whether the original values
are below or above threshold value | |
Fits a polynomial through a data line. | |
Finds line leveling coefficients. | |
Finds value format good for displaying coordinates of a data line. | |
Finds value format good for displaying values of a data line. | |
Fits a polynomial through a part of a data line. |
Method Details |
---|
__init__(res,
real,
nullme)
Creates a new data line.
|
acf(target_line)Coputes autocorrelation function and stores the values intarget_line
|
add(value)Adds a specified value to all values in a data line.
|
cda(target_line, ymin, ymax, nsteps)Computes cumulative distribution of angles in interval
[
|
cdh(target_line, ymin, ymax, nsteps)Computes cumulative distribution of heighs in interval
[
|
check_compatibility(data_line2, check)Checks whether two data lines are compatible.
|
clear()Fills a data line with zeroes. |
copy(b)Copies the contents of a data line to another already allocated data line of the same size. <warning>Semantic of method differs fromDataField.copy (), it copies only data. It
will be probably changed.</warning>
|
copy_units_to_data_field(data_field)Sets lateral and value units of a data field to match a data line.
|
cumulate()Transforms a distribution in a data line to cummulative distribution. Each element becomes sum of all previous elements in the line, including self. |
da(target_line, ymin, ymax, nsteps)Computes distribution of angles in interval
[
|
data_changed()Emits signal "data_changed" on a data line. |
dh(target_line, ymin, ymax, nsteps)Computes distribution of heights in interval
[
|
distribution(distribution, ymin, ymax, normalize_to_unity, nstats)Calculates the distribution of data line values. This function is quite similar to If all values are equal and
|
dwt(wt_coefs, direction, minsize)Performs steps of the wavelet decomposition. The smallest low pass coefficients block is equal tominsize . Run with minsize =
dline ->res/2 to perform one step of
decomposition or minsize = 4 to perform full
decomposition (or anything between).
|
fft(isrc, rdest, idest, windowing, direction, interpolation, preserverms, level)Calculates Fast Fourier Transform of a data line. A windowing or data leveling can be applied if requested.
|
fft_raw(isrc, rdest, idest, direction)Calculates Fast Fourier Transform of a data line. No leveling, windowing nor scaling is performed. Since 2.8 the dimensions need not to be from the set of sizes
returned by
|
fill(value)Fills a data line with specified value.
|
get_avg()Computes average value of a data line.
|
get_data()Gets the raw data buffer of a data line. The returned buffer is not guaranteed to be valid through whole data
line life time. Some function may change it, most notably DataLine.get_data_const () if you are not going to change
the data.
|
get_der(i)Computes central derivaltion at given index in a data line.
|
get_dval(x, interpolation)Gets interpolated value at arbitrary data line point indexed by pixel coordinates. Note pixel values are centered in intervals [ DataLine.get_dval_real () that does the
same, but takes real coordinates.
|
get_dval_real(x, interpolation)Gets interpolated value at arbitrary data line point indexed by real coordinates. See alsoDataLine.get_dval () for interpolation
explanation.
|
get_length()Calculates physical length of a data line. The length is calculated from approximation by straight segments between values.
|
get_max()Finds the maximum value of a data line.
|
get_median()Finds median of a data line.
|
get_min()Finds the minimum value of a data line.
|
get_modus(histogram_steps)Finds approximate modus of a data line. SeeDataLine.part_get_modus () for details and
caveats.
|
get_offset()Gets the offset of data line origin.
|
get_real()Gets the physical size of a data line.
|
get_res()Gets the number of data points in a data line.
|
get_rms()Computes root mean square value of a data line.
|
get_si_unit_x()Returns: SI unit corresponding to the lateral (X) dimension of the data
|
get_si_unit_y()Returns: SI unit corresponding to the "height" (Z) dimension of the data
|
get_sum()Computes sum of all values in a data line.
|
get_tan_beta0()Computes root mean square slope in a data line.
|
get_val(i)Gets value at given position in a data line. Do not access data with this function inside inner loops, it's slow. Get raw data buffer withDataLine.get_data_const () and
access it directly instead.
|
hhcf(target_line)Computes height-height correlation function and stores results intarget_line .
|
invert(x, z)Reflects amd/or inverts a data line. In the case of value reflection, it's inverted about mean value.
|
itor(pixpos)Transforms pixel coordinate to real (physical) coordinate. That is it maps range [0..resolution] to range [0..real-size]. It is not suitable for conversion of matrix indices to physical coordinates, you have to useDataLine.itor (data_line ,
pixpos + 0.5) for that.
|
line_level(av, bv)Performs line leveling. SeeDataLine.get_line_coeffs () for deails.
|
line_rotate(angle, interpolation)Performs line rotation. UseDataLine.rotate () instead.
|
multiply(value)Multiplies all values in a data line with a specified value.
|
new_alike(nullme)Creates a new data line similar to an existing one. UseDataLine.duplicate () if you want to copy a data
line including data.
|
new_resampled(res, interpolation)Creates a new data line by resampling an existing one. This method is equivalent toDataLine.duplicate ()
followed by DataLine.resample (), but it is more
efficient.
|
part_add(_from, to, value)Adds specified value to all values in a part of a data line.
|
part_clear(_from, to)Fills a data line part with zeroes.
|
part_extract(_from, len)Extracts a part of a data line to a new data line.
|
part_fft(isrc, rdest, idest, _from, len, windowing, direction, interpolation, preserverms, level)Calculates Fast Fourier Transform of a part of a data line. A windowing or data leveling can be applied if requested.
|
part_fill(_from, to, value)Fills specified part of data line with specified number
|
part_get_avg(_from, to)Computes mean value of all values in a part of a data line.
|
part_get_max(_from, to)Finds the maximum value of a part of a data line.
|
part_get_median(_from, to)Finds median of a data line part.
|
part_get_min(_from, to)Finds the minimum value of a part of a data line.
|
part_get_modus(_from, to, histogram_steps)Finds approximate modus of a data line part. As each number in the data line is usually unique, this function does not return modus of the data itself, but modus of a histogram.
|
part_get_rms(_from, to)Computes root mean square value of a part of a data line.
|
part_get_sum(_from, to)Computes sum of all values in a part of a data line.
|
part_get_tan_beta0(_from, to)Computes root mean square slope in a part of a data line. This is the root mean square of value derivatives, it is also proportional to the second derivative of both HHCF and ACF at zero.
|
part_multiply(_from, to, value)Multiplies all values in a part of data line by specified value.
|
part_subtract_polynom(n, coeffs, _from, to)Subtracts a polynomial from a part of a data line.
|
part_threshold(_from, to, threshval, bottom, top)Sets all the values within interval tobottom or
top value depending on whether the original values
are below or above threshold value.
|
psdf(target_line, windowing, interpolation)Calculates the power spectral density function of a data line. Up to version 2.7 it destroyed the input data and did not set the output units properly.
|
resample(res, interpolation)Resamples a data line. In other words changes the size of one dimensional field related with data line. The original values are used for resampling using a requested interpolation alorithm.
|
resize(_from, to)Resizes (crops) a data line. Extracts a part of data line in rangefrom ..(to -1), recomputing real
sizes.
|
rotate(angle, interpolation)Performs line rotation. This is operation similar to leveling, but it does not change the angles between line segments (on the other hand it introduces other deformations due to discretization). Since: 2.7
|
rtoi(realpos)Transforms real (physical) coordinate to pixel coordinate. That is it maps range [0..real-size] to range [0..resolution].
|
set_offset(offset)Sets the offset of a data line origin. Note offsets don't affect any calculation, nor functions likeDataLine.rtoi ().
|
set_real(real)Sets the real data line size.
|
set_si_unit_x(si_unit)Sets the SI unit corresponding to the lateral (X) dimension of a data line. It does not assume a reference onsi_unit ,
instead it adds its own reference.
|
set_si_unit_y(si_unit)Sets the SI unit corresponding to the "height" (Z) dimension of a data line. It does not assume a reference onsi_unit ,
instead it adds its own reference.
|
set_val(i, value)Sets the value at given position in a data line. Do not set data with this function inside inner loops, it's slow. Get raw data buffer withDataLine.get_data () and write to it
directly instead.
|
subtract_polynom(n, coeffs)Subtracts a polynomial from a data line.
|
threshold(threshval, bottom, top)Sets all the values tobottom or
top value depending on whether the original values
are below or above threshold value
|
UNIMPLEMENTED_fit_polynom(n, coeffs)Fits a polynomial through a data line. Note DataLine.get_avg () and
DataLine.line_coeffs () because they are faster.
|
UNIMPLEMENTED_get_line_coeffs(av, bv)Finds line leveling coefficients. The coefficients can be used for line leveling using relation data[i] := data[i] - (av + bv*i);
|
UNIMPLEMENTED_get_value_format_x(style, format)Finds value format good for displaying coordinates of a data line.
|
UNIMPLEMENTED_get_value_format_y(style, format)Finds value format good for displaying values of a data line. Note this functions searches for minimum and maximum value indata_line , therefore it's relatively slow.
|
UNIMPLEMENTED_part_fit_polynom(n, coeffs, _from, to)Fits a polynomial through a part of a data line. Please seeDataLine.fit_polynom () for more details.
|
Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Tue Dec 30 04:01:42 2008 | http://epydoc.sf.net |