notebook update

This commit is contained in:
Alexander Nozik 2018-12-17 20:47:17 +03:00
parent e79a28b653
commit d1b66778b4
3 changed files with 88282 additions and 65 deletions

View File

@ -1,3 +1,4 @@
\.orig$
\.orig\..*$
\.chg\..*$
@ -5,8 +6,8 @@
\.conflict\~$
.gradle/
output/
notebooks/.ipynb_checkpoints
.ipynb_checkpoints
.ipynb_checkpoints/
notebooks/images/
build/
.idea/*
!gradle-wrapper.jar

View File

@ -13,7 +13,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "3161978b-3c71-4d18-a97e-f972beece3ff",
"model_id": "b3666d93-1a9f-47f6-b272-8c9cde5eb9eb",
"version_major": 2,
"version_minor": 0
},
@ -25,7 +25,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "6884d267-e5ee-4841-8c60-9c66eea437c5",
"model_id": "0e65aaab-812e-45f3-98df-43ed93255c5e",
"version_major": 2,
"version_minor": 0
},
@ -42,7 +42,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 5,
"metadata": {
"ExecuteTime": {
"end_time": "2018-04-08T18:58+0000",
@ -53,7 +53,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "582da53b-a518-4a8a-b7ce-84d38c580cf3",
"model_id": "8e62373b-9e28-4669-937f-06f5c908a4bd",
"version_major": 2,
"version_minor": 0
},
@ -69,9 +69,9 @@
"def e = (1..20) // energy in keV\n",
"\n",
"factor = 1e-22\n",
"def sigmaEl = e.collect{scatter.sigmael(it*1000)/factor}\n",
"def sigmaIon = e.collect{scatter.sigmaion(it*1000)/factor}\n",
"def sigmaExc = e.collect{scatter.sigmaexc(it*1000)/factor}\n",
"sigmaEl = e.collect{scatter.sigmael(it*1000)/factor}\n",
"sigmaIon = e.collect{scatter.sigmaion(it*1000)/factor}\n",
"sigmaExc = e.collect{scatter.sigmaexc(it*1000)/factor}\n",
"\n",
"def plot = new Plot(logY: true, yLogBase: 10)\n",
"plot << new Line(x: e, y: sigmaEl, displayName: \"Elastic\")\n",
@ -81,7 +81,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 4,
"metadata": {},
"outputs": [
{
@ -163,7 +163,7 @@
"null"
]
},
"execution_count": 15,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
@ -180,10 +180,324 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 21,
"metadata": {},
"outputs": [],
"source": []
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "b29b147e-ab0d-473b-b9db-909013996ad7",
"version_major": 2,
"version_minor": 0
},
"method": "display_data"
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import com.twosigma.beakerx.table.*\n",
"\n",
"def list = []\n",
" \n",
"for(d = 12.0; d < 18.6; d += 0.1){\n",
" list << [\n",
" \"x\": d,\n",
" \"el\": scatter.sigmael(d*1000)/factor,\n",
" \"ion\": scatter.sigmaion(d*1000)/factor,\n",
" \"exc\": scatter.sigmaexc(d*1000)/factor \n",
" ]\n",
"}\n",
"beakerx[\"table\"] = new TableDisplay(list)\n",
"list"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[{'x': 12.0,\n",
" 'el': 0.43948540252301355,\n",
" 'ion': 2.7362696996880764,\n",
" 'exc': 2.2754271467658227},\n",
" {'x': 12.1,\n",
" 'el': 0.4360219815420227,\n",
" 'ion': 2.716347129996631,\n",
" 'exc': 2.259247553470829},\n",
" {'x': 12.2,\n",
" 'el': 0.4326153394877464,\n",
" 'ion': 2.6967291910800784,\n",
" 'exc': 2.2433117665045716},\n",
" {'x': 12.3,\n",
" 'el': 0.42926409223681455,\n",
" 'ion': 2.6774088086825643,\n",
" 'exc': 2.227614186457129},\n",
" {'x': 12.4,\n",
" 'el': 0.42596690029168804,\n",
" 'ion': 2.6583791281775273,\n",
" 'exc': 2.212149386181278},\n",
" {'x': 12.5,\n",
" 'el': 0.4227224669965498,\n",
" 'ion': 2.639633506055748,\n",
" 'exc': 2.1969121041685504},\n",
" {'x': 12.6,\n",
" 'el': 0.41952953683810995,\n",
" 'ion': 2.621165501807934,\n",
" 'exc': 2.1818972382301722},\n",
" {'x': 12.7,\n",
" 'el': 0.4163868938266485,\n",
" 'ion': 2.602968870180603,\n",
" 'exc': 2.1670998394665926},\n",
" {'x': 12.8,\n",
" 'el': 0.4132933599529065,\n",
" 'ion': 2.585037553785318,\n",
" 'exc': 2.1525151065102723},\n",
" {'x': 12.9,\n",
" 'el': 0.4102477937167139,\n",
" 'ion': 2.567365676042546,\n",
" 'exc': 2.138138380027344},\n",
" {'x': 13.0,\n",
" 'el': 0.4072490887234942,\n",
" 'ion': 2.5499475344425586,\n",
" 'exc': 2.123965137464613},\n",
" {'x': 13.1,\n",
" 'el': 0.4042961723450181,\n",
" 'ion': 2.532777594106803,\n",
" 'exc': 2.1099909880291814},\n",
" {'x': 13.2,\n",
" 'el': 0.40138800444100226,\n",
" 'ion': 2.515850481634202,\n",
" 'exc': 2.096211667888705},\n",
" {'x': 13.3,\n",
" 'el': 0.3985235761383543,\n",
" 'ion': 2.4991609792177183,\n",
" 'exc': 2.082623035581028},\n",
" {'x': 13.4,\n",
" 'el': 0.3957019086650494,\n",
" 'ion': 2.4827040190174023,\n",
" 'exc': 2.069221067622563},\n",
" {'x': 13.5,\n",
" 'el': 0.39292205223581,\n",
" 'ion': 2.466474677776929,\n",
" 'exc': 2.0560018543054204},\n",
" {'x': 13.6,\n",
" 'el': 0.39018308498692494,\n",
" 'ion': 2.4504681716713828,\n",
" 'exc': 2.042961595673853},\n",
" {'x': 13.7,\n",
" 'el': 0.3874841119576961,\n",
" 'ion': 2.434679851374739,\n",
" 'exc': 2.0300965976711156},\n",
" {'x': 13.8,\n",
" 'el': 0.3848242641161482,\n",
" 'ion': 2.419105197336177,\n",
" 'exc': 2.0174032684483527},\n",
" {'x': 13.9,\n",
" 'el': 0.3822026974267757,\n",
" 'ion': 2.403739815254919,\n",
" 'exc': 2.00487811482759},\n",
" {'x': 14.0,\n",
" 'el': 0.3796185919582249,\n",
" 'ion': 2.3885794317439313,\n",
" 'exc': 1.9925177389113418},\n",
" {'x': 14.1,\n",
" 'el': 0.3770711510289289,\n",
" 'ion': 2.373619890173301,\n",
" 'exc': 1.9803188348317768},\n",
" {'x': 14.2,\n",
" 'el': 0.3745596003888268,\n",
" 'ion': 2.358857146684646,\n",
" 'exc': 1.9682781856327505},\n",
" {'x': 14.3,\n",
" 'el': 0.3720831874354002,\n",
" 'ion': 2.3442872663683785,\n",
" 'exc': 1.9563926602783916},\n",
" {'x': 14.4,\n",
" 'el': 0.36964118046236066,\n",
" 'ion': 2.32990641959609,\n",
" 'exc': 1.9446592107822769},\n",
" {'x': 14.5,\n",
" 'el': 0.36723286793941123,\n",
" 'ion': 2.315710878500726,\n",
" 'exc': 1.9330748694515214},\n",
" {'x': 14.6,\n",
" 'el': 0.3648575578215951,\n",
" 'ion': 2.3016970135976464,\n",
" 'exc': 1.9216367462404509},\n",
" {'x': 14.7,\n",
" 'el': 0.36251457688682004,\n",
" 'ion': 2.287861290540006,\n",
" 'exc': 1.910342026208781},\n",
" {'x': 14.8,\n",
" 'el': 0.3602032701002296,\n",
" 'ion': 2.274200267002247,\n",
" 'exc': 1.8991879670794969},\n",
" {'x': 14.9,\n",
" 'el': 0.357923000004158,\n",
" 'ion': 2.26071058968582,\n",
" 'exc': 1.8881718968918926},\n",
" {'x': 15.0,\n",
" 'el': 0.3556731461324769,\n",
" 'ion': 2.2473889914415754,\n",
" 'exc': 1.8772912117454528},\n",
" {'x': 15.1,\n",
" 'el': 0.353453104448203,\n",
" 'ion': 2.234232288503513,\n",
" 'exc': 1.8665433736304802},\n",
" {'x': 15.2,\n",
" 'el': 0.35126228680329497,\n",
" 'ion': 2.221237377828907,\n",
" 'exc': 1.8559259083415982},\n",
" {'x': 15.3,\n",
" 'el': 0.3491001204196282,\n",
" 'ion': 2.2084012345400286,\n",
" 'exc': 1.845436403470438},\n",
" {'x': 15.4,\n",
" 'el': 0.3469660473901797,\n",
" 'ion': 2.1957209094629615,\n",
" 'exc': 1.835072506474014},\n",
" {'x': 15.5,\n",
" 'el': 0.3448595241995173,\n",
" 'ion': 2.1831935267592297,\n",
" 'exc': 1.824831922815469},\n",
" {'x': 15.6,\n",
" 'el': 0.3427800212627204,\n",
" 'ion': 2.170816281646157,\n",
" 'exc': 1.8147124141740314},\n",
" {'x': 15.7,\n",
" 'el': 0.34072702248191666,\n",
" 'ion': 2.158586438202101,\n",
" 'exc': 1.8047117967211865},\n",
" {'x': 15.8,\n",
" 'el': 0.33870002481965195,\n",
" 'ion': 2.1465013272528792,\n",
" 'exc': 1.7948279394602165},\n",
" {'x': 15.9,\n",
" 'el': 0.3366985378883526,\n",
" 'ion': 2.134558344335901,\n",
" 'exc': 1.7850587626263867},\n",
" {'x': 16.0,\n",
" 'el': 0.33472208355517563,\n",
" 'ion': 2.122754947738674,\n",
" 'exc': 1.7754022361452126},\n",
" {'x': 16.1,\n",
" 'el': 0.33277019556158083,\n",
" 'ion': 2.111088656608532,\n",
" 'exc': 1.7658563781463463},\n",
" {'x': 16.2,\n",
" 'el': 0.33084241915698676,\n",
" 'ion': 2.0995570491305764,\n",
" 'exc': 1.7564192535307461},\n",
" {'x': 16.3,\n",
" 'el': 0.32893831074590485,\n",
" 'ion': 2.0881577607709536,\n",
" 'exc': 1.7470889725889123},\n",
" {'x': 16.4,\n",
" 'el': 0.3270574375479805,\n",
" 'ion': 2.0768884825827687,\n",
" 'exc': 1.7378636896680617},\n",
" {'x': 16.5,\n",
" 'el': 0.3251993772703896,\n",
" 'ion': 2.0657469595720115,\n",
" 'exc': 1.7287416018862318},\n",
" {'x': 16.6,\n",
" 'el': 0.32336371779207285,\n",
" 'ion': 2.054730989121034,\n",
" 'exc': 1.7197209478913829},\n",
" {'x': 16.7,\n",
" 'el': 0.3215500568593091,\n",
" 'ion': 2.043838419467228,\n",
" 'exc': 1.7108000066636726},\n",
" {'x': 16.8,\n",
" 'el': 0.31975800179215863,\n",
" 'ion': 2.0330671482346325,\n",
" 'exc': 1.7019770963591483},\n",
" {'x': 16.9,\n",
" 'el': 0.3179871692013229,\n",
" 'ion': 2.022415121016355,\n",
" 'exc': 1.693250573193194},\n",
" {'x': 17.0,\n",
" 'el': 0.3162371847149949,\n",
" 'ion': 2.011880330005736,\n",
" 'exc': 1.684618830362136},\n",
" {'x': 17.1,\n",
" 'el': 0.3145076827152896,\n",
" 'ion': 2.0014608126743285,\n",
" 'exc': 1.6760802970014965},\n",
" {'x': 17.2,\n",
" 'el': 0.31279830608386505,\n",
" 'ion': 1.991154650494809,\n",
" 'exc': 1.6676334371794341},\n",
" {'x': 17.3,\n",
" 'el': 0.31110870595636253,\n",
" 'ion': 1.9809599677070577,\n",
" 'exc': 1.6592767489239986},\n",
" {'x': 17.4,\n",
" 'el': 0.3094385414853119,\n",
" 'ion': 1.9708749301257074,\n",
" 'exc': 1.6510087632828718},\n",
" {'x': 17.5,\n",
" 'el': 0.3077874796111622,\n",
" 'ion': 1.9608977439875288,\n",
" 'exc': 1.6428280434143254},\n",
" {'x': 17.6,\n",
" 'el': 0.30615519484111486,\n",
" 'ion': 1.9510266548371218,\n",
" 'exc': 1.6347331837082066},\n",
" {'x': 17.7,\n",
" 'el': 0.3045413690354524,\n",
" 'ion': 1.9412599464494087,\n",
" 'exc': 1.6267228089357717},\n",
" {'x': 17.8,\n",
" 'el': 0.3029456912010658,\n",
" 'ion': 1.9315959397875393,\n",
" 'exc': 1.6187955734272899},\n",
" {'x': 17.9,\n",
" 'el': 0.3013678572919011,\n",
" 'ion': 1.9220329919948316,\n",
" 'exc': 1.6109501602763423},\n",
" {'x': 18.0,\n",
" 'el': 0.29980757001605496,\n",
" 'ion': 1.9125694954194674,\n",
" 'exc': 1.603185280569817},\n",
" {'x': 18.1,\n",
" 'el': 0.29826453864926233,\n",
" 'ion': 1.9032038766707016,\n",
" 'exc': 1.5954996726426307},\n",
" {'x': 18.2,\n",
" 'el': 0.29673847885453164,\n",
" 'ion': 1.8939345957053948,\n",
" 'exc': 1.5878921013562524},\n",
" {'x': 18.3,\n",
" 'el': 0.29522911250768985,\n",
" 'ion': 1.8847601449437406,\n",
" 'exc': 1.5803613574001418},\n",
" {'x': 18.4,\n",
" 'el': 0.2937361675286164,\n",
" 'ion': 1.8756790484131034,\n",
" 'exc': 1.5729062566152603},\n",
" {'x': 18.5,\n",
" 'el': 0.2922593777179467,\n",
" 'ion': 1.866689860918917,\n",
" 'exc': 1.565525639338836}]"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%%python\n",
"from beakerx.object import beakerx\n",
"import pandas as pd\n",
"beakerx.table"
]
},
{
"cell_type": "code",

File diff suppressed because one or more lines are too long