Skip to content

Commit 76e711e

Browse files
committed
cd: Add tags to ignore cell output for testing
1 parent ab7d9df commit 76e711e

1 file changed

Lines changed: 43 additions & 11 deletions

File tree

examples/seismic/tutorials/07.1_dispersion_relation.ipynb

Lines changed: 43 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
"metadata": {},
3333
"outputs": [],
3434
"source": [
35-
"# We import everything we need for the noterbook at the start\n",
3635
"import numpy as np\n",
3736
"import scipy as sp\n",
3837
"import sympy as sym\n",
@@ -62,7 +61,6 @@
6261
"metadata": {},
6362
"outputs": [],
6463
"source": [
65-
"# Define a function that decsribes the Ricker wavelet\n",
6664
"def ricker(t, f=10, A=1):\n",
6765
" trm = (np.pi * f * (t - 1 / f)) ** 2\n",
6866
" return A * (1 - 2 * trm) * np.exp(-trm)"
@@ -559,7 +557,11 @@
559557
{
560558
"cell_type": "code",
561559
"execution_count": 10,
562-
"metadata": {},
560+
"metadata": {
561+
"tags": [
562+
"nbval-ignore-output"
563+
]
564+
},
563565
"outputs": [
564566
{
565567
"data": {
@@ -860,7 +862,11 @@
860862
{
861863
"cell_type": "code",
862864
"execution_count": 16,
863-
"metadata": {},
865+
"metadata": {
866+
"tags": [
867+
"nbval-ignore-output"
868+
]
869+
},
864870
"outputs": [
865871
{
866872
"name": "stdout",
@@ -880,8 +886,6 @@
880886
}
881887
],
882888
"source": [
883-
"# This cost function optimises the Coefficients for agreement in Fourier\n",
884-
"# space as per the work of Tam and Webb, Caunt\n",
885889
"def objective(a):\n",
886890
" x = np.linspace(0, np.pi/2, 201)\n",
887891
" m = np.arange(1, len(a) + 1)\n",
@@ -903,7 +907,11 @@
903907
{
904908
"cell_type": "code",
905909
"execution_count": 17,
906-
"metadata": {},
910+
"metadata": {
911+
"tags": [
912+
"nbval-ignore-output"
913+
]
914+
},
907915
"outputs": [
908916
{
909917
"data": {
@@ -1277,13 +1285,19 @@
12771285
"cell_type": "markdown",
12781286
"metadata": {},
12791287
"source": [
1280-
"We again use Sequential Least Squares Programming (SLSQP) to perform a constrained minimisation of this cost function, with the same constraints on $a_m$. Notice that we must pick a $h$ and $\\Delta t$ to optimise for."
1288+
"We again use Sequential Least Squares Programming (SLSQP) to perform a constrained minimisation of this cost function, with the same constraints on $a_m$. Notice that we must pick a $h$ and $\\Delta t$ to optimise for.\n",
1289+
"\n",
1290+
"Warning: Depending on your computer's hardware, this cell may take a long time to run!"
12811291
]
12821292
},
12831293
{
12841294
"cell_type": "code",
12851295
"execution_count": 27,
1286-
"metadata": {},
1296+
"metadata": {
1297+
"tags": [
1298+
"nbval-ignore-output"
1299+
]
1300+
},
12871301
"outputs": [
12881302
{
12891303
"name": "stdout",
@@ -1333,7 +1347,11 @@
13331347
{
13341348
"cell_type": "code",
13351349
"execution_count": 28,
1336-
"metadata": {},
1350+
"metadata": {
1351+
"tags": [
1352+
"nbval-ignore-output"
1353+
]
1354+
},
13371355
"outputs": [
13381356
{
13391357
"data": {
@@ -1583,8 +1601,22 @@
15831601
}
15841602
],
15851603
"metadata": {
1604+
"kernelspec": {
1605+
"display_name": "Python 3 (ipykernel)",
1606+
"language": "python",
1607+
"name": "python3"
1608+
},
15861609
"language_info": {
1587-
"name": "python"
1610+
"codemirror_mode": {
1611+
"name": "ipython",
1612+
"version": 3
1613+
},
1614+
"file_extension": ".py",
1615+
"mimetype": "text/x-python",
1616+
"name": "python",
1617+
"nbconvert_exporter": "python",
1618+
"pygments_lexer": "ipython3",
1619+
"version": "3.12.7"
15881620
}
15891621
},
15901622
"nbformat": 4,

0 commit comments

Comments
 (0)