{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Populating the interactive namespace from numpy and matplotlib\n",
"['dti', 'd', 'h', 'm', 'us', 's', 'ms', 'intvl', 'ns']\n"
]
},
{
"data": {
"text/html": [
""
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Populating the interactive namespace from numpy and matplotlib\n"
]
}
],
"source": [
"%run 'NBCONFIG.ipynb'\n",
"%pylab inline"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### RUN THE GUI"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"WARNING:skspec.core.spectra:Spectrum does not have subtracted baseline; could affect result in specious absorbance data.\n"
]
},
{
"data": {
"text/html": [
""
],
"text/plain": [
""
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from skspec.data import aunps_water, aunps_glass\n",
"from skspec.interact import SpectraGui\n",
"from skspec.interact import SpectraModel\n",
"\n",
"testspectra = aunps_glass().as_varunit('s')\n",
"test2 = aunps_water()\n",
"testspectra.reference = 0\n",
"\n",
"specmodel = SpectraModel(spec=testspectra) #I can initialize/set traits here\n",
"\n",
"gui = SpectraGui(model=specmodel)\n",
"gui.tight_layout()"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"gui"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "IPython (Python 2)",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"mimetype": "text/x-python",
"name": "python",
"pygments_lexer": "ipython2"
},
"signature": "sha256:ad9f3570529d08953e7609fc0855a9fefd4ee0283c1910e20238ee685fbd548e"
},
"nbformat": 4,
"nbformat_minor": 0
}