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.

GeoTaxa

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

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page