| Top |
void gwy_line_min_max (GwyLine *line,gdouble *min,gdouble *max);
Finds the minimum and maximum values of a data line.
gint
gwy_line_min_pos_i (GwyLine *line);
Finds the minimum pixel position of a data line.
For historical reasons the value is returned as double, but it is always an integer.
gint
gwy_line_max_pos_i (GwyLine *line);
Finds the maximum pixel position of a data line.
For historical reasons the value is returned as double, but it is always an integer.
gdouble
gwy_line_min_pos_r (GwyLine *line);
Finds the real minimum position in a data line.
gdouble
gwy_line_max_pos_r (GwyLine *line);
Finds the real maximum position in a data line.
gdouble
gwy_line_rms (GwyLine *line);
Computes root mean square value of a data line.
gdouble
gwy_line_tan_beta0 (GwyLine *line);
Computes root mean square slope in a data line.
gdouble
gwy_line_variation (GwyLine *line);
Computes the total variation of a data line.
See gwy_line_part_variation() for definition and discussion.
gdouble
gwy_line_ra (GwyLine *line);
Computes the mean absolute deviation of a data line.
gdouble
gwy_line_kurtosis (GwyLine *line);
Computes the kurtosis of a data line.
gdouble gwy_line_part_max (GwyLine *line,gint pos,gint len);
Finds the maximum value of a part of a data line.
gdouble gwy_line_part_min (GwyLine *line,gint pos,gint len);
Finds the minimum value of a part of a data line.
void gwy_line_part_min_max (GwyLine *line,gint pos,gint len,gdouble *min,gdouble *max);
Finds the minimum and maximum values of a part of a data line.
gdouble gwy_line_part_avg (GwyLine *line,gint pos,gint len);
Computes mean value of all values in a part of a data line.
gdouble gwy_line_part_rms (GwyLine *line,gint pos,gint len);
Computes root mean square value of a part of a data line.
gdouble gwy_line_part_tan_beta0 (GwyLine *line,gint pos,gint len);
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.
This roughness quantity is also known as Dq.
gdouble gwy_line_part_variation (GwyLine *line,gint pos,gint len);
Computes the total variation of a part of a data line.
The total variation is estimated as the integral of the absolute value of local gradient. For one dimensional
data, the variation reduces to the integral of absolute value of the derivative. Its units are thus the same as
the value units of the line. See also gwy_field_area_get_variation() for some more discussion.
gdouble gwy_line_part_sum (GwyLine *line,gint pos,gint len);
Computes sum of all values in a part of a data line.
gdouble gwy_line_part_ra (GwyLine *line,gint pos,gint len);
Computes mean absolute deviation value of a part of a data line.
gdouble gwy_line_part_skew (GwyLine *line,gint pos,gint len);
Computes skew value of a part of a data line.
gdouble gwy_line_part_kurtosis (GwyLine *line,gint pos,gint len);
Computes kurtosis value of a part of a data line.
Note the kurtosis returned by this function returns is the excess kurtosis which is zero for the Gaussian distribution (not 3).
gdouble gwy_line_modus (GwyLine *line,gint histogram_steps);
Finds approximate modus of a data line.
See gwy_line_part_modus() for details and caveats.
gdouble gwy_line_part_modus (GwyLine *line,gint pos,gint len,gint 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.
gdouble gwy_line_part_median (GwyLine *line,gint pos,gint len);
Finds median of a data line part.
gdouble
gwy_line_length (GwyLine *line);
Calculates physical length of a data line.
The length is calculated from approximation by straight segments between values.
gdouble gwy_line_xpm (GwyLine *line,gint m,gint k);
Calculates a peak roughness quantity for a data line.
Depending on m
and k
, the function can calculate Average Maximum Profile Peak Height Rpm
or Maximum Profile Peak
Height Rp
, Pp
, Wp
.
gdouble gwy_line_xvm (GwyLine *line,gint m,gint k);
Calculates a valley roughness quantity for a data line.
Depending on m
and k
, the function can calculate Average Maximum Profile Valley Depth Rvm
or Maximum Profile
Peak Depth Rv
, Pv
, Wv
.
gdouble gwy_line_xtm (GwyLine *line,gint m,gint k);
Calculates a total roughness quantity for a data line.
The total quantity is just the sum of the corresponding quantities obtained by gwy_line_xpm() and
gwy_line_xvm().
gint gwy_line_kth_peaks (GwyLine *line,gint m,gint rank,gboolean peaks,gboolean average,gdouble pthreshold,gdouble vthreshold,gdouble *peakvalues);
Calculate k-th largers peaks or valleys in a data line split into given number of sampling lengths.
This is a general function that can be used as the base for various standard roughness quantities such as Rp, Rpm, Rv, Rvm or R3z. It is assumed the line is already levelled, the form removed, etc.
See gwy_line_count_peaks() for the description what is considered a peak.
For larger thresholds and/or short lines some sampling lengths may contain fewer than the requested number of
peaks. If there are any peaks at all, the smallest peak height (even though it is not rank
-th) is used. If there
are no peaks, a large negative value is stored in the corresponding peakvalues
item.
line |
A data line. |
|
m |
Number of sampling lengths the line is split into. |
|
rank |
Rank of the peak to find. One means the highest peak, three the third highest, etc. |
|
peaks |
|
|
average |
Calculate the average of the first |
|
pthreshold |
Peak height threshold. Peaks must stick above this threshold. |
|
vthreshold |
Valley depth threshold. Valleys must fall below this threshold. The depth is a positive value. |
|
peakvalues |
Array of length at least |
gint gwy_line_count_peaks (GwyLine *line,gboolean peaks,gdouble pthreshold,gdouble vthreshold);
Counts peaks or valleys defined by thresholds in a data line.
Peak is defined as a part of the profile that extends above the peak threshold and is separarted by valleys that extend below the valley threshold. For non-zero thresholds there may be parts between that are neither peaks not valleys because the local maxima in them are insignificant.
In either case, values of pthreshold
and vthreshold
must be non-negative. Usually one passes the same value for
both.
line |
A data line. |
|
peaks |
|
|
pthreshold |
Peak height threshold. Peaks must stick above this threshold. |
|
vthreshold |
Valley depth threshold. Valleys must fall below this threshold. |
void gwy_line_distribution (GwyLine *line,GwyLine *distribution,gdouble ymin,gdouble ymax,gboolean normalize_to_unity,gint nstats);
Calculates the distribution of data line values.
This function is quite similar to gwy_line_dh(), the differences are: output normalization (chosen to make the
integral unity), output units (again set to make the integral unity), automated binning.
Note the i
-th bin is [i
*dx
+off
,(i
+1)*dx
+off
] so the central value you probably want to use for plotting is
(i
+0.5)*dx
+off
(where dx
is the distribution
data line pixel size, off
is its offset).
If all values are equal and ymin
, ymax
are not explictly specified, the range is chosen as [v
-|v
|/2,v
+|v
/2]
where v
is the unique value, except when v
=0, in which case the range is set to [-1,1].
line |
A data line. |
|
distribution |
Data line to put the distribution of |
|
ymin |
Start of value range, pass |
|
ymax |
End of value range. |
|
normalize_to_unity |
|
|
nstats |
The requested number of histogram bins, pass a non-positive number to automatically choose a suitable number of bins. |
void gwy_line_height_dist (GwyLine *line,GwyLine *target_line,gdouble ymin,gdouble ymax,gint nsteps);
Computes distribution of heights in interval [ymin
, ymax
).
If the interval is (0, 0) it computes the distribution from real data minimum and maximum value.
void gwy_line_angle_dist (GwyLine *line,GwyLine *target_line,gdouble ymin,gdouble ymax,gint nsteps);
Computes distribution of angles in interval [ymin
, ymax
).
If the interval is (0, 0) it computes the distribution from real data minimum and maximum angle value.
void gwy_line_acf (GwyLine *line,GwyLine *target_line);
Coputes autocorrelation function and stores the values in target_line
void gwy_line_hhcf (GwyLine *line,GwyLine *target_line);
Computes height-height correlation function and stores results in target_line
.
void gwy_line_psdf (GwyLine *line,GwyLine *target_line,GwyWindowingType windowing);
Calculates the power spectral density function of a data line.
Line statistical quantities to be requested with gwy_field_area_get_line_stats().
|
Mean value. |
||
|
Median. |
||
|
Minimum value. |
||
|
Maximum value. |
||
|
Root mean square of deviations from the mean value. |
||
|
Line length. |
||
|
Overall line slope. |
||
|
Root mean square slope. |
||
|
Arithmetic mean surface roughness. |
||
|
Maximum height of the roughness profile. |
||
|
Total height of the roughness profile. |
||
|
Line skew. |
||
|
Line excess kurtosis (which is 0 for a Gaussaian distrubution, not 3). |
||
|
Difference between maximum and minimum value. |
||
|
Variation (integral of absolute value). |
||
|
Minimum position along the line. |
||
|
Maximum position along the line. |