volume fractions similar to STRIPSTAR #17
-
Hi, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi, sorry it took me so long to reply. I had missed this. Saltykov's method does not return the fraction per class directly, however, you have the following options:
mid_points, frequencies = stereology.Saltykov(diameters, return_data=True)
# Calculate the volume for each bin
bin_eq_volume = stereology.diameter_to_volume(mid_points)
# Weight each bin by the volume
vol_weighted_classes = frequencies * bin_eq_volume
# calc volume fraction
vol_fractions = 100 * (vol_weighted_classes / np.sum(bin_eq_volume))
# check that vol_fractions sum 100
np.sum(vol_fractions) It should be noted that this is only an approximation. Once the Saltykov method is applied, it must be assumed that the particle size represented by the midpoint of the class is representative of the particle size population of the whole class, and this may not be strictly true. Edit: An alternative option that would not have the problem posed above would be to calculate the volume fractions for specific classes using the two-step method and the function calc_volume_fraction. e.g.: # get the volume fraction of a specific grain size
stereology.calc_volume_fraction(lognorm_params=(geomean, std),
total_size_range=(min_size, max_size),
interest_size_range=(40, 50)) you would need to define the ranges ( I hope this helps. Let me know if this works for your case. Cheers. |
Beta Was this translation helpful? Give feedback.
-
Dear Marco, |
Beta Was this translation helpful? Give feedback.
Hi, sorry it took me so long to reply. I had missed this. Saltykov's method does not return the fraction per class directly, however, you have the following options:
Saltykov(diameters, text_file='foo.csv')
. This will save a table in CSV format in which one of the columns is the accumulated volumes per class. If you subtract the cumulative of the smaller classes for each row, you will get what you are looking for.