{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "d0bde305",
"metadata": {},
"outputs": [],
"source": [
"import plotly.express as px\n",
"import pandas as pd\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"from scipy.stats import linregress\n",
"import scipy.optimize as opt\n",
"import scipy.special as spc\n",
"import scipy.constants as const\n",
"import sympy as sp\n",
"from sympy import symbols, Eq, solve, diff, lambdify"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "a576b169",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.microsoft.datawrangler.viewer.v0+json": {
"columns": [
{
"name": "index",
"rawType": "int64",
"type": "integer"
},
{
"name": "U",
"rawType": "int64",
"type": "integer"
},
{
"name": "N",
"rawType": "int64",
"type": "integer"
},
{
"name": "N_err",
"rawType": "float64",
"type": "float"
}
],
"ref": "ff929a3d-3efc-477c-962a-3776b41075b7",
"rows": [
[
"0",
"300",
"0",
"0.0"
],
[
"1",
"325",
"0",
"0.0"
],
[
"2",
"350",
"0",
"0.0"
],
[
"3",
"375",
"0",
"0.0"
],
[
"4",
"400",
"0",
"0.0"
],
[
"5",
"425",
"0",
"0.0"
],
[
"6",
"450",
"0",
"0.0"
],
[
"7",
"475",
"0",
"0.0"
],
[
"8",
"500",
"944",
"30.72458299147443"
],
[
"9",
"525",
"967",
"31.096623610932426"
],
[
"10",
"550",
"1002",
"31.654383582688826"
],
[
"11",
"575",
"1066",
"32.64965543462902"
],
[
"12",
"600",
"1027",
"32.046840717924134"
],
[
"13",
"625",
"993",
"31.51190251317746"
],
[
"14",
"650",
"1064",
"32.61901286060018"
],
[
"15",
"675",
"1031",
"32.109188716004645"
],
[
"16",
"700",
"1102",
"33.19638534539566"
],
[
"17",
"725",
"1074",
"32.77193921634788"
],
[
"18",
"750",
"1112",
"33.34666400106613"
],
[
"19",
"775",
"1099",
"33.15116890850155"
],
[
"20",
"800",
"1181",
"34.36568055487916"
],
[
"21",
"825",
"1185",
"34.42382895611701"
],
[
"22",
"850",
"1235",
"35.14256678161116"
],
[
"23",
"875",
"1293",
"35.958309192730404"
]
],
"shape": {
"columns": 3,
"rows": 24
}
},
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" U | \n",
" N | \n",
" N_err | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" 300 | \n",
" 0 | \n",
" 0.000000 | \n",
"
\n",
" \n",
" | 1 | \n",
" 325 | \n",
" 0 | \n",
" 0.000000 | \n",
"
\n",
" \n",
" | 2 | \n",
" 350 | \n",
" 0 | \n",
" 0.000000 | \n",
"
\n",
" \n",
" | 3 | \n",
" 375 | \n",
" 0 | \n",
" 0.000000 | \n",
"
\n",
" \n",
" | 4 | \n",
" 400 | \n",
" 0 | \n",
" 0.000000 | \n",
"
\n",
" \n",
" | 5 | \n",
" 425 | \n",
" 0 | \n",
" 0.000000 | \n",
"
\n",
" \n",
" | 6 | \n",
" 450 | \n",
" 0 | \n",
" 0.000000 | \n",
"
\n",
" \n",
" | 7 | \n",
" 475 | \n",
" 0 | \n",
" 0.000000 | \n",
"
\n",
" \n",
" | 8 | \n",
" 500 | \n",
" 944 | \n",
" 30.724583 | \n",
"
\n",
" \n",
" | 9 | \n",
" 525 | \n",
" 967 | \n",
" 31.096624 | \n",
"
\n",
" \n",
" | 10 | \n",
" 550 | \n",
" 1002 | \n",
" 31.654384 | \n",
"
\n",
" \n",
" | 11 | \n",
" 575 | \n",
" 1066 | \n",
" 32.649655 | \n",
"
\n",
" \n",
" | 12 | \n",
" 600 | \n",
" 1027 | \n",
" 32.046841 | \n",
"
\n",
" \n",
" | 13 | \n",
" 625 | \n",
" 993 | \n",
" 31.511903 | \n",
"
\n",
" \n",
" | 14 | \n",
" 650 | \n",
" 1064 | \n",
" 32.619013 | \n",
"
\n",
" \n",
" | 15 | \n",
" 675 | \n",
" 1031 | \n",
" 32.109189 | \n",
"
\n",
" \n",
" | 16 | \n",
" 700 | \n",
" 1102 | \n",
" 33.196385 | \n",
"
\n",
" \n",
" | 17 | \n",
" 725 | \n",
" 1074 | \n",
" 32.771939 | \n",
"
\n",
" \n",
" | 18 | \n",
" 750 | \n",
" 1112 | \n",
" 33.346664 | \n",
"
\n",
" \n",
" | 19 | \n",
" 775 | \n",
" 1099 | \n",
" 33.151169 | \n",
"
\n",
" \n",
" | 20 | \n",
" 800 | \n",
" 1181 | \n",
" 34.365681 | \n",
"
\n",
" \n",
" | 21 | \n",
" 825 | \n",
" 1185 | \n",
" 34.423829 | \n",
"
\n",
" \n",
" | 22 | \n",
" 850 | \n",
" 1235 | \n",
" 35.142567 | \n",
"
\n",
" \n",
" | 23 | \n",
" 875 | \n",
" 1293 | \n",
" 35.958309 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" U N N_err\n",
"0 300 0 0.000000\n",
"1 325 0 0.000000\n",
"2 350 0 0.000000\n",
"3 375 0 0.000000\n",
"4 400 0 0.000000\n",
"5 425 0 0.000000\n",
"6 450 0 0.000000\n",
"7 475 0 0.000000\n",
"8 500 944 30.724583\n",
"9 525 967 31.096624\n",
"10 550 1002 31.654384\n",
"11 575 1066 32.649655\n",
"12 600 1027 32.046841\n",
"13 625 993 31.511903\n",
"14 650 1064 32.619013\n",
"15 675 1031 32.109189\n",
"16 700 1102 33.196385\n",
"17 725 1074 32.771939\n",
"18 750 1112 33.346664\n",
"19 775 1099 33.151169\n",
"20 800 1181 34.365681\n",
"21 825 1185 34.423829\n",
"22 850 1235 35.142567\n",
"23 875 1293 35.958309"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"DP = pd.DataFrame(\n",
" {\n",
" 'U': [300, 325, 350, 375, 400, 425, 450, 475, 500, 525, 550, 575, 600, 625, 650, 675, 700, 725, 750, 775, 800, 825, 850, 875],\n",
" 'N': [0, 0, 0, 0, 0, 0, 0, 0, 944, 967, 1002, 1066, 1027, 993, 1064, 1031, 1102, 1074, 1112, 1099, 1181, 1185, 1235, 1293],\n",
" 'N_err': [np.nan]*24\n",
" }\n",
")\n",
"\n",
"DP['N_err'] = np.sqrt(DP['N'])\n",
"\n",
"DP"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "b9442ce4",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"plotlyServerURL": "https://plot.ly"
},
"data": [
{
"error_y": {
"array": [
0,
0,
0,
0,
0,
0,
0,
0,
30.72458299147443,
31.096623610932426,
31.654383582688826,
32.64965543462902,
32.046840717924134,
31.51190251317746,
32.61901286060018,
32.109188716004645,
33.19638534539566,
32.77193921634788,
33.34666400106613,
33.15116890850155,
34.36568055487916,
34.42382895611701,
35.14256678161116,
35.958309192730404
]
},
"hovertemplate": "Tension U (V)=%{x}
Taux de comptage N (cps)=%{y}",
"legendgroup": "",
"marker": {
"color": "#636efa",
"symbol": "circle"
},
"mode": "markers",
"name": "",
"orientation": "v",
"showlegend": false,
"type": "scatter",
"x": [
300,
325,
350,
375,
400,
425,
450,
475,
500,
525,
550,
575,
600,
625,
650,
675,
700,
725,
750,
775,
800,
825,
850,
875
],
"xaxis": "x",
"y": [
0,
0,
0,
0,
0,
0,
0,
0,
944,
967,
1002,
1066,
1027,
993,
1064,
1031,
1102,
1074,
1112,
1099,
1181,
1185,
1235,
1293
],
"yaxis": "y"
}
],
"layout": {
"legend": {
"tracegroupgap": 0
},
"template": {
"data": {
"bar": [
{
"error_x": {
"color": "#2a3f5f"
},
"error_y": {
"color": "#2a3f5f"
},
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
},
"pattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
}
},
"type": "bar"
}
],
"barpolar": [
{
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
},
"pattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
}
},
"type": "barpolar"
}
],
"carpet": [
{
"aaxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"baxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"type": "carpet"
}
],
"choropleth": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "choropleth"
}
],
"contour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "contour"
}
],
"contourcarpet": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "contourcarpet"
}
],
"heatmap": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmap"
}
],
"heatmapgl": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmapgl"
}
],
"histogram": [
{
"marker": {
"pattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
}
},
"type": "histogram"
}
],
"histogram2d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2d"
}
],
"histogram2dcontour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2dcontour"
}
],
"mesh3d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "mesh3d"
}
],
"parcoords": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "parcoords"
}
],
"pie": [
{
"automargin": true,
"type": "pie"
}
],
"scatter": [
{
"fillpattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
},
"type": "scatter"
}
],
"scatter3d": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter3d"
}
],
"scattercarpet": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattercarpet"
}
],
"scattergeo": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergeo"
}
],
"scattergl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergl"
}
],
"scattermapbox": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattermapbox"
}
],
"scatterpolar": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolar"
}
],
"scatterpolargl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolargl"
}
],
"scatterternary": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterternary"
}
],
"surface": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "surface"
}
],
"table": [
{
"cells": {
"fill": {
"color": "#EBF0F8"
},
"line": {
"color": "white"
}
},
"header": {
"fill": {
"color": "#C8D4E3"
},
"line": {
"color": "white"
}
},
"type": "table"
}
]
},
"layout": {
"annotationdefaults": {
"arrowcolor": "#2a3f5f",
"arrowhead": 0,
"arrowwidth": 1
},
"autotypenumbers": "strict",
"coloraxis": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"colorscale": {
"diverging": [
[
0,
"#8e0152"
],
[
0.1,
"#c51b7d"
],
[
0.2,
"#de77ae"
],
[
0.3,
"#f1b6da"
],
[
0.4,
"#fde0ef"
],
[
0.5,
"#f7f7f7"
],
[
0.6,
"#e6f5d0"
],
[
0.7,
"#b8e186"
],
[
0.8,
"#7fbc41"
],
[
0.9,
"#4d9221"
],
[
1,
"#276419"
]
],
"sequential": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"sequentialminus": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
]
},
"colorway": [
"#636efa",
"#EF553B",
"#00cc96",
"#ab63fa",
"#FFA15A",
"#19d3f3",
"#FF6692",
"#B6E880",
"#FF97FF",
"#FECB52"
],
"font": {
"color": "#2a3f5f"
},
"geo": {
"bgcolor": "white",
"lakecolor": "white",
"landcolor": "#E5ECF6",
"showlakes": true,
"showland": true,
"subunitcolor": "white"
},
"hoverlabel": {
"align": "left"
},
"hovermode": "closest",
"mapbox": {
"style": "light"
},
"paper_bgcolor": "white",
"plot_bgcolor": "#E5ECF6",
"polar": {
"angularaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"radialaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"scene": {
"xaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"yaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"zaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
}
},
"shapedefaults": {
"line": {
"color": "#2a3f5f"
}
},
"ternary": {
"aaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"baxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"caxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"title": {
"x": 0.05
},
"xaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
},
"yaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
}
}
},
"title": {
"text": "Taux de comptage N en fonction de la tension U"
},
"xaxis": {
"anchor": "y",
"domain": [
0,
1
],
"title": {
"text": "Tension U (V)"
}
},
"yaxis": {
"anchor": "x",
"domain": [
0,
1
],
"title": {
"text": "Taux de comptage N (cps)"
}
}
}
}
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#plot of N vs U with error bars\n",
"px.scatter(DP, x='U', y='N', error_y='N_err', title='Taux de comptage N en fonction de la tension U', labels={'U': 'Tension U (V)', 'N': 'Taux de comptage N (cps)'})"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "a1a3a7f3",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Original DataFrame shape: (24, 3)\n",
"Filtered DataFrame shape: (16, 3)\n",
"Removed 8 rows with N = 0\n"
]
},
{
"data": {
"application/vnd.microsoft.datawrangler.viewer.v0+json": {
"columns": [
{
"name": "index",
"rawType": "int64",
"type": "integer"
},
{
"name": "U",
"rawType": "int64",
"type": "integer"
},
{
"name": "N",
"rawType": "int64",
"type": "integer"
},
{
"name": "N_err",
"rawType": "float64",
"type": "float"
}
],
"ref": "50463494-b38a-4f66-a1e7-e4adce6cfbd4",
"rows": [
[
"8",
"500",
"944",
"30.72458299147443"
],
[
"9",
"525",
"967",
"31.096623610932426"
],
[
"10",
"550",
"1002",
"31.654383582688826"
],
[
"11",
"575",
"1066",
"32.64965543462902"
],
[
"12",
"600",
"1027",
"32.046840717924134"
],
[
"13",
"625",
"993",
"31.51190251317746"
],
[
"14",
"650",
"1064",
"32.61901286060018"
],
[
"15",
"675",
"1031",
"32.109188716004645"
],
[
"16",
"700",
"1102",
"33.19638534539566"
],
[
"17",
"725",
"1074",
"32.77193921634788"
],
[
"18",
"750",
"1112",
"33.34666400106613"
],
[
"19",
"775",
"1099",
"33.15116890850155"
],
[
"20",
"800",
"1181",
"34.36568055487916"
],
[
"21",
"825",
"1185",
"34.42382895611701"
],
[
"22",
"850",
"1235",
"35.14256678161116"
],
[
"23",
"875",
"1293",
"35.958309192730404"
]
],
"shape": {
"columns": 3,
"rows": 16
}
},
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" U | \n",
" N | \n",
" N_err | \n",
"
\n",
" \n",
" \n",
" \n",
" | 8 | \n",
" 500 | \n",
" 944 | \n",
" 30.724583 | \n",
"
\n",
" \n",
" | 9 | \n",
" 525 | \n",
" 967 | \n",
" 31.096624 | \n",
"
\n",
" \n",
" | 10 | \n",
" 550 | \n",
" 1002 | \n",
" 31.654384 | \n",
"
\n",
" \n",
" | 11 | \n",
" 575 | \n",
" 1066 | \n",
" 32.649655 | \n",
"
\n",
" \n",
" | 12 | \n",
" 600 | \n",
" 1027 | \n",
" 32.046841 | \n",
"
\n",
" \n",
" | 13 | \n",
" 625 | \n",
" 993 | \n",
" 31.511903 | \n",
"
\n",
" \n",
" | 14 | \n",
" 650 | \n",
" 1064 | \n",
" 32.619013 | \n",
"
\n",
" \n",
" | 15 | \n",
" 675 | \n",
" 1031 | \n",
" 32.109189 | \n",
"
\n",
" \n",
" | 16 | \n",
" 700 | \n",
" 1102 | \n",
" 33.196385 | \n",
"
\n",
" \n",
" | 17 | \n",
" 725 | \n",
" 1074 | \n",
" 32.771939 | \n",
"
\n",
" \n",
" | 18 | \n",
" 750 | \n",
" 1112 | \n",
" 33.346664 | \n",
"
\n",
" \n",
" | 19 | \n",
" 775 | \n",
" 1099 | \n",
" 33.151169 | \n",
"
\n",
" \n",
" | 20 | \n",
" 800 | \n",
" 1181 | \n",
" 34.365681 | \n",
"
\n",
" \n",
" | 21 | \n",
" 825 | \n",
" 1185 | \n",
" 34.423829 | \n",
"
\n",
" \n",
" | 22 | \n",
" 850 | \n",
" 1235 | \n",
" 35.142567 | \n",
"
\n",
" \n",
" | 23 | \n",
" 875 | \n",
" 1293 | \n",
" 35.958309 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" U N N_err\n",
"8 500 944 30.724583\n",
"9 525 967 31.096624\n",
"10 550 1002 31.654384\n",
"11 575 1066 32.649655\n",
"12 600 1027 32.046841\n",
"13 625 993 31.511903\n",
"14 650 1064 32.619013\n",
"15 675 1031 32.109189\n",
"16 700 1102 33.196385\n",
"17 725 1074 32.771939\n",
"18 750 1112 33.346664\n",
"19 775 1099 33.151169\n",
"20 800 1181 34.365681\n",
"21 825 1185 34.423829\n",
"22 850 1235 35.142567\n",
"23 875 1293 35.958309"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Drop rows where column 'N' equals 0\n",
"DP_filtered = DP[DP['N'] != 0] \n",
"\n",
"# Alternative methods:\n",
"# DP_filtered = DP.drop(DP[DP['N'] == 0].index) # Using drop() method\n",
"# DP_filtered = DP.query('N != 0') # Using query() method\n",
"\n",
"print(f\"Original DataFrame shape: {DP.shape}\")\n",
"print(f\"Filtered DataFrame shape: {DP_filtered.shape}\")\n",
"print(f\"Removed {DP.shape[0] - DP_filtered.shape[0]} rows with N = 0\")\n",
"\n",
"DP_filtered"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "fdd3dce3",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"687.5"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# we find U_{w}\n",
"\n",
"Uw = (875 + 500 )/2\n",
"\n",
"Uw"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "fb110ba6",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1085.9375 +- 97.48194277232408\n"
]
}
],
"source": [
"# we find N_{av}\n",
"Nav = DP_filtered['N'].mean()\n",
"print(f'{DP_filtered['N'].mean()} +- {np.sqrt(1/(len(DP_filtered['N'])-1) * np.sum((DP_filtered['N'] - DP_filtered['N'].mean())**2))}')"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "432b031b",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.0004962616088947025\n"
]
}
],
"source": [
"#linear regression on the plateau region (from U=500 to U=875)\n",
"plateau = DP[(DP['U'] >= 550) & (DP['U'] <= 800)]\n",
"slope, intercept, r_value, p_value, std_err = linregress(plateau['U'], plateau['N'])\n",
"\n",
"#we calculate the drift = 1/Nav * dN/dU\n",
"drift = 1/Nav * slope\n",
"\n",
"print(f'{drift}')"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "afa0cde5",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"plotlyServerURL": "https://plot.ly"
},
"data": [
{
"error_y": {
"array": [
31.654383582688826,
32.64965543462902,
32.046840717924134,
31.51190251317746,
32.61901286060018,
32.109188716004645,
33.19638534539566,
32.77193921634788,
33.34666400106613,
33.15116890850155,
34.36568055487916
]
},
"hovertemplate": "Tension U (V)=%{x}
Taux de comptage N (cps)=%{y}",
"legendgroup": "",
"marker": {
"color": "#636efa",
"symbol": "circle"
},
"mode": "markers",
"name": "",
"orientation": "v",
"showlegend": false,
"type": "scatter",
"x": [
550,
575,
600,
625,
650,
675,
700,
725,
750,
775,
800
],
"xaxis": "x",
"y": [
1002,
1066,
1027,
993,
1064,
1031,
1102,
1074,
1112,
1099,
1181
],
"yaxis": "y"
},
{
"mode": "lines",
"name": "Régression linéaire",
"type": "scatter",
"x": [
550,
575,
600,
625,
650,
675,
700,
725,
750,
775,
800
],
"y": [
1000.909090909091,
1014.3818181818183,
1027.8545454545456,
1041.3272727272729,
1054.8000000000002,
1068.2727272727273,
1081.7454545454545,
1095.2181818181818,
1108.6909090909091,
1122.1636363636364,
1135.6363636363637
]
}
],
"layout": {
"legend": {
"tracegroupgap": 0
},
"template": {
"data": {
"bar": [
{
"error_x": {
"color": "#2a3f5f"
},
"error_y": {
"color": "#2a3f5f"
},
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
},
"pattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
}
},
"type": "bar"
}
],
"barpolar": [
{
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
},
"pattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
}
},
"type": "barpolar"
}
],
"carpet": [
{
"aaxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"baxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"type": "carpet"
}
],
"choropleth": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "choropleth"
}
],
"contour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "contour"
}
],
"contourcarpet": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "contourcarpet"
}
],
"heatmap": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmap"
}
],
"heatmapgl": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmapgl"
}
],
"histogram": [
{
"marker": {
"pattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
}
},
"type": "histogram"
}
],
"histogram2d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2d"
}
],
"histogram2dcontour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2dcontour"
}
],
"mesh3d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "mesh3d"
}
],
"parcoords": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "parcoords"
}
],
"pie": [
{
"automargin": true,
"type": "pie"
}
],
"scatter": [
{
"fillpattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
},
"type": "scatter"
}
],
"scatter3d": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter3d"
}
],
"scattercarpet": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattercarpet"
}
],
"scattergeo": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergeo"
}
],
"scattergl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergl"
}
],
"scattermapbox": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattermapbox"
}
],
"scatterpolar": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolar"
}
],
"scatterpolargl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolargl"
}
],
"scatterternary": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterternary"
}
],
"surface": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "surface"
}
],
"table": [
{
"cells": {
"fill": {
"color": "#EBF0F8"
},
"line": {
"color": "white"
}
},
"header": {
"fill": {
"color": "#C8D4E3"
},
"line": {
"color": "white"
}
},
"type": "table"
}
]
},
"layout": {
"annotationdefaults": {
"arrowcolor": "#2a3f5f",
"arrowhead": 0,
"arrowwidth": 1
},
"autotypenumbers": "strict",
"coloraxis": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"colorscale": {
"diverging": [
[
0,
"#8e0152"
],
[
0.1,
"#c51b7d"
],
[
0.2,
"#de77ae"
],
[
0.3,
"#f1b6da"
],
[
0.4,
"#fde0ef"
],
[
0.5,
"#f7f7f7"
],
[
0.6,
"#e6f5d0"
],
[
0.7,
"#b8e186"
],
[
0.8,
"#7fbc41"
],
[
0.9,
"#4d9221"
],
[
1,
"#276419"
]
],
"sequential": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"sequentialminus": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
]
},
"colorway": [
"#636efa",
"#EF553B",
"#00cc96",
"#ab63fa",
"#FFA15A",
"#19d3f3",
"#FF6692",
"#B6E880",
"#FF97FF",
"#FECB52"
],
"font": {
"color": "#2a3f5f"
},
"geo": {
"bgcolor": "white",
"lakecolor": "white",
"landcolor": "#E5ECF6",
"showlakes": true,
"showland": true,
"subunitcolor": "white"
},
"hoverlabel": {
"align": "left"
},
"hovermode": "closest",
"mapbox": {
"style": "light"
},
"paper_bgcolor": "white",
"plot_bgcolor": "#E5ECF6",
"polar": {
"angularaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"radialaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"scene": {
"xaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"yaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"zaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
}
},
"shapedefaults": {
"line": {
"color": "#2a3f5f"
}
},
"ternary": {
"aaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"baxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"caxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"title": {
"x": 0.05
},
"xaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
},
"yaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
}
}
},
"title": {
"text": "Taux de comptage N en fonction de la tension U avec régression linéaire"
},
"xaxis": {
"anchor": "y",
"domain": [
0,
1
],
"title": {
"text": "Tension U (V)"
}
},
"yaxis": {
"anchor": "x",
"domain": [
0,
1
],
"title": {
"text": "Taux de comptage N (cps)"
}
}
}
}
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#plot linear regression on the plateau region\n",
"px.scatter(plateau, x='U', y='N', error_y='N_err', title='Taux de comptage N en fonction de la tension U avec régression linéaire', labels={'U': 'Tension U (V)', 'N': 'Taux de comptage N (cps)'}).add_scatter(x=plateau['U'], y=slope*plateau['U'] + intercept, mode='lines', name='Régression linéaire')"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "3a553e70",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.microsoft.datawrangler.viewer.v0+json": {
"columns": [
{
"name": "index",
"rawType": "int64",
"type": "integer"
},
{
"name": "t",
"rawType": "int64",
"type": "integer"
},
{
"name": "N",
"rawType": "int64",
"type": "integer"
},
{
"name": "N_err",
"rawType": "float64",
"type": "float"
}
],
"ref": "7d348542-dd3f-46de-b50d-bed4784ba447",
"rows": [
[
"0",
"256",
"157",
"12.529964086141668"
],
[
"1",
"256",
"174",
"13.19090595827292"
],
[
"2",
"256",
"171",
"13.076696830622021"
]
],
"shape": {
"columns": 3,
"rows": 3
}
},
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" t | \n",
" N | \n",
" N_err | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" 256 | \n",
" 157 | \n",
" 12.529964 | \n",
"
\n",
" \n",
" | 1 | \n",
" 256 | \n",
" 174 | \n",
" 13.190906 | \n",
"
\n",
" \n",
" | 2 | \n",
" 256 | \n",
" 171 | \n",
" 13.076697 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" t N N_err\n",
"0 256 157 12.529964\n",
"1 256 174 13.190906\n",
"2 256 171 13.076697"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"BM = pd.DataFrame({\n",
" 't': [256, 256, 256],\n",
" 'N': [157, 174, 171],\n",
" 'N_err': [0, 0, 0]\n",
"})\n",
"\n",
"BM['N_err'] = np.sqrt(BM['N'])\n",
"\n",
"BM"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "b85d5b79",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.6537314626534677 +- 5.9318100621415555\n"
]
}
],
"source": [
"eta_b = ((BM['N'])/(256 - BM['N'] * 0.0002)).mean()\n",
"deta_b = eta_b * np.sqrt(1/(len(BM['N'])-1) * np.sum((BM['N'] - BM['N'].mean())**2))\n",
"\n",
"print(f'{eta_b} +- {deta_b}')"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "c4f2e63b",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.microsoft.datawrangler.viewer.v0+json": {
"columns": [
{
"name": "index",
"rawType": "int64",
"type": "integer"
},
{
"name": "N",
"rawType": "int64",
"type": "integer"
},
{
"name": "eta^{*}",
"rawType": "float64",
"type": "float"
},
{
"name": "deta^{*}",
"rawType": "float64",
"type": "float"
}
],
"ref": "ea7cc70b-d03c-4cf2-b94f-d987c95d447c",
"rows": [
[
"0",
"2883",
"10.633409809446112",
"574.4193539555206"
],
[
"1",
"1149",
"3.838582340909262",
"132.09333046402872"
],
[
"2",
"1082",
"3.57640682611876",
"119.53903057501743"
]
],
"shape": {
"columns": 3,
"rows": 3
}
},
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" N | \n",
" eta^{*} | \n",
" deta^{*} | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" 2883 | \n",
" 10.633410 | \n",
" 574.419354 | \n",
"
\n",
" \n",
" | 1 | \n",
" 1149 | \n",
" 3.838582 | \n",
" 132.093330 | \n",
"
\n",
" \n",
" | 2 | \n",
" 1082 | \n",
" 3.576407 | \n",
" 119.539031 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" N eta^{*} deta^{*}\n",
"0 2883 10.633410 574.419354\n",
"1 1149 3.838582 132.093330\n",
"2 1082 3.576407 119.539031"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"CE = pd.DataFrame({\n",
" 'N': [2883, 1149, 1082],\n",
" 'eta^{*}': [np.nan]*3,\n",
" 'deta^{*}': [np.nan]*3\n",
"})\n",
"\n",
"CE['eta^{*}'] = (CE['N'])/(256 - CE['N'] * 0.0002) - eta_b\n",
"CE['deta^{*}'] = CE['eta^{*}'] * np.sqrt(CE['N'] + deta_b**2)\n",
"\n",
"CE"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ae07a918",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.microsoft.datawrangler.viewer.v0+json": {
"columns": [
{
"name": "index",
"rawType": "int64",
"type": "integer"
},
{
"name": "d",
"rawType": "int64",
"type": "integer"
},
{
"name": "t",
"rawType": "float64",
"type": "float"
},
{
"name": "N",
"rawType": "int64",
"type": "integer"
},
{
"name": "d^{-2}",
"rawType": "float64",
"type": "float"
},
{
"name": "Ω",
"rawType": "float64",
"type": "float"
},
{
"name": "δΩ",
"rawType": "float64",
"type": "float"
},
{
"name": "η∗",
"rawType": "float64",
"type": "float"
},
{
"name": "δη∗",
"rawType": "float64",
"type": "float"
}
],
"ref": "3d09d65c-80b7-4414-b1e1-ff2c52da7689",
"rows": [
[
"0",
"100",
"22.67",
"1003",
"0.0001",
"0.005531823565851246",
"8.297968719301828e-05",
"43.98475465624601",
"391.368243107574"
],
[
"1",
"120",
"29.81",
"1009",
"6.944444444444444e-05",
"0.0038610616431661304",
"4.826392514763921e-05",
"33.424665738121995",
"276.8624530177192"
],
[
"2",
"140",
"39.02",
"1007",
"5.102040816326531e-05",
"0.002845423040095496",
"3.0486898626858177e-05",
"25.28744106804058",
"196.6475569165817"
],
[
"3",
"160",
"43.56",
"1002",
"3.90625e-05",
"0.0021828869703559017",
"2.0464653171284786e-05",
"22.455337809203282",
"170.48572269664405"
],
[
"4",
"180",
"54.72",
"1003",
"3.08641975308642e-05",
"0.0017271208775601066",
"1.4392712540235059e-05",
"17.74338956215605",
"129.08820171735402"
],
[
"5",
"195",
"64.21",
"1002",
"2.6298487836949376e-05",
"0.0014727572492092",
"1.1328923953436117e-05",
"15.000170452059328",
"106.264897182219"
],
[
"6",
"205",
"67.92",
"1002",
"2.3795359904818562e-05",
"0.0013331382042170992",
"9.754685321169446e-06",
"14.142575662610119",
"99.3297700673603"
],
[
"7",
"220",
"76.8",
"1006",
"2.066115702479339e-05",
"0.0011581536592299435",
"7.896511702632942e-06",
"12.479633550897658",
"86.16010237317275"
],
[
"8",
"240",
"86.95",
"1005",
"1.736111111111111e-05",
"0.0009737107585557347",
"6.08569739987639e-06",
"10.93141649294256",
"74.23533480271318"
],
[
"9",
"260",
"100.59",
"1003",
"1.4792899408284024e-05",
"0.0008300291621955447",
"4.788632729101847e-06",
"9.337363214673022",
"62.30458988789504"
],
[
"10",
"280",
"116.96",
"1005",
"1.2755102040816327e-05",
"0.0007159338649555536",
"3.835361745790161e-06",
"7.9537420511655945",
"52.24107915862086"
],
[
"11",
"300",
"127.92",
"1003",
"1.1111111111111112e-05",
"0.0006238305610776762",
"3.119153888427362e-06",
"7.19942162137292",
"46.871382176149204"
]
],
"shape": {
"columns": 8,
"rows": 12
}
},
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" d | \n",
" t | \n",
" N | \n",
" d^{-2} | \n",
" Ω | \n",
" δΩ | \n",
" η∗ | \n",
" δη∗ | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" 100 | \n",
" 22.67 | \n",
" 1003 | \n",
" 0.000100 | \n",
" 0.005532 | \n",
" 0.000083 | \n",
" 43.984755 | \n",
" 391.368243 | \n",
"
\n",
" \n",
" | 1 | \n",
" 120 | \n",
" 29.81 | \n",
" 1009 | \n",
" 0.000069 | \n",
" 0.003861 | \n",
" 0.000048 | \n",
" 33.424666 | \n",
" 276.862453 | \n",
"
\n",
" \n",
" | 2 | \n",
" 140 | \n",
" 39.02 | \n",
" 1007 | \n",
" 0.000051 | \n",
" 0.002845 | \n",
" 0.000030 | \n",
" 25.287441 | \n",
" 196.647557 | \n",
"
\n",
" \n",
" | 3 | \n",
" 160 | \n",
" 43.56 | \n",
" 1002 | \n",
" 0.000039 | \n",
" 0.002183 | \n",
" 0.000020 | \n",
" 22.455338 | \n",
" 170.485723 | \n",
"
\n",
" \n",
" | 4 | \n",
" 180 | \n",
" 54.72 | \n",
" 1003 | \n",
" 0.000031 | \n",
" 0.001727 | \n",
" 0.000014 | \n",
" 17.743390 | \n",
" 129.088202 | \n",
"
\n",
" \n",
" | 5 | \n",
" 195 | \n",
" 64.21 | \n",
" 1002 | \n",
" 0.000026 | \n",
" 0.001473 | \n",
" 0.000011 | \n",
" 15.000170 | \n",
" 106.264897 | \n",
"
\n",
" \n",
" | 6 | \n",
" 205 | \n",
" 67.92 | \n",
" 1002 | \n",
" 0.000024 | \n",
" 0.001333 | \n",
" 0.000010 | \n",
" 14.142576 | \n",
" 99.329770 | \n",
"
\n",
" \n",
" | 7 | \n",
" 220 | \n",
" 76.80 | \n",
" 1006 | \n",
" 0.000021 | \n",
" 0.001158 | \n",
" 0.000008 | \n",
" 12.479634 | \n",
" 86.160102 | \n",
"
\n",
" \n",
" | 8 | \n",
" 240 | \n",
" 86.95 | \n",
" 1005 | \n",
" 0.000017 | \n",
" 0.000974 | \n",
" 0.000006 | \n",
" 10.931416 | \n",
" 74.235335 | \n",
"
\n",
" \n",
" | 9 | \n",
" 260 | \n",
" 100.59 | \n",
" 1003 | \n",
" 0.000015 | \n",
" 0.000830 | \n",
" 0.000005 | \n",
" 9.337363 | \n",
" 62.304590 | \n",
"
\n",
" \n",
" | 10 | \n",
" 280 | \n",
" 116.96 | \n",
" 1005 | \n",
" 0.000013 | \n",
" 0.000716 | \n",
" 0.000004 | \n",
" 7.953742 | \n",
" 52.241079 | \n",
"
\n",
" \n",
" | 11 | \n",
" 300 | \n",
" 127.92 | \n",
" 1003 | \n",
" 0.000011 | \n",
" 0.000624 | \n",
" 0.000003 | \n",
" 7.199422 | \n",
" 46.871382 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" d t N d^{-2} Ω δΩ η∗ δη∗\n",
"0 100 22.67 1003 0.000100 0.005532 0.000083 43.984755 391.368243\n",
"1 120 29.81 1009 0.000069 0.003861 0.000048 33.424666 276.862453\n",
"2 140 39.02 1007 0.000051 0.002845 0.000030 25.287441 196.647557\n",
"3 160 43.56 1002 0.000039 0.002183 0.000020 22.455338 170.485723\n",
"4 180 54.72 1003 0.000031 0.001727 0.000014 17.743390 129.088202\n",
"5 195 64.21 1002 0.000026 0.001473 0.000011 15.000170 106.264897\n",
"6 205 67.92 1002 0.000024 0.001333 0.000010 14.142576 99.329770\n",
"7 220 76.80 1006 0.000021 0.001158 0.000008 12.479634 86.160102\n",
"8 240 86.95 1005 0.000017 0.000974 0.000006 10.931416 74.235335\n",
"9 260 100.59 1003 0.000015 0.000830 0.000005 9.337363 62.304590\n",
"10 280 116.96 1005 0.000013 0.000716 0.000004 7.953742 52.241079\n",
"11 300 127.92 1003 0.000011 0.000624 0.000003 7.199422 46.871382"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"SA = pd.DataFrame({\n",
" 'd': [100, 120, 140, 160, 180, 195, 205, 220, 240, 260, 280, 300],\n",
" 't': [22.67, 29.81, 39.02, 43.56, 54.72, 64.21, 67.92, 76.8, 86.95, 100.59, 116.96, 127.92],\n",
" 'N': [1003, 1009, 1007, 1002, 1003, 1002, 1002, 1006, 1005, 1003, 1005, 1003],\n",
" 'd^{-2}': [np.nan]*12,\n",
" 'Ω': [np.nan]*12,\n",
" 'δΩ': [np.nan]*12,\n",
" 'η∗': [np.nan]*12,\n",
" 'δη∗': [np.nan]*12\n",
" \n",
"})\n",
"\n",
"rd = 15\n",
"drd = 0.2\n",
"\n",
"SA['d^{-2}'] = 1 / SA['d']**2\n",
"\n",
"SA['Ω'] = 1/2 * (1 - (1 / np.sqrt(1 + (rd)**2 * SA['d^{-2}'])))\n",
"\n",
"SA['δΩ'] = SA['Ω'] * np.sqrt(((rd/(2*SA['d']))*drd)**2 + (-(rd**2/(2*SA['d']**3))*1)**2)\n",
"\n",
"SA['η∗'] = (SA['N'])/(SA['t'] - SA['N'] * 0.0002) - eta_b\n",
"SA['δη∗'] = SA['η∗'] * np.sqrt(SA['η∗'] + deta_b**2)\n",
"\n",
"SA"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "b457cd86",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"plotlyServerURL": "https://plot.ly"
},
"data": [
{
"error_y": {
"array": [
0.00008297968719301828,
0.00004826392514763921,
0.000030486898626858177,
0.000020464653171284786,
0.000014392712540235059,
0.000011328923953436117,
0.000009754685321169446,
0.000007896511702632942,
0.00000608569739987639,
0.000004788632729101847,
0.000003835361745790161,
0.000003119153888427362
]
},
"hovertemplate": "Distance d [mm]=%{x}
Angle solide Ω [sr]=%{y}",
"legendgroup": "",
"marker": {
"color": "#636efa",
"symbol": "circle"
},
"mode": "markers",
"name": "",
"orientation": "v",
"showlegend": false,
"type": "scatter",
"x": [
100,
120,
140,
160,
180,
195,
205,
220,
240,
260,
280,
300
],
"xaxis": "x",
"y": [
0.005531823565851246,
0.0038610616431661304,
0.002845423040095496,
0.0021828869703559017,
0.0017271208775601066,
0.0014727572492092,
0.0013331382042170992,
0.0011581536592299435,
0.0009737107585557347,
0.0008300291621955447,
0.0007159338649555536,
0.0006238305610776762
],
"yaxis": "y"
}
],
"layout": {
"legend": {
"tracegroupgap": 0
},
"template": {
"data": {
"bar": [
{
"error_x": {
"color": "#2a3f5f"
},
"error_y": {
"color": "#2a3f5f"
},
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
},
"pattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
}
},
"type": "bar"
}
],
"barpolar": [
{
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
},
"pattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
}
},
"type": "barpolar"
}
],
"carpet": [
{
"aaxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"baxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"type": "carpet"
}
],
"choropleth": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "choropleth"
}
],
"contour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "contour"
}
],
"contourcarpet": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "contourcarpet"
}
],
"heatmap": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmap"
}
],
"heatmapgl": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmapgl"
}
],
"histogram": [
{
"marker": {
"pattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
}
},
"type": "histogram"
}
],
"histogram2d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2d"
}
],
"histogram2dcontour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2dcontour"
}
],
"mesh3d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "mesh3d"
}
],
"parcoords": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "parcoords"
}
],
"pie": [
{
"automargin": true,
"type": "pie"
}
],
"scatter": [
{
"fillpattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
},
"type": "scatter"
}
],
"scatter3d": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter3d"
}
],
"scattercarpet": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattercarpet"
}
],
"scattergeo": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergeo"
}
],
"scattergl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergl"
}
],
"scattermapbox": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattermapbox"
}
],
"scatterpolar": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolar"
}
],
"scatterpolargl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolargl"
}
],
"scatterternary": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterternary"
}
],
"surface": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "surface"
}
],
"table": [
{
"cells": {
"fill": {
"color": "#EBF0F8"
},
"line": {
"color": "white"
}
},
"header": {
"fill": {
"color": "#C8D4E3"
},
"line": {
"color": "white"
}
},
"type": "table"
}
]
},
"layout": {
"annotationdefaults": {
"arrowcolor": "#2a3f5f",
"arrowhead": 0,
"arrowwidth": 1
},
"autotypenumbers": "strict",
"coloraxis": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"colorscale": {
"diverging": [
[
0,
"#8e0152"
],
[
0.1,
"#c51b7d"
],
[
0.2,
"#de77ae"
],
[
0.3,
"#f1b6da"
],
[
0.4,
"#fde0ef"
],
[
0.5,
"#f7f7f7"
],
[
0.6,
"#e6f5d0"
],
[
0.7,
"#b8e186"
],
[
0.8,
"#7fbc41"
],
[
0.9,
"#4d9221"
],
[
1,
"#276419"
]
],
"sequential": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"sequentialminus": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
]
},
"colorway": [
"#636efa",
"#EF553B",
"#00cc96",
"#ab63fa",
"#FFA15A",
"#19d3f3",
"#FF6692",
"#B6E880",
"#FF97FF",
"#FECB52"
],
"font": {
"color": "#2a3f5f"
},
"geo": {
"bgcolor": "white",
"lakecolor": "white",
"landcolor": "#E5ECF6",
"showlakes": true,
"showland": true,
"subunitcolor": "white"
},
"hoverlabel": {
"align": "left"
},
"hovermode": "closest",
"mapbox": {
"style": "light"
},
"paper_bgcolor": "white",
"plot_bgcolor": "#E5ECF6",
"polar": {
"angularaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"radialaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"scene": {
"xaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"yaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"zaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
}
},
"shapedefaults": {
"line": {
"color": "#2a3f5f"
}
},
"ternary": {
"aaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"baxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"caxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"title": {
"x": 0.05
},
"xaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
},
"yaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
}
}
},
"title": {
"text": "Angle Ω en stéradian en fonction de d"
},
"xaxis": {
"anchor": "y",
"domain": [
0,
1
],
"title": {
"text": "Distance d [mm]"
}
},
"yaxis": {
"anchor": "x",
"domain": [
0,
1
],
"title": {
"text": "Angle solide Ω [sr]"
}
}
}
}
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# slope, intercept, r_value, p_value, std_err = linregress(SA['d'], SA['Ω'])\n",
"\n",
"# dOmega = slope\n",
"\n",
"\n",
"px.scatter(SA, x='d', y='Ω', error_y='δΩ', title='Angle Ω en stéradian en fonction de d', labels={'d': 'Distance d [mm]', 'Ω': 'Angle solide Ω [sr]'})#.add_scatter(x=SA['d'], y=slope*SA['d'] + intercept, mode='lines', name='Régression linéaire')\n"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "fa1231e2",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"plotlyServerURL": "https://plot.ly"
},
"data": [
{
"error_y": {
"array": [
391.368243107574,
276.8624530177192,
196.6475569165817,
170.48572269664405,
129.08820171735402,
106.264897182219,
99.3297700673603,
86.16010237317275,
74.23533480271318,
62.30458988789504,
52.24107915862086,
46.871382176149204
]
},
"hovertemplate": "Angle solide Ω [sr]=%{x}
Taux de comptage η∗ [s^-1]=%{y}",
"legendgroup": "",
"marker": {
"color": "#636efa",
"symbol": "circle"
},
"mode": "markers",
"name": "",
"orientation": "v",
"showlegend": false,
"type": "scatter",
"x": [
0.005531823565851246,
0.0038610616431661304,
0.002845423040095496,
0.0021828869703559017,
0.0017271208775601066,
0.0014727572492092,
0.0013331382042170992,
0.0011581536592299435,
0.0009737107585557347,
0.0008300291621955447,
0.0007159338649555536,
0.0006238305610776762
],
"xaxis": "x",
"y": [
43.98475465624601,
33.424665738121995,
25.28744106804058,
22.455337809203282,
17.74338956215605,
15.000170452059328,
14.142575662610119,
12.479633550897658,
10.93141649294256,
9.337363214673022,
7.9537420511655945,
7.19942162137292
],
"yaxis": "y"
},
{
"mode": "lines",
"name": "Régression linéaire",
"type": "scatter",
"x": [
0.005531823565851246,
0.0038610616431661304,
0.002845423040095496,
0.0021828869703559017,
0.0017271208775601066,
0.0014727572492092,
0.0013331382042170992,
0.0011581536592299435,
0.0009737107585557347,
0.0008300291621955447,
0.0007159338649555536,
0.0006238305610776762
],
"y": [
45.41611906415175,
32.82309230066011,
25.167923759382393,
20.174193447046488,
16.738949606173314,
14.821735707538451,
13.769385671063482,
12.450475401263203,
11.060274707202918,
9.977304019507825,
9.117334018861278,
8.42312417663787
]
}
],
"layout": {
"legend": {
"tracegroupgap": 0
},
"template": {
"data": {
"bar": [
{
"error_x": {
"color": "#2a3f5f"
},
"error_y": {
"color": "#2a3f5f"
},
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
},
"pattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
}
},
"type": "bar"
}
],
"barpolar": [
{
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
},
"pattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
}
},
"type": "barpolar"
}
],
"carpet": [
{
"aaxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"baxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"type": "carpet"
}
],
"choropleth": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "choropleth"
}
],
"contour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "contour"
}
],
"contourcarpet": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "contourcarpet"
}
],
"heatmap": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmap"
}
],
"heatmapgl": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmapgl"
}
],
"histogram": [
{
"marker": {
"pattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
}
},
"type": "histogram"
}
],
"histogram2d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2d"
}
],
"histogram2dcontour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2dcontour"
}
],
"mesh3d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "mesh3d"
}
],
"parcoords": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "parcoords"
}
],
"pie": [
{
"automargin": true,
"type": "pie"
}
],
"scatter": [
{
"fillpattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
},
"type": "scatter"
}
],
"scatter3d": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter3d"
}
],
"scattercarpet": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattercarpet"
}
],
"scattergeo": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergeo"
}
],
"scattergl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergl"
}
],
"scattermapbox": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattermapbox"
}
],
"scatterpolar": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolar"
}
],
"scatterpolargl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolargl"
}
],
"scatterternary": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterternary"
}
],
"surface": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "surface"
}
],
"table": [
{
"cells": {
"fill": {
"color": "#EBF0F8"
},
"line": {
"color": "white"
}
},
"header": {
"fill": {
"color": "#C8D4E3"
},
"line": {
"color": "white"
}
},
"type": "table"
}
]
},
"layout": {
"annotationdefaults": {
"arrowcolor": "#2a3f5f",
"arrowhead": 0,
"arrowwidth": 1
},
"autotypenumbers": "strict",
"coloraxis": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"colorscale": {
"diverging": [
[
0,
"#8e0152"
],
[
0.1,
"#c51b7d"
],
[
0.2,
"#de77ae"
],
[
0.3,
"#f1b6da"
],
[
0.4,
"#fde0ef"
],
[
0.5,
"#f7f7f7"
],
[
0.6,
"#e6f5d0"
],
[
0.7,
"#b8e186"
],
[
0.8,
"#7fbc41"
],
[
0.9,
"#4d9221"
],
[
1,
"#276419"
]
],
"sequential": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"sequentialminus": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
]
},
"colorway": [
"#636efa",
"#EF553B",
"#00cc96",
"#ab63fa",
"#FFA15A",
"#19d3f3",
"#FF6692",
"#B6E880",
"#FF97FF",
"#FECB52"
],
"font": {
"color": "#2a3f5f"
},
"geo": {
"bgcolor": "white",
"lakecolor": "white",
"landcolor": "#E5ECF6",
"showlakes": true,
"showland": true,
"subunitcolor": "white"
},
"hoverlabel": {
"align": "left"
},
"hovermode": "closest",
"mapbox": {
"style": "light"
},
"paper_bgcolor": "white",
"plot_bgcolor": "#E5ECF6",
"polar": {
"angularaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"radialaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"scene": {
"xaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"yaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"zaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
}
},
"shapedefaults": {
"line": {
"color": "#2a3f5f"
}
},
"ternary": {
"aaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"baxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"caxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"title": {
"x": 0.05
},
"xaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
},
"yaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
}
}
},
"title": {
"text": "Taux de comptage η∗ en fonction de l'angle solide Ω"
},
"xaxis": {
"anchor": "y",
"domain": [
0,
1
],
"title": {
"text": "Angle solide Ω [sr]"
}
},
"yaxis": {
"anchor": "x",
"domain": [
0,
1
],
"title": {
"text": "Taux de comptage η∗ [s^-1]"
}
}
}
}
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"slope, intercept, r_value, p_value, std_err = linregress(SA['Ω'], SA['η∗'])\n",
"\n",
"deta = slope\n",
"\n",
"px.scatter(SA, x='Ω', y='η∗', error_y='δη∗', title='Taux de comptage η∗ en fonction de l\\'angle solide Ω', labels={r'η∗': 'Taux de comptage η∗ [s^-1]', 'Ω': 'Angle solide Ω [sr]'}).add_scatter(x=SA['Ω'], y=slope*SA['Ω'] + intercept, mode='lines', name='Régression linéaire')\n"
]
},
{
"cell_type": "code",
"execution_count": 135,
"id": "69ac8a40",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"np.float64(7537.295764589329)"
]
},
"execution_count": 135,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"deta"
]
},
{
"cell_type": "code",
"execution_count": 136,
"id": "b6872df2",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"np.float64(837477.3071765922)"
]
},
"execution_count": 136,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"eps = 0.009\n",
"\n",
"A = deta/(eps)\n",
"\n",
"A"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f7050997",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python313",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.7"
}
},
"nbformat": 4,
"nbformat_minor": 5
}