Mineral basics

import MagmaPandas as mp

Read some olivine data from a csv file

olivine_file = "./data/olivines.csv"

olivine = mp.read_olivine(olivine_file, index_col=["name"])
olivine.head()
SiO2 FeO MgO NiO MnO Al2O3 CaO total
name
PI032-01-04 38.495300 16.0033 44.428299 0.168422 0.232958 0.040249 0.250944 99.619470
PI032-02-01 37.876900 15.9098 44.320702 0.178717 0.225693 0.018274 0.243341 98.773420
PI032-02-03 38.040001 15.8851 44.249001 0.181972 0.232036 0.012135 0.251493 98.851740
PI032-03-01 38.278000 15.6225 44.429501 0.167173 0.220208 0.018356 0.252743 98.988490
PI032-04-01 38.204800 15.9814 44.194000 0.172665 0.234256 0.005229 0.240552 99.032906

On top of the regular MagmaFrame methods, mineral MagmaFrames have additional methods for calculating

  • mineral formulas and

  • chemical components of minerals (anorthite, forsterite etc.)

In this example we’re using olivine, but MagmaPandas also supports plagioclase and clinopyroxene

Mineral formulas and olivine forsterite contents are calculated by accessing their attributes

olivine.formula
Si Fe Mg Ni Mn Al Ca O
name
PI032-01-04 0.979029 0.340381 1.684450 0.003446 0.005018 0.001206 0.006838 4
PI032-02-01 0.972703 0.341695 1.696771 0.003692 0.004909 0.000553 0.006696 4
PI032-02-03 0.975611 0.340717 1.691805 0.003754 0.005041 0.000367 0.006911 4
PI032-03-01 0.978478 0.333980 1.693106 0.003438 0.004768 0.000553 0.006922 4
PI032-04-01 0.977965 0.342128 1.686473 0.003555 0.005079 0.000158 0.006598 4
PI032-04-02 0.991057 0.341036 1.662083 0.003880 0.004771 -0.000221 0.006448 4
PI032-04-03 0.993491 0.344590 1.653409 0.003440 0.004778 0.000013 0.006782 4
PI032-05-01 1.012957 0.392180 1.564839 0.003003 0.005612 0.001416 0.006328 4
PI041-02-01 0.973371 0.448601 1.588740 0.002227 0.006305 0.000731 0.006286 4
PI041-02-02 0.970036 0.453097 1.591409 0.002193 0.006474 0.000508 0.005994 4
olivine.forsterite
name
PI032-01-04    0.831896
PI032-02-01    0.832376
PI032-02-03    0.832367
PI032-03-01    0.835241
PI032-04-01    0.831348
PI032-04-02    0.829748
PI032-04-03    0.827532
PI032-05-01    0.799603
PI041-02-01    0.779810
PI041-02-02    0.778383
Name: Fo#, dtype: float64