GrainSizeTools script Icon

GrainSizeTools script

A Python script for estimating the grain size from thin sections

Add a Review
0 Downloads (This Week)
Last Update:
Browse All Files
Windows Mac Linux



Homepage & documentation:

GrainSizeTools script is a free open-source cross-platform script written in Python that provides several tools to visualize and characterize the grain size in polycrystalline materials from thin sections. The script is suitable to use for paleopiezometry (paleowattmetry) studies and to derive the actual 3D grain size distribution using the Saltykov and the two-step methods. The script requires measuring the grain sectional areas from a thin section and does not require a previous experience with Python programming language. For users with coding skills, the script is organized in a modular way using Python functions, which facilitates to modify, reuse or extend the code if needed.

GrainSizeTools script Web Site


Earth Sciences


Apache License V2.0


  • Load and extract data from txt and csv files generated by the ImageJ or any other application.
  • Calculate the apparent diameters of the grain profiles via the equivalent circular diameter and correct, if required, the diameters by adding the perimeter of the grains.
  • Estimate different apparent 1D grain size measures including the mean, median, area-weighted mean and frequency peak, the latter using the Gaussian Kernel Density Estimate method (scales can be linear, log, or square root).
  • It implements several algorithms to estimate the optimal bin size of histograms and the optimal bandwidth of the Gaussian KDE based on the population features.
  • Derive the actual 3D grain size distribution from thin sections (2D data) using the Saltykov method, including to get an estimation of the volume of a particular grain size fraction.
  • Estimate the shape of the 3D grain size distribution using the two-step method and a single parameter (the MSD).
  • It produces different ready-to-publish plots, allowing to save the graphical output as a bitmap or vector images (see the image above for examples).


Other Useful Business Software

The Leading Provider of Business VoIP Phone Systems Icon

Award-Winning Business VoIP Phone System

The Leading Provider of Business VoIP Phone Systems Icon
1 of 5 2 of 5 3 of 5 4 of 5 5 of 5
61 Reviews
  • Unlimited Calling, Faxing, Video Conferencing
  • 24/7 U.S. Based Customer Support
  • Super Reliable, Simple to Use
Write a Review

User Reviews

Be the first to post a review of GrainSizeTools script!

Additional Project Details

Intended Audience


Programming Language




Thanks for helping keep SourceForge clean.

Screenshot instructions:
Red Hat Linux   Ubuntu

Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Briefly describe the problem (required):

Upload screenshot of ad (required):
Select a file, or drag & drop file here.

Please provide the ad click URL, if possible:

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks