diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 140f108..7499d2e 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2023-12-18T20:58:47","documenter_version":"1.2.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2023-12-18T21:09:19","documenter_version":"1.2.1"}} \ No newline at end of file diff --git a/dev/index.html b/dev/index.html index 115776e..228170d 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,5 +1,5 @@ -Home · VectorPlotDigitizer.jl

VectorPlotDigitizer

Documentation for VectorPlotDigitizer.

VectorPlotDigitizer.binedges_to_bin_midpointsMethod
binedges_to_bin_midpoints(data; zero_threshold::Real = 0.0, atol::Real= 0.0)

Transforms a set of points that delimits the vertexes of a binned plot into a set of points for each bin mid point value.

data must be two-column array of numbers that delimit some bin vertexes. The function will detect a bin when two consecutive values of the y axis are not vertical. In such case it will compute the midpoint value of the x axis and take that y axis value.

If a value of zero_threshold different than 0 is given, then every detected bin with a y value y < zero_threshold will be considered as 0.0.

If a value of atol is provided, this will be taken as the absolute tolerance in the isapprox method that checks if two points are a straigth vertical line or not. Higher values of atol may give undesired results.

source
VectorPlotDigitizer.fill_zeros_binsMethod
fill_zeros_bins(real_xs, xs, ys, atol; zero_threshold::Real = 0.0)

Given some digitized binned data, where xs are the the bins x axis midpoints and ys are the corresponding values on the y axis, this function fills with zeros the missing bins.

The complete set of bins is given by real_xs and atol is the absolute tolerance to use when comparing whether a given element of xs is inside of ys or not. Smaller values of atol will make less values of xs to be found inside real_xs.

If a value of zero_threshold different than 0 is given, then every bin with a y value y < zero_threshold will be considered as 0.0.

Examples

Given the following real_x bins and the digitized x_bins and y_bins:

julia> real_bins = [0.5, 1.5, 2.5, 3.5]
+Home · VectorPlotDigitizer.jl

VectorPlotDigitizer

Documentation for VectorPlotDigitizer.

VectorPlotDigitizer.binedges_to_bin_midpointsMethod
binedges_to_bin_midpoints(data; zero_threshold::Real = 0.0, atol::Real= 0.0)

Transforms a set of points that delimits the vertexes of a binned plot into a set of points for each bin mid point value.

data must be two-column array of numbers that delimit some bin vertexes. The function will detect a bin when two consecutive values of the y axis are not vertical. In such case it will compute the midpoint value of the x axis and take that y axis value.

If a value of zero_threshold different than 0 is given, then every detected bin with a y value y < zero_threshold will be considered as 0.0.

If a value of atol is provided, this will be taken as the absolute tolerance in the isapprox method that checks if two points are a straigth vertical line or not. Higher values of atol may give undesired results.

source
VectorPlotDigitizer.fill_zeros_binsMethod
fill_zeros_bins(real_xs, xs, ys, atol; zero_threshold::Real = 0.0)

Given some digitized binned data, where xs are the the bins x axis midpoints and ys are the corresponding values on the y axis, this function fills with zeros the missing bins.

The complete set of bins is given by real_xs and atol is the absolute tolerance to use when comparing whether a given element of xs is inside of ys or not. Smaller values of atol will make less values of xs to be found inside real_xs.

If a value of zero_threshold different than 0 is given, then every bin with a y value y < zero_threshold will be considered as 0.0.

Examples

Given the following real_x bins and the digitized x_bins and y_bins:

julia> real_bins = [0.5, 1.5, 2.5, 3.5]
 4-element Vector{Float64}:
  0.5
  1.5
@@ -24,4 +24,4 @@
  34.7
   0.0
   0.0
-  0.0

Notes

A warning is given if the absolute tolerance is very small. This means that the function is filling with more zeros than needed and some ys values are not taken into account. This warning has nothing to do whether we set a high zero_threshold value or not.

source
+ 0.0

Notes

A warning is given if the absolute tolerance is very small. This means that the function is filling with more zeros than needed and some ys values are not taken into account. This warning has nothing to do whether we set a high zero_threshold value or not.

source