|
58 | 58 | # get the Shannon ionic radii for the elements in the 2+ site
|
59 | 59 | site2radii = [
|
60 | 60 | get_ionic_radii("Na", charge=1, coordination=8),
|
61 |
| - *[get_ionic_radii(el, charge=2, coordination=8) for el in ["Ca", "Eu", "Sr"]], |
| 61 | + *get_ionic_radii(["Ca", "Eu", "Sr"], charge=2, coordination=8), |
62 | 62 | ]
|
63 | 63 | # plot the relative paritioning curve for cations in the 2+ site
|
64 | 64 | site2Ds = D_Ca * np.array(
|
|
89 | 89 | #
|
90 | 90 | site3labels = REE(dropPm=True)
|
91 | 91 | # get the Shannon ionic radii for the elements in the 3+ site
|
92 |
| -site3radii = [get_ionic_radii(x, charge=3, coordination=8) for x in REE(dropPm=True)] |
| 92 | +site3radii = get_ionic_radii([x for x in REE(dropPm=True)], charge=3, coordination=8) |
93 | 93 | site3Ds = D_La * np.array(
|
94 | 94 | [strain_coefficient(rLa, rx, r0=r03, E=E_3, T=Tk) for rx in site3radii]
|
95 | 95 | )
|
|
103 | 103 | ax.annotate(
|
104 | 104 | l, xy=(r, d), xycoords="data", ha="right", va="bottom", fontsize=fontsize
|
105 | 105 | )
|
106 |
| -ax.set_yscale("log") |
107 |
| -ax.set_ylabel("$D_X$") |
108 |
| -ax.set_xlabel("Radii ($\AA$)") |
| 106 | +ax.set(ylabel="$D_X$", xlabel="Radii ($\AA$)", yscale="log") |
109 | 107 | fig
|
110 | 108 | ########################################################################################
|
111 | 109 | # As europium is commonly present as a mixture of both :math:`Eu^{2+}`
|
|
134 | 132 | ax.legend(bbox_to_anchor=(1.05, 1))
|
135 | 133 | fig
|
136 | 134 | ########################################################################################
|
| 135 | +# Fitting Lattice Strain Models |
| 136 | +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
137 | 137 | # Given the lattice strain model and a partitioning profile (for e.g. REE data),
|
138 | 138 | # we can also fit a model to a given curve; here we fit to our REE data above,
|
139 | 139 | # for which we have some known parameters to compare to:
|
|
158 | 158 | #
|
159 | 159 | from pyrolite.plot.spider import REE_v_radii
|
160 | 160 |
|
161 |
| -ax = REE_v_radii() |
162 |
| - |
| 161 | +ax = REE_v_radii(index="radii") |
| 162 | +ax.set(ylabel="$D_X$", xlabel="Radii ($\AA$)") |
163 | 163 | ax.plot(site3radii, site3Ds, label="True", color="k")
|
164 | 164 | ax.plot(
|
165 | 165 | site3radii,
|
|
169 | 169 | color="0.5",
|
170 | 170 | )
|
171 | 171 |
|
172 |
| -ax.plot(site3radii, fit_lattice_strain._opt(site3radii, _ri, _tk, _D, z=3), label="Fit") |
173 |
| - |
| 172 | +ax.plot( |
| 173 | + site3radii, |
| 174 | + _lattice_opt_function(site3radii, _ri, _tk, _D, z=3), |
| 175 | + label="Fit", |
| 176 | + color="r", |
| 177 | +) |
| 178 | +ax.legend() |
174 | 179 | ax.figure
|
175 | 180 | ########################################################################################
|
176 |
| -# .. [#ref_1] Blundy, J., Wood, B., 1994. Prediction of crystal–melt partition coefficients |
177 |
| -# from elastic moduli. Nature 372, 452. |
178 |
| -# doi: `10.1038/372452A0 <https://doi.org/10.1038/372452A0>`__ |
179 |
| -# |
180 |
| -# .. [#ref_2] Dohmen, R., Blundy, J., 2014. A predictive thermodynamic model for element partitioning |
181 |
| -# between plagioclase and melt as a function of pressure, temperature and composition. |
182 |
| -# American Journal of Science 314, 1319–1372. |
183 |
| -# doi: `10.2475/09.2014.04 <https://doi.org/10.2475/09.2014.04>`__ |
184 | 181 | #
|
185 | 182 | # .. seealso::
|
186 | 183 | #
|
|
191 | 188 | # Functions:
|
192 | 189 | # :func:`~pyrolite.mineral.lattice.strain_coefficient`,
|
193 | 190 | # :func:`~pyrolite.mineral.lattice.youngs_modulus_approximation`,
|
| 191 | +# :func:`~pyrolite.mineral.lattice.fit_lattice_strain` |
194 | 192 | # :func:`~pyrolite.geochem.get_ionic_radii`
|
| 193 | +# |
| 194 | +# References |
| 195 | +# ~~~~~~~~~~~ |
| 196 | +# .. [#ref_1] Blundy, J., Wood, B., 1994. Prediction of crystal–melt partition coefficients |
| 197 | +# from elastic moduli. Nature 372, 452. |
| 198 | +# doi: `10.1038/372452A0 <https://doi.org/10.1038/372452A0>`__ |
| 199 | +# |
| 200 | +# .. [#ref_2] Dohmen, R., Blundy, J., 2014. A predictive thermodynamic model for element partitioning |
| 201 | +# between plagioclase and melt as a function of pressure, temperature and composition. |
| 202 | +# American Journal of Science 314, 1319–1372. |
| 203 | +# doi: `10.2475/09.2014.04 <https://doi.org/10.2475/09.2014.04>`__ |
| 204 | +# |
| 205 | + |
0 commit comments