Tools for data management in Mineral Sciences at NMNH
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:
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:
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')