{
  "nbformat_minor": 0, 
  "nbformat": 4, 
  "cells": [
    {
      "execution_count": null, 
      "cell_type": "code", 
      "source": [
        "%matplotlib inline"
      ], 
      "outputs": [], 
      "metadata": {
        "collapsed": false
      }
    }, 
    {
      "source": [
        "\n# Read multiple files using regular expression\n\n\nThis example shows how to read several SPC files which are located inside a\nfolder.\n\n\n"
      ], 
      "cell_type": "markdown", 
      "metadata": {}
    }, 
    {
      "execution_count": null, 
      "cell_type": "code", 
      "source": [
        "# Authors: Guillaume Lemaitre <guillaume.lemaire@inria.fr>\n# License: BSD3\n\nfrom __future__ import print_function\n\nimport os\nimport sys\n\nimport matplotlib.pyplot as plt\n\nfrom specio import specread\n\nprint(__doc__)\n\n# Get the path to the data relatively to this example\nDATA_PATH = os.path.dirname(sys.argv[0])\n\nspc_filenames = os.path.join(DATA_PATH, 'data', '*.spc')\nprint('The SPC files will be search in: {}'.format(spc_filenames))\n\n# Read the data\nspectra = specread(spc_filenames)\n\n# Plot the first spectra\nplt.plot(spectra.wavelength,\n         spectra.amplitudes.T)\n\n# We get the axis information by using the meta data of the first file read.\nplt.xlabel(spectra.meta[0]['xlabel'])\nplt.ylabel(spectra.meta[0]['ylabel'])\nplt.show()"
      ], 
      "outputs": [], 
      "metadata": {
        "collapsed": false
      }
    }
  ], 
  "metadata": {
    "kernelspec": {
      "display_name": "Python 2", 
      "name": "python2", 
      "language": "python"
    }, 
    "language_info": {
      "mimetype": "text/x-python", 
      "nbconvert_exporter": "python", 
      "name": "python", 
      "file_extension": ".py", 
      "version": "2.7.12", 
      "pygments_lexer": "ipython2", 
      "codemirror_mode": {
        "version": 2, 
        "name": "ipython"
      }
    }
  }
}