GrainSizeTools script Icon

GrainSizeTools script

A Python script for estimating the grain size from thin sections

Add a Review
4 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 characterize the grain size 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 only requires measuring the grain sectional areas from a thin section in advance 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


  • It allows loading and extracting data of interest from txt and csv files generated by the ImageJ or similar applications.
  • It allows calculating the apparent diameters of the grain profiles via the equivalent circular diameter. It also allows to correct the diameters by adding the perimeter of the grains.
  • It allows estimating different 1D grain size measures for paleopiezometry studies, including the mean, the median, the area-weighted mean and the frequency peak of the apparent grain sizes (also the log or square root apparent grain sizes).
  • 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.
  • It allows deriving the actual 3D grain size distribution from thin sections (2D data) using the Saltykov method. Similar to what the StripStar script does.
  • It returns the volume of a particular grain fraction defined by the user.
  • It allows to estimate a complete quantitative description of the 3D grain size distribution using a novel method named the two-step method.
  • 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)


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:

No, thanks