{
"metadata": {
"kernelspec": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"display_name": "IPython (Python 2)",
"language": "python",
"name": "python2"
},
"name": "",
"signature": "sha256:8ae04c848646baddd3d24bcee6087095ca8c39fbd26a67958503af40e0550cef"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Example Two-Dimensional Correlation Spectroscopy Pipeline"
]
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Objective"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We will demonstrate a faux pipeline that incorporates"
]
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Environment Setup"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Configure notebook style (see NBCONFIG.ipynb), add imports and paths. The **%run** magic used below **requires IPython 2.0 or higher.**"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"%run NBCONFIG.ipynb"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Populating the interactive namespace from numpy and matplotlib\n",
"['dti', 'd', 'h', 'm', 'us', 's', 'ms', 'intvl', 'ns']\n"
]
},
{
"html": [
""
],
"metadata": {},
"output_type": "display_data",
"text": [
""
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Load the builitin dataset from [1] that depicts solvent evaporation"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from pyuvvis.data import solvent_evap\n",
"\n",
"help(solvent_evap)"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Help on function solvent_evap in module pyuvvis.data:\n",
"\n",
"solvent_evap(*args, **kwargs)\n",
" Model solvent evaporation dataset graciously shared by Dr. Isao Noda;\n",
" used in his 2004 book Two-Dimensional Correlation Spectroscopy. From \n",
" page 47:\n",
" \n",
" 'The system described here is a three-component solution mixture of \n",
" polystyrene (PS) dissolved in a 50:50 blblend of metyl etyl ketone (MEK) and\n",
" perdeuterated tolune. The initial concentration of PS is about 1.0wt%.\n",
" Once the solution mixture is exposed to the open atmosphere, the solvents \n",
" start evaporating, and the PS concentraiton increases with time. However,\n",
" due to the substantial difference in the volatility of MEK and toluene \n",
" coupled with their slightly dissimilar affinity to PS, the composition of\n",
" the solution mixture changes as a function of time in a rather complex \n",
" manner during hte spontaneous evaporation process. \n",
" \n",
" The transient IR spectra were collected as the two solvents evaporated, \n",
" eventually leaving a PS film behind, as shown schematically in Figure 4.1\n",
" (A). The measurement was actually made using a horizontal attenuated total \n",
" reflectance (ATR) prism. \n",
" \n",
" ...\n",
" \n",
" As expected, the intensities of bands at 2980 and 1720 cm-1 due to violatile\n",
" MEK and those of bands at 2275 and 820cm-1 assigned to perdeuterated toluene\n",
" gradually decrease, while those of PS bands at 3020 and 1450cm-1 increase \n",
" with time.'\n",
"\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 4,
"metadata": {},
"source": [
"Plot the data, and denote time through a [Two-channel colormap](http://wiki.scipy.org/Cookbook/Matplotlib/Show_colormaps)"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"ts = solvent_evap()\n",
"ts.plot(cbar=True, colormap='cool_r');"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stderr",
"text": [
"WARNING:pyuvvis.core.spectra:Spectrum does not have subtracted baseline; could affect result in specious absorbance data.\n"
]
},
{
"metadata": {},
"output_type": "display_data",
"svg": [
"\n",
"\n",
"\n",
"