Ejemplo n.º 1
0
derived by Li and Ripley (2009) [#ref_1]_ which enables a better understanding
of relative saturation sulfur saturation state (for both sulfide and sulfate)
and the prediction of sulfur saturation in evolving melts.

Here we use this function to predict sulfur saturation in a fractionally
crystallizing MORB melt with a range of sulfur contents. First we'll import a set of
example data tables:
"""
from pyrolite_meltsutil.util.general import get_data_example
from pyrolite_meltsutil.tables.load import import_tables, import_batch_config

# sphinx_gallery_thumbnail_number = 3
hsh = "363f3d0a0b"  # the hash index of our experiment
batchdir = get_data_example(
    "batch")  # let's use the example batch data for this
system, phases = import_tables(batchdir / hsh,
                               kelvin=False)  # let's import the tables
name, cfg, env = import_batch_config(batchdir)[
    hsh]  # and also the configuration

########################################################################################
# From this we extract only the liquid composition:
#
liquid = phases.loc[phases.phase == "liquid", :]
########################################################################################
# Now we can calcuate the sulfur saturation at sulfide saturation for this magma.
# This table also includes the relevant temperature and pressure data, noting
# that the temperature here is in degrees Celsius (:code:`kelvin = False`) and the
# pressure is in bars (wheras this function requires kbar, hence the division by 1000):
#
from pyrolite.geochem.magma import SCSS
Ejemplo n.º 2
0
 def setUp(self):
     self.fracdir = get_data_example("batch/363f3d0a0b/")
     self.nofracdir = get_data_example("montecarlo/97ed8127d9")
     self.fracsystem, self.fracphases = import_tables(self.fracdir)
     self.nofracsystem, self.nofracphases = import_tables(self.nofracdir)
Ejemplo n.º 3
0
"""
Visualising Melts Results by Phases
====================================
"""
########################################################################################
# First we'll import a set of example data tables:
#
from pyrolite_meltsutil.util.general import get_data_example
from pyrolite_meltsutil.tables.load import import_tables, import_batch_config

# sphinx_gallery_thumbnail_number = 2
hsh = "363f3d0a0b"  # the hash index of our experiment
batchdir = get_data_example("batch")  # let's use the example batch data for this
system, phases = import_tables(batchdir / hsh)  # let's import the tables
name, cfg, env = import_batch_config(batchdir)[hsh]  # and also the configuration
########################################################################################
# Now we can dig into some tables and plot some data for different phases.
#
import pyrolite.plot
import matplotlib.pyplot as plt
from pyrolite.util.plot import proxy_line
from pyrolite_meltsutil.vis.style import phase_color, phaseID_linestyle, phaseID_marker

phasenames = ["olivine", "clinopyroxene", "feldspar", "liquid"]

fig, ax = plt.subplots(1)

proxies = {}  # proxies for creating a legend
for ix, phs in enumerate(phasenames):
    phase_data = phases.loc[phases.phase == phs, :]
    for (phaseID, phaseID_data) in phase_data.groupby("phaseID"):
 def test_default(self):
     src = self.fromdir
     out = import_tables(src)