Skip to main content

Tools for data management in Mineral Sciences at NMNH

Project description

A collection of tools written in Python 2.x for Mineral Sciences at NMNH. You can install the MinSci Toolkit from the command line using pip:

pip install minsci

Note: The mosaic module has been moved to a separate repository, Stitch2D.


The GeoTaxa module contains a hierarchical taxonomy for geologic materials, including rocks, minerals, and meteorites. The hierarchy is based on schemes and species definitions published by the IUGS, the British Geological Survey, RRUFF, and Mindat. It is very much a work in progress.

To use, first create an instance of the GeoTaxa class:

from minsci import geotaxa
gt = geotaxa.GeoTaxa()

To get info about a rock, mineral, or meteorite, simply call the class itself:

print gt('basalt')

If no match for a given taxon is found, the script will try to place the new taxon in the existing hierarchy.

To find the preferred synonym for a deprecated species, use preferred_synonym:

print gt.preferred_synonym('argentite')

To get the name of an object, use item_name. This function accepts as a taxa list, setting, and/or name as parameters. For example:

print gt.item_name(['corundum, ruby, sapphire'])
print gt.item_name(name='Hope Diamond')
print gt.item_name('diamond', 'ring')

Project details

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page