Skip to content

Commit fb4dc5e

Browse files
authored
docs: linting
1 parent d8c42f8 commit fb4dc5e

11 files changed

Lines changed: 410 additions & 473 deletions

‎docs/docs/tutorials/basics/maths-arithmetic.ipynb‎

Lines changed: 50 additions & 50 deletions
Large diffs are not rendered by default.

‎docs/docs/tutorials/basics/maths-correlation.ipynb‎

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
"cells": [
33
{
44
"cell_type": "markdown",
5-
"id": "1dc159b6",
5+
"id": "0",
66
"metadata": {},
77
"source": [
88
"# Correlation"
99
]
1010
},
1111
{
1212
"cell_type": "markdown",
13-
"id": "a6df5560",
13+
"id": "1",
1414
"metadata": {},
1515
"source": [
1616
"Two measurements are **correlated** when their uncertainties are not independent: when one reading is too high (it deviates upwards from the true value), the other tends to be too high as well (positive correlation) or too low (negative correlation). This happens whenever the measurements share something, such as\n",
@@ -37,7 +37,7 @@
3737
{
3838
"cell_type": "code",
3939
"execution_count": null,
40-
"id": "0c4b7b8d",
40+
"id": "2",
4141
"metadata": {},
4242
"outputs": [],
4343
"source": [
@@ -49,7 +49,7 @@
4949
},
5050
{
5151
"cell_type": "markdown",
52-
"id": "db1ffee4",
52+
"id": "3",
5353
"metadata": {},
5454
"source": [
5555
"The function `show(label, number)` prints a number as `value ± uncertainty unit` and, for a `Parameter` with finite bounds, the bounds. The uncertainty is the attribute `error`; see the note in the arithmetic notebook."
@@ -58,7 +58,7 @@
5858
{
5959
"cell_type": "code",
6060
"execution_count": null,
61-
"id": "f8631932",
61+
"id": "4",
6262
"metadata": {},
6363
"outputs": [],
6464
"source": [
@@ -73,7 +73,7 @@
7373
{
7474
"cell_type": "code",
7575
"execution_count": null,
76-
"id": "0827ff4d",
76+
"id": "5",
7777
"metadata": {
7878
"tags": [
7979
"hide-in-docs"
@@ -139,7 +139,7 @@
139139
},
140140
{
141141
"cell_type": "markdown",
142-
"id": "01a1ec41",
142+
"id": "6",
143143
"metadata": {},
144144
"source": [
145145
"## A helper that knows about correlation\n",
@@ -153,7 +153,7 @@
153153
{
154154
"cell_type": "code",
155155
"execution_count": null,
156-
"id": "a4fd5e48",
156+
"id": "7",
157157
"metadata": {},
158158
"outputs": [],
159159
"source": [
@@ -187,7 +187,7 @@
187187
},
188188
{
189189
"cell_type": "markdown",
190-
"id": "7c315cdd",
190+
"id": "8",
191191
"metadata": {},
192192
"source": [
193193
"## The same ruler twice\n",
@@ -198,7 +198,7 @@
198198
{
199199
"cell_type": "code",
200200
"execution_count": null,
201-
"id": "1ff1f641",
201+
"id": "9",
202202
"metadata": {},
203203
"outputs": [],
204204
"source": [
@@ -215,7 +215,7 @@
215215
},
216216
{
217217
"cell_type": "markdown",
218-
"id": "7122d9f1",
218+
"id": "10",
219219
"metadata": {},
220220
"source": [
221221
"EasyScience's result agrees with $\\rho = 0$. If the deviations of the two readings always have the same sign ($\\rho = +1$) the uncertainties simply add, $\\pm(0.02 + 0.02) = \\pm 0.04$ m, which is larger than the $\\pm\\sqrt{0.02^2 + 0.02^2} = \\pm 0.028$ m of independent measurements. If the deviations always had opposite signs ($\\rho = -1$) they would cancel completely in the sum.\n",
@@ -227,7 +227,7 @@
227227
{
228228
"cell_type": "code",
229229
"execution_count": null,
230-
"id": "ea2a06e9",
230+
"id": "11",
231231
"metadata": {},
232232
"outputs": [],
233233
"source": [
@@ -241,7 +241,7 @@
241241
},
242242
{
243243
"cell_type": "markdown",
244-
"id": "9494785b",
244+
"id": "12",
245245
"metadata": {},
246246
"source": [
247247
"The chart shows the uncertainty of the sum and of the difference for every correlation from $-1$ to $+1$. EasyScience's result is the point at $\\rho = 0$."
@@ -250,7 +250,7 @@
250250
{
251251
"cell_type": "code",
252252
"execution_count": null,
253-
"id": "a53dfe35",
253+
"id": "13",
254254
"metadata": {},
255255
"outputs": [],
256256
"source": [
@@ -284,7 +284,7 @@
284284
},
285285
{
286286
"cell_type": "markdown",
287-
"id": "5723993e",
287+
"id": "14",
288288
"metadata": {},
289289
"source": [
290290
"### Exercise 1: Two sections, one ruler\n",
@@ -295,7 +295,7 @@
295295
{
296296
"cell_type": "code",
297297
"execution_count": null,
298-
"id": "1208a02a",
298+
"id": "15",
299299
"metadata": {},
300300
"outputs": [],
301301
"source": [
@@ -305,7 +305,7 @@
305305
},
306306
{
307307
"cell_type": "markdown",
308-
"id": "fa5e4b4f",
308+
"id": "16",
309309
"metadata": {},
310310
"source": [
311311
"<details class=\"question\">\n",
@@ -326,7 +326,7 @@
326326
{
327327
"cell_type": "code",
328328
"execution_count": null,
329-
"id": "6f42b5a0",
329+
"id": "17",
330330
"metadata": {
331331
"tags": [
332332
"hide-in-docs"
@@ -346,7 +346,7 @@
346346
},
347347
{
348348
"cell_type": "markdown",
349-
"id": "8d6de7d6",
349+
"id": "18",
350350
"metadata": {},
351351
"source": [
352352
"## Shared offsets cancel\n",
@@ -358,7 +358,7 @@
358358
},
359359
{
360360
"cell_type": "markdown",
361-
"id": "38695951",
361+
"id": "19",
362362
"metadata": {},
363363
"source": [
364364
"### Exercise 2: A height difference\n",
@@ -370,7 +370,7 @@
370370
{
371371
"cell_type": "code",
372372
"execution_count": null,
373-
"id": "6882d352",
373+
"id": "20",
374374
"metadata": {},
375375
"outputs": [],
376376
"source": [
@@ -380,7 +380,7 @@
380380
},
381381
{
382382
"cell_type": "markdown",
383-
"id": "dc332c20",
383+
"id": "21",
384384
"metadata": {},
385385
"source": [
386386
"<details class=\"question\">\n",
@@ -401,7 +401,7 @@
401401
{
402402
"cell_type": "code",
403403
"execution_count": null,
404-
"id": "1d9f682c",
404+
"id": "22",
405405
"metadata": {
406406
"tags": [
407407
"hide-in-docs"
@@ -421,7 +421,7 @@
421421
},
422422
{
423423
"cell_type": "markdown",
424-
"id": "6f287308",
424+
"id": "23",
425425
"metadata": {},
426426
"source": [
427427
"## Ratios of readings from one instrument\n",
@@ -433,7 +433,7 @@
433433
},
434434
{
435435
"cell_type": "markdown",
436-
"id": "46b6ceaf",
436+
"id": "24",
437437
"metadata": {},
438438
"source": [
439439
"### Exercise 3: An intensity ratio\n",
@@ -445,7 +445,7 @@
445445
{
446446
"cell_type": "code",
447447
"execution_count": null,
448-
"id": "1210af6c",
448+
"id": "25",
449449
"metadata": {},
450450
"outputs": [],
451451
"source": [
@@ -455,7 +455,7 @@
455455
},
456456
{
457457
"cell_type": "markdown",
458-
"id": "09040e22",
458+
"id": "26",
459459
"metadata": {},
460460
"source": [
461461
"<details class=\"question\">\n",
@@ -476,7 +476,7 @@
476476
{
477477
"cell_type": "code",
478478
"execution_count": null,
479-
"id": "75991d6c",
479+
"id": "27",
480480
"metadata": {
481481
"tags": [
482482
"hide-in-docs"
@@ -496,7 +496,7 @@
496496
},
497497
{
498498
"cell_type": "markdown",
499-
"id": "abd73a71",
499+
"id": "28",
500500
"metadata": {},
501501
"source": [
502502
"## Correlation from a fit\n",
@@ -510,7 +510,7 @@
510510
{
511511
"cell_type": "code",
512512
"execution_count": null,
513-
"id": "a9c5f7d3",
513+
"id": "29",
514514
"metadata": {},
515515
"outputs": [],
516516
"source": [
@@ -528,7 +528,7 @@
528528
},
529529
{
530530
"cell_type": "markdown",
531-
"id": "8bb13d80",
531+
"id": "30",
532532
"metadata": {},
533533
"source": [
534534
"The correlation is close to $-1$. Now predict $y$ at $x = 20$. A `Parameter` keeps only the variance of\n",
@@ -538,7 +538,7 @@
538538
{
539539
"cell_type": "code",
540540
"execution_count": null,
541-
"id": "953fcd87",
541+
"id": "31",
542542
"metadata": {},
543543
"outputs": [],
544544
"source": [
@@ -562,7 +562,7 @@
562562
},
563563
{
564564
"cell_type": "markdown",
565-
"id": "8372d237",
565+
"id": "32",
566566
"metadata": {},
567567
"source": [
568568
"Ignoring the correlation overestimates the uncertainty of the prediction by a factor of four. A steeper slope\n",
@@ -574,7 +574,7 @@
574574
{
575575
"cell_type": "code",
576576
"execution_count": null,
577-
"id": "8c13da71",
577+
"id": "33",
578578
"metadata": {},
579579
"outputs": [],
580580
"source": [
@@ -637,7 +637,7 @@
637637
},
638638
{
639639
"cell_type": "markdown",
640-
"id": "052a7906",
640+
"id": "34",
641641
"metadata": {},
642642
"source": [
643643
"### Exercise 4: Predicting from a fit\n",
@@ -649,7 +649,7 @@
649649
{
650650
"cell_type": "code",
651651
"execution_count": null,
652-
"id": "19fa310e",
652+
"id": "35",
653653
"metadata": {},
654654
"outputs": [],
655655
"source": [
@@ -659,7 +659,7 @@
659659
},
660660
{
661661
"cell_type": "markdown",
662-
"id": "28b8c4bb",
662+
"id": "36",
663663
"metadata": {},
664664
"source": [
665665
"<details class=\"question\">\n",
@@ -680,7 +680,7 @@
680680
{
681681
"cell_type": "code",
682682
"execution_count": null,
683-
"id": "f15ad6b4",
683+
"id": "37",
684684
"metadata": {
685685
"tags": [
686686
"hide-in-docs"
@@ -700,7 +700,7 @@
700700
},
701701
{
702702
"cell_type": "markdown",
703-
"id": "44ca7901",
703+
"id": "38",
704704
"metadata": {},
705705
"source": [
706706
"## Good to know\n",
@@ -719,7 +719,7 @@
719719
},
720720
{
721721
"cell_type": "markdown",
722-
"id": "b313b321",
722+
"id": "39",
723723
"metadata": {},
724724
"source": [
725725
"The first bullet in numbers, with the fit from above. A `Parameter` has no attribute that could hold a\n",
@@ -729,7 +729,7 @@
729729
{
730730
"cell_type": "code",
731731
"execution_count": null,
732-
"id": "dac4a2a3",
732+
"id": "40",
733733
"metadata": {},
734734
"outputs": [],
735735
"source": [

0 commit comments

Comments
 (0)