Commit a017ce30 authored by payno's avatar payno

simplify tutorial and remove the usage of plot

parent caaf6fd5
......@@ -127,24 +127,6 @@
"output should be"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%gui qt\n",
"from silx.gui.plot import Plot1D\n",
"\n",
"plotNorm = Plot1D()\n",
"plotNorm.addCurve(ddict_norm[\"NormalizedEnergy\"],\n",
" ddict_norm[\"NormalizedMu\"],\n",
" legend=\"Mu\",\n",
" yaxis=\"right\")\n",
"plotNorm.setWindowTitle('normalization')\n",
"plotNorm.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
......@@ -166,19 +148,6 @@
"print(ddict_pe)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"plotPostEdge = Plot1D()\n",
"plotPostEdge.addCurve(ddict_pe[\"NormalizedEnergy\"],\n",
" ddict_pe[\"NormalizedSignal\"], legend=\"Mu\")\n",
"plotPostEdge.setWindowTitle('post edge')\n",
"plotPostEdge.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
......@@ -211,30 +180,6 @@
"ddict = pymca_xas.fourierTransform(k=kValues, mu=mu, kMin=None, kMax=None)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"plotFT = Plot1D()\n",
"plotFT.addCurve(ddict[\"FTRadius\"],\n",
" ddict[\"FTIntensity\"],\n",
" legend=\"FT Intensity\",\n",
" xlabel=\"R (Angstrom)\",\n",
" ylabel=\"Arbitrary Units\")\n",
"plotFT.setActiveCurve(\"FT Intensity\")\n",
"plotFT.addCurve(ddict[\"FTRadius\"],\n",
" ddict[\"FTImaginary\"],\n",
" legend=\"FT Imaginary\",\n",
" xlabel=\"R (Angstrom)\",\n",
" ylabel=\"Arbitrary Units\",\n",
" color=\"red\")\n",
"\n",
"plotFT.setWindowTitle('Fourier transform')\n",
"plotFT.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
......@@ -298,8 +243,8 @@
"outputs": [],
"source": [
"from xas.core.process.normalization import pymca_normalization\n",
"spectrum = pymca_normalization(xas_obj.copy())\n",
"assert 'NormalizedMu' in spectrum"
"xas_obj = pymca_normalization(xas_obj.copy())\n",
"assert 'NormalizedMu' in xas_obj.spectrum"
]
},
{
......@@ -316,8 +261,8 @@
"outputs": [],
"source": [
"from xas.core.process.exafs import pymca_exafs\n",
"spectrum = pymca_exafs(xas_obj.copy())\n",
"assert 'PostEdgeB' in spectrum"
"xas_obj = pymca_exafs(xas_obj.copy())\n",
"assert 'PostEdgeB' in xas_obj.spectrum"
]
},
{
......@@ -337,8 +282,8 @@
"l_xas_obj = xas_obj.copy()\n",
"l_xas_obj.configuration['SET_KWEIGHT'] = 1\n",
"\n",
"spectrum = pymca_k_weight(l_xas_obj)\n",
"assert spectrum['KWeight'] == 1"
"xas_obj = pymca_k_weight(l_xas_obj)\n",
"assert xas_obj.spectrum['KWeight'] == 1"
]
},
{
......@@ -355,8 +300,8 @@
"outputs": [],
"source": [
"from xas.core.process.ft import pymca_ft\n",
"spectrum = pymca_ft(xas_obj.copy())\n",
"assert 'FTRadius' in spectrum"
"xas_obj = pymca_ft(xas_obj.copy())\n",
"assert 'FTRadius' in xas_obj.spectrum['FT']"
]
},
{
......@@ -425,7 +370,7 @@
"data_file = os.path.join(PYMCA_DATA_DIR, \"EXAFS_Cu.dat\")\n",
"out = exec_workflow(scheme=scheme, input_=data_file)\n",
"assert isinstance(out, dict)\n",
"assert 'FTRadius' in out['FT']"
"assert 'FTRadius' in out['spectrum']['FT']"
]
},
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment