Skip to content
Snippets Groups Projects
Commit f8fdb77d40f7 authored by Pierre Augier's avatar Pierre Augier
Browse files

Build 2022strat_turb_polo with PDM

parent e7113ba129c0
No related branches found
No related tags found
No related merge requests found
Showing
with 797 additions and 12 deletions
......@@ -4,7 +4,7 @@
cd input && latexmk -f -shell-escape -pdf $(NAME).tex && rsync $(NAME).pdf ../$(NAME).pdf
figures:
python py/make_figures.py SAVE
pdm run python py/make_figures.py SAVE
clean:
rm -f tmp/*.tex
......@@ -19,6 +19,6 @@
cleanall: clean cleantmp cleanpdf
format:
cd input && formattex *.tex -i -v
cd input && pdm run formattex *.tex -i -v
black:
......@@ -23,3 +23,11 @@
black:
black -l 82 py
pdm run black -l 82 py
install-deps: sync
sync:
pdm sync --clean
lock:
pdm lock
......@@ -14,6 +14,8 @@
export STRAT_TURB_TORO2022=/data/MyCore/2022strat-turb-toro
```
1. Install a virtual env with `pdm sync --clean` and activate it.
1. The command `make` should produce all Latex tables, figures and finally the
main pdf file `article.pdf`.
......
This diff is collapsed.
import sys
from pathlib import Path
from runpy import run_path
from pprint import pprint
......@@ -35,7 +34,7 @@
source = f"save_table_{name}.py"
if has_to_be_made(f"table_{name}.tex", source):
print(f"Running {source} to produce {name}")
run_path(here / source)
run_path(str(here / source))
make_table("methods_1couple")
......
......@@ -3,7 +3,14 @@
plt.rcParams["text.usetex"] = True
from util import save_fig, plot, params_simuls_regimes, Fh_limit, R2_limit, add_letters
from util import (
save_fig,
plot,
params_simuls_regimes,
Fh_limit,
R2_limit,
add_letters,
)
from util_dataframe import df
......
......@@ -6,7 +6,13 @@
import numpy as np
from util import save_fig, couples320, get_path_finer_resol, customize, add_letters
from util import (
save_fig,
couples320,
get_path_finer_resol,
customize,
add_letters,
)
cm = matplotlib.cm.get_cmap("inferno", 100)
......
......@@ -8,7 +8,13 @@
import numpy as np
from util import save_fig, couples320, get_path_finer_resol, customize, add_letters
from util import (
save_fig,
couples320,
get_path_finer_resol,
customize,
add_letters,
)
cm = matplotlib.cm.get_cmap("inferno", 100)
......
......@@ -5,6 +5,7 @@
3. omega_emp
4. nonlinear_broadening
"""
import matplotlib.pyplot as plt
import matplotlib.cm
import numpy as np
......
......@@ -5,6 +5,7 @@
3. omega_emp
4. nonlinear_broadening
"""
import matplotlib.pyplot as plt
import matplotlib.cm
import numpy as np
......
......@@ -91,9 +91,7 @@
omega_fmax = N * np.sin(angle + 0.5 * delta_angle)
omegas_f = N * np.logspace(-3, 3, 1000)
where = (omegas_f > omega_fmin) & (omegas_f < omega_fmax)
ax.fill_between(
omegas_f / N, ymin, ymax, where=where, alpha=0.5, color="gray"
)
ax.fill_between(omegas_f / N, ymin, ymax, where=where, alpha=0.5, color="gray")
omega_tmp = 0.5 * (omega_fmin + omega_fmax) / N
ax.text(
......
......@@ -241,6 +241,7 @@
Fh_limit = 0.13
R2_limit = 10.0
def add_letters(fig, letters, xs=None):
if xs is None:
if len(letters) == 1:
......@@ -252,6 +253,7 @@
for letter, x in zip(letters, xs):
fig.text(x, 0.95, f"({letter})")
def pos_closest_value(input_list, input_value):
arr = np.asarray(input_list)
i = (np.abs(arr - input_value)).argmin()
......
[project]
name = "2022strat_turb_polo"
version = "0.1.0"
description = "Article 2022strat_turb_polo"
authors = [
{name = "pierre.augier", email = "pierre.augier@univ-grenoble-alpes.fr"},
]
dependencies = [
"formattex",
"black",
"fluidsim>=0.8.4",
"fluidfft>=0.4.3",
"pyfftw>=0.15.0",
"jinja2>=3.1.4",
]
requires-python = "==3.11.*"
readme = "README.md"
license = {text = "MIT"}
[tool.pdm]
distribution = false
formattex
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment