Path: blob/main/latex-templates/templates/geochemistry/isotope_geochemistry.tex
51 views
unlisted
\documentclass[11pt,a4paper]{article}1\usepackage[utf8]{inputenc}2\usepackage[T1]{fontenc}3\usepackage{amsmath,amssymb}4\usepackage{graphicx}5\usepackage{booktabs}6\usepackage{siunitx}7\usepackage{geometry}8\geometry{margin=1in}9\usepackage{pythontex}10\usepackage{hyperref}11\usepackage{float}1213\title{Isotope Geochemistry\\Fractionation}14\author{Geochemistry Research Group}15\date{\today}1617\begin{document}18\maketitle1920\begin{abstract}21Isotope systems for geological dating.22\end{abstract}2324\section{Introduction}2526This report presents computational analysis of isotope geochemistry.2728\begin{pycode}2930import numpy as np31import matplotlib.pyplot as plt32from scipy import stats, optimize, integrate33plt.rcParams['text.usetex'] = True34plt.rcParams['font.family'] = 'serif'3536\end{pycode}3738\section{Mathematical Framework}3940\begin{pycode}41# Generate sample data42x = np.linspace(0, 10, 100)43y = np.sin(x) * np.exp(-0.1*x)4445fig, ax = plt.subplots(figsize=(10, 6))46ax.plot(x, y, 'b-', linewidth=2)47ax.set_xlabel('x')48ax.set_ylabel('y')49ax.set_title('Primary Analysis')50ax.grid(True, alpha=0.3)51plt.tight_layout()52plt.savefig('isotope_geochemistry_plot1.pdf', dpi=150, bbox_inches='tight')53plt.close()54\end{pycode}5556\begin{figure}[H]57\centering58\includegraphics[width=0.85\textwidth]{isotope_geochemistry_plot1.pdf}59\caption{Primary analysis results.}60\end{figure}6162\section{Secondary Analysis}6364\begin{pycode}65# Secondary visualization66y2 = np.cos(x) * np.exp(-0.2*x)67y3 = x * np.exp(-0.3*x)6869fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(12, 5))70ax1.plot(x, y2, 'r-', linewidth=2)71ax1.set_xlabel('x')72ax1.set_ylabel('y')73ax1.set_title('Analysis A')74ax1.grid(True, alpha=0.3)7576ax2.plot(x, y3, 'g-', linewidth=2)77ax2.set_xlabel('x')78ax2.set_ylabel('y')79ax2.set_title('Analysis B')80ax2.grid(True, alpha=0.3)81plt.tight_layout()82plt.savefig('isotope_geochemistry_plot2.pdf', dpi=150, bbox_inches='tight')83plt.close()84\end{pycode}8586\begin{figure}[H]87\centering88\includegraphics[width=0.95\textwidth]{isotope_geochemistry_plot2.pdf}89\caption{Secondary analysis comparison.}90\end{figure}9192\section{Parameter Study}9394\begin{pycode}95# Parameter variation96params = [0.1, 0.3, 0.5, 0.7]9798fig, ax = plt.subplots(figsize=(10, 6))99for p in params:100y_p = np.exp(-p * x) * np.sin(x)101ax.plot(x, y_p, linewidth=1.5, label=f'$\\alpha$ = {p}')102ax.set_xlabel('x')103ax.set_ylabel('y')104ax.set_title('Parameter Sensitivity')105ax.legend()106ax.grid(True, alpha=0.3)107plt.tight_layout()108plt.savefig('isotope_geochemistry_plot3.pdf', dpi=150, bbox_inches='tight')109plt.close()110\end{pycode}111112\begin{figure}[H]113\centering114\includegraphics[width=0.85\textwidth]{isotope_geochemistry_plot3.pdf}115\caption{Parameter sensitivity analysis.}116\end{figure}117118\section{2D Visualization}119120\begin{pycode}121# 2D contour plot122X, Y = np.meshgrid(np.linspace(-5, 5, 100), np.linspace(-5, 5, 100))123Z = np.sin(np.sqrt(X**2 + Y**2))124125fig, ax = plt.subplots(figsize=(10, 8))126cs = ax.contourf(X, Y, Z, levels=20, cmap='viridis')127plt.colorbar(cs)128ax.set_xlabel('x')129ax.set_ylabel('y')130ax.set_title('2D Field')131plt.tight_layout()132plt.savefig('isotope_geochemistry_plot4.pdf', dpi=150, bbox_inches='tight')133plt.close()134\end{pycode}135136\begin{figure}[H]137\centering138\includegraphics[width=0.85\textwidth]{isotope_geochemistry_plot4.pdf}139\caption{Two-dimensional field visualization.}140\end{figure}141142\section{Distribution Analysis}143144\begin{pycode}145# Statistical distribution146np.random.seed(42)147data = np.random.normal(5, 1.5, 1000)148149fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(12, 5))150ax1.hist(data, bins=30, density=True, alpha=0.7, color='steelblue')151x_dist = np.linspace(0, 10, 100)152ax1.plot(x_dist, stats.norm.pdf(x_dist, 5, 1.5), 'r-', linewidth=2)153ax1.set_xlabel('Value')154ax1.set_ylabel('Density')155ax1.set_title('Distribution')156157ax2.boxplot([data, np.random.normal(4, 2, 1000)])158ax2.set_xticklabels(['Dataset 1', 'Dataset 2'])159ax2.set_ylabel('Value')160ax2.set_title('Box Plot')161plt.tight_layout()162plt.savefig('isotope_geochemistry_plot5.pdf', dpi=150, bbox_inches='tight')163plt.close()164\end{pycode}165166\begin{figure}[H]167\centering168\includegraphics[width=0.95\textwidth]{isotope_geochemistry_plot5.pdf}169\caption{Statistical distribution analysis.}170\end{figure}171172\section{Time Series}173174\begin{pycode}175t = np.linspace(0, 100, 1000)176signal = np.sin(0.5*t) + 0.5*np.sin(2*t) + 0.3*np.random.randn(len(t))177178fig, ax = plt.subplots(figsize=(12, 5))179ax.plot(t, signal, 'b-', linewidth=0.5, alpha=0.7)180ax.set_xlabel('Time')181ax.set_ylabel('Signal')182ax.set_title('Time Series Data')183ax.grid(True, alpha=0.3)184plt.tight_layout()185plt.savefig('isotope_geochemistry_plot6.pdf', dpi=150, bbox_inches='tight')186plt.close()187\end{pycode}188189\begin{figure}[H]190\centering191\includegraphics[width=0.95\textwidth]{isotope_geochemistry_plot6.pdf}192\caption{Time series visualization.}193\end{figure}194195\section{Results Summary}196197\begin{pycode}198results = [199['Parameter A', '3.14'],200['Parameter B', '2.71'],201['Parameter C', '1.41'],202]203204print(r'\\begin{table}[H]')205print(r'\\centering')206print(r'\\caption{Computed Results}')207print(r'\\begin{tabular}{@{}lc@{}}')208print(r'\\toprule')209print(r'Parameter & Value \\\\')210print(r'\\midrule')211for row in results:212print(f"{row[0]} & {row[1]} \\\\\\\\")213print(r'\\bottomrule')214print(r'\\end{tabular}')215print(r'\\end{table}')216\end{pycode}217218\section{Conclusions}219220This analysis demonstrates the computational approach to isotope geochemistry.221222\end{document}223224225