-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds the case studies as is from the "capsule 20230218" email correspondence with some cleanup and additional tooling.
- Loading branch information
Showing
62 changed files
with
9,913 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Tests | ||
|
||
on: | ||
# For now commented out since private repositories only have a limited amount of CI time | ||
# push: | ||
# pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: Run pre-commit | ||
uses: pre-commit/action@v3.0.0 | ||
|
||
test: | ||
name: Run ${{ matrix.case_study }} | ||
runs-on: ubuntu-latest | ||
needs: [pre-commit] | ||
strategy: | ||
matrix: | ||
case_study: [4TT, dPSI, rc] | ||
|
||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v3 | ||
- name: Set up Python "3.10" | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip wheel | ||
python -m pip install -r requirements.txt | ||
- name: Show installed packages | ||
run: python -m pip freeze | ||
- name: Run tests | ||
run: | | ||
python -m pytest ${{ matrix.case_study }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
ci: | ||
skip: [interrogate] | ||
|
||
default_language_version: | ||
python: python3.10 | ||
|
||
repos: | ||
# Formatters | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: check-ast | ||
- id: check-builtin-literals | ||
- id: check-merge-conflict | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: debug-statements | ||
- id: fix-encoding-pragma | ||
args: [--remove] | ||
|
||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v3.0.0-alpha.4 # Use the sha or tag you want to point at | ||
hooks: | ||
- id: prettier | ||
|
||
# Notebook tools | ||
- repo: https://github.com/kynan/nbstripout | ||
rev: 0.6.1 | ||
hooks: | ||
- id: nbstripout | ||
args: | ||
- "--drop-empty-cells" | ||
- "--extra-keys" | ||
- "metadata.vscode metadata.language_info.version" | ||
|
||
- repo: https://github.com/nbQA-dev/nbQA | ||
rev: 1.6.1 | ||
hooks: | ||
- id: nbqa-black | ||
additional_dependencies: [black==23.1.0] | ||
args: [--nbqa-mutate] | ||
- id: nbqa-pyupgrade | ||
additional_dependencies: [pyupgrade==3.3.1] | ||
args: [--nbqa-mutate, --py310-plus] | ||
- id: nbqa-flake8 | ||
- id: nbqa-check-ast | ||
- id: nbqa-isort | ||
additional_dependencies: [isort==5.12.0] | ||
args: [--nbqa-mutate] | ||
|
||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.2 | ||
hooks: | ||
- id: codespell | ||
types: [file] | ||
types_or: [python, pyi, markdown, rst, jupyter] | ||
args: [-L doas] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# type: doas | ||
|
||
initial_concentration: | ||
j1: | ||
compartments: [S2, S1, T1, S2rel, T1hot] | ||
parameters: [j.1, j.0, j.0, j.0, j.0] | ||
|
||
k_matrix: | ||
k1: | ||
matrix: | ||
"(S2rel, S2)": kinetic.to_S2rel_from_S2 | ||
"(S1, S2)": kinetic.to_S1_from_S2 | ||
"(S1, S2rel)": kinetic.to_S1_from_S2rel | ||
"(T1hot, S2rel)": kinetic.to_T1hot_from_S2rel | ||
"(T1hot, S1)": kinetic.to_T1hot_from_S1 | ||
"(T1, T1hot)": kinetic.to_T1_from_T1hot | ||
"(T1, T1)": kinetic.from_T1 | ||
|
||
megacomplex: | ||
doas: | ||
type: damped-oscillation | ||
labels: [osc1, osc2, osc3, osc4] | ||
frequencies: [osc.freq.1, osc.freq.2, osc.freq.3, osc.freq.4] | ||
rates: [osc.rates.1, osc.rates.2, osc.rates.3, osc.rates.4] | ||
decay: | ||
type: decay | ||
k_matrix: [k1] | ||
# baseline: | ||
# type: baseline | ||
# dimension: time | ||
artifact: | ||
type: coherent-artifact | ||
order: 3 | ||
width: artifact.CAwidth | ||
|
||
irf: | ||
irf1: | ||
type: spectral-gaussian | ||
center: irf.center | ||
width: irf.width | ||
dispersion_center: irf.dispcenter | ||
center_dispersion_coefficients: [irf.disp1, irf.disp2, irf.disp3] | ||
model_dispersion_with_wavenumber: true | ||
|
||
dataset: | ||
dataset1: | ||
initial_concentration: j1 | ||
megacomplex: [doas, decay, artifact] | ||
irf: irf1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# type: doas | ||
|
||
initial_concentration: | ||
j1: | ||
compartments: [S2, S1, T1, S2rel, T1hot] | ||
parameters: [j.1, j.0, j.0, j.0, j.0] | ||
|
||
k_matrix: | ||
k1: | ||
matrix: | ||
"(S2rel, S2)": kinetic.to_S2rel_from_S2 | ||
"(S1, S2)": kinetic.to_S1_from_S2 | ||
"(S1, S2rel)": kinetic.to_S1_from_S2rel | ||
"(T1hot, S2rel)": kinetic.to_T1hot_from_S2rel | ||
"(T1hot, S1)": kinetic.to_T1hot_from_S1 | ||
"(T1, T1hot)": kinetic.to_T1_from_T1hot | ||
"(T1, T1)": kinetic.from_T1 | ||
|
||
megacomplex: | ||
doas: | ||
type: damped-oscillation | ||
labels: [osc1, osc2, osc3, osc4, osc5, osc6] | ||
frequencies: | ||
[osc.freq.1, osc.freq.2, osc.freq.3, osc.freq.4, osc.freq.5, osc.freq.6] | ||
rates: | ||
[ | ||
osc.rates.1, | ||
osc.rates.2, | ||
osc.rates.3, | ||
osc.rates.4, | ||
osc.rates.5, | ||
osc.rates.6, | ||
] | ||
decay: | ||
type: decay | ||
k_matrix: [k1] | ||
# baseline: | ||
# type: baseline | ||
# dimension: time | ||
artifact: | ||
type: coherent-artifact | ||
order: 3 | ||
width: artifact.CAwidth | ||
|
||
irf: | ||
irf1: | ||
type: spectral-gaussian | ||
center: irf.center | ||
width: irf.width | ||
dispersion_center: irf.dispcenter | ||
center_dispersion_coefficients: [irf.disp1, irf.disp2, irf.disp3] | ||
model_dispersion_with_wavenumber: true | ||
|
||
dataset: | ||
4TT: | ||
initial_concentration: j1 | ||
megacomplex: [doas, decay, artifact] | ||
irf: irf1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# type: doas | ||
|
||
initial_concentration: | ||
j1: | ||
# compartments: [S2, S1, T1, S2rel, T1hot] | ||
# parameters: [j.1, j.0, j.0, j.0, j.0] | ||
compartments: [S2, S1, T1, T1hot] | ||
parameters: [j.1, j.0, j.0, j.0] | ||
|
||
k_matrix: | ||
k1: | ||
matrix: | ||
# "(S2rel, S2)": kinetic.to_S2rel_from_S2 | ||
"(S1, S2)": kinetic.to_S1_from_S2 | ||
# "(S1, S2rel)": kinetic.to_S1_from_S2rel | ||
# "(T1hot, S2rel)": kinetic.to_T1hot_from_S2rel | ||
"(T1hot, S1)": kinetic.to_T1hot_from_S1 | ||
"(T1, T1hot)": kinetic.to_T1_from_T1hot | ||
"(T1, T1)": kinetic.from_T1 | ||
|
||
megacomplex: | ||
doas: | ||
type: damped-oscillation | ||
labels: [osc1, osc2, osc3, osc4] | ||
frequencies: [osc.freq.1, osc.freq.2, osc.freq.3, osc.freq.4] | ||
rates: [osc.rates.1, osc.rates.2, osc.rates.3, osc.rates.4] | ||
decay: | ||
type: decay | ||
k_matrix: [k1] | ||
# baseline: | ||
# type: baseline | ||
# dimension: time | ||
artifact: | ||
type: coherent-artifact | ||
order: 3 | ||
width: artifact.CAwidth | ||
|
||
irf: | ||
irf1: | ||
type: spectral-gaussian | ||
center: irf.center | ||
width: irf.width | ||
dispersion_center: irf.dispcenter | ||
center_dispersion_coefficients: [irf.disp1, irf.disp2, irf.disp3] | ||
model_dispersion_with_wavenumber: true | ||
|
||
dataset: | ||
# dataset1: | ||
4TT: | ||
initial_concentration: j1 | ||
megacomplex: [doas, decay, artifact] | ||
irf: irf1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# type: doas | ||
|
||
initial_concentration: | ||
j1: | ||
# compartments: [S2, S1, T1, S2rel, T1hot] | ||
# parameters: [j.1, j.0, j.0, j.0, j.0] | ||
compartments: [S2, S1, T1, T1hot] | ||
parameters: [j.1, j.0, j.0, j.0] | ||
|
||
k_matrix: | ||
k1: | ||
matrix: | ||
# "(S2rel, S2)": kinetic.to_S2rel_from_S2 | ||
"(S1, S2)": kinetic.to_S1_from_S2 | ||
# "(S1, S2rel)": kinetic.to_S1_from_S2rel | ||
# "(T1hot, S2rel)": kinetic.to_T1hot_from_S2rel | ||
"(T1hot, S1)": kinetic.to_T1hot_from_S1 | ||
"(T1, T1hot)": kinetic.to_T1_from_T1hot | ||
"(T1, T1)": kinetic.from_T1 | ||
|
||
megacomplex: | ||
doas: | ||
type: damped-oscillation | ||
labels: [osc1, osc2, osc3, osc4, osc5] | ||
frequencies: [osc.freq.1, osc.freq.2, osc.freq.3, osc.freq.4, osc.freq.5] | ||
rates: [osc.rates.1, osc.rates.2, osc.rates.3, osc.rates.4, osc.rates.5] | ||
decay: | ||
type: decay | ||
k_matrix: [k1] | ||
# baseline: | ||
# type: baseline | ||
# dimension: time | ||
artifact: | ||
type: coherent-artifact | ||
order: 3 | ||
width: artifact.CAwidth | ||
|
||
irf: | ||
irf1: | ||
type: spectral-gaussian | ||
center: irf.center | ||
width: irf.width | ||
dispersion_center: irf.dispcenter | ||
center_dispersion_coefficients: [irf.disp1, irf.disp2, irf.disp3] | ||
model_dispersion_with_wavenumber: true | ||
|
||
dataset: | ||
dataset1: | ||
initial_concentration: j1 | ||
megacomplex: [doas, decay, artifact] | ||
irf: irf1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# type: doas | ||
|
||
initial_concentration: | ||
j1: | ||
# compartments: [S2, S1, T1, S2rel, T1hot] | ||
# parameters: [j.1, j.0, j.0, j.0, j.0] | ||
compartments: [S2, S1, T1, T1hot] | ||
parameters: [j.1, j.0, j.0, j.0] | ||
|
||
k_matrix: | ||
k1: | ||
matrix: | ||
# "(S2rel, S2)": kinetic.to_S2rel_from_S2 | ||
"(S1, S2)": kinetic.to_S1_from_S2 | ||
# "(S1, S2rel)": kinetic.to_S1_from_S2rel | ||
# "(T1hot, S2rel)": kinetic.to_T1hot_from_S2rel | ||
"(T1hot, S1)": kinetic.to_T1hot_from_S1 | ||
"(T1, T1hot)": kinetic.to_T1_from_T1hot | ||
"(T1, T1)": kinetic.from_T1 | ||
|
||
megacomplex: | ||
doas: | ||
type: damped-oscillation | ||
labels: [osc1, osc2, osc3, osc4, osc5, osc6] | ||
frequencies: | ||
[osc.freq.1, osc.freq.2, osc.freq.3, osc.freq.4, osc.freq.5, osc.freq.6] | ||
rates: | ||
[ | ||
osc.rates.1, | ||
osc.rates.2, | ||
osc.rates.3, | ||
osc.rates.4, | ||
osc.rates.5, | ||
osc.rates.6, | ||
] | ||
decay: | ||
type: decay | ||
k_matrix: [k1] | ||
# baseline: | ||
# type: baseline | ||
# dimension: time | ||
artifact: | ||
type: coherent-artifact | ||
order: 3 | ||
width: artifact.CAwidth | ||
|
||
irf: | ||
irf1: | ||
type: spectral-gaussian | ||
center: irf.center | ||
width: irf.width | ||
dispersion_center: irf.dispcenter | ||
center_dispersion_coefficients: [irf.disp1, irf.disp2, irf.disp3] | ||
model_dispersion_with_wavenumber: true | ||
|
||
dataset: | ||
# dataset1: | ||
4TT: | ||
initial_concentration: j1 | ||
megacomplex: [doas, decay, artifact] | ||
irf: irf1 |
Oops, something went wrong.