{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [],
   "source": [
    "# import useful packages\n",
    "from metabolabpy.nmr import nmrDataSet\n",
    "from matplotlib import pyplot as pl\n",
    "import numpy as np\n",
    "import os\n",
    "from jupyterthemes import jtplot\n",
    "jtplot.style()\n",
    "#%matplotlib notebook"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 23048 characters]",
      "text/plain": [
       "<Figure size 640x560 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# create NmrDataSet object, download sample spectrum, load into NmrDataSet object and plot\n",
    "nd = nmrDataSet.NmrDataSet()\n",
    "mlpy_file = os.path.join(os.getcwd(), \"sample_1d_spc.mlpy\")\n",
    "nd.load(mlpy_file)\n",
    "nd.set_standard_plot_colours()\n",
    "nd.keep_zoom = False\n",
    "nd.plot_spc()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "______________________________________________________________________________________\n",
      "\n",
      "MetaboLabPy NMR Data Set (ver. 0.8.12)\n",
      "______________________________________________________________________________________\n",
      "\n",
      " Number of data sets\t\t\t\t: 1\n",
      " Number of NMR spectra in current data set\t: 3\n",
      " Current data set/exp\t\t\t\t: 1/1\n",
      "______________________________________________________________________________________\n",
      "\n",
      "Current title file: \n",
      "1\n",
      "noesypr1d.jk H2O+D2O /opt/topspin3.0 byrnej {2  A1 - 201}\n",
      "\n"
     ]
    }
   ],
   "source": [
    "print(nd)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [],
   "source": [
    "nd.plot_spc()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [],
   "source": [
    "pl.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
