{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "run_control": {
     "frozen": false,
     "read_only": false
    }
   },
   "outputs": [],
   "source": [
    "root_folder = os.path.dirname(os.getcwd())\n",
    "sys.path.append(root_folder)\n",
    "import NeuNorm as neunorm\n",
    "from NeuNorm.normalization import Normalization\n",
    "from NeuNorm.roi import ROI"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# data\n",
    "\n",
    "file_1 = '/Volumes/my_book_thunderbolt_duo/IPTS/IPTS-16259/MS-19/20170906_MS-19(2)_0000_0440.tiff'\n",
    "file_2 = '/Volumes/my_book_thunderbolt_duo/IPTS/IPTS-16259/MS-19/20170906_MS-19(2)_0000_0441.tiff'\n",
    "file_3 = '/Volumes/my_book_thunderbolt_duo/IPTS/IPTS-16259/MS-19/20170906_MS-19(2)_0000_0442.tiff'\n",
    "file_4 = '/Volumes/my_book_thunderbolt_duo/IPTS/IPTS-16259/MS-19/20170906_MS-19(2)_0000_0443.tiff'\n",
    "file_5 = '/Volumes/my_book_thunderbolt_duo/IPTS/IPTS-16259/MS-19/20170906_MS-19(2)_0000_0444.tiff'\n",
    "file_6 = '/Volumes/my_book_thunderbolt_duo/IPTS/IPTS-16259/MS-19/20170906_MS-19(2)_0000_0445.tiff'\n",
    "data = [file_1, file_2, file_3, file_4, file_5, file_6]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# ob\n",
    "\n",
    "ob_1 = '/Volumes/my_book_thunderbolt_duo/IPTS/IPTS-16259/OB/20170906_MS-19(2)_0000_0400.tiff'\n",
    "ob_2 = '/Volumes/my_book_thunderbolt_duo/IPTS/IPTS-16259/OB/20170906_MS-19(2)_0000_0401.tiff'\n",
    "ob_3 = '/Volumes/my_book_thunderbolt_duo/IPTS/IPTS-16259/OB/20170906_MS-19(2)_0000_0402.tiff'\n",
    "ob = [ob_1, ob_2, ob_3]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# df\n",
    "\n",
    "df_1 = '/Volumes/my_book_thunderbolt_duo/IPTS/IPTS-16259/df/20171027_DF_0000_0020.tiff'\n",
    "df_2 = '/Volumes/my_book_thunderbolt_duo/IPTS/IPTS-16259/df/20171027_DF_0000_0021.tiff'\n",
    "df_3 = '/Volumes/my_book_thunderbolt_duo/IPTS/IPTS-16259/df/20171027_DF_0000_0022.tiff'\n",
    "df = [df_1, df_2, df_3]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "o_norm = Normalization()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "o_norm.load(file=data)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "o_norm.load(file=ob, data_type='ob')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "o_norm.load(file=df, data_type='df')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "roi1 = ROI(x0=0, y0=0, x1=100, y1=100)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "o_norm.normalization(roi=roi1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "len(o_norm.data['sample']['data'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "len(o_norm.data['normalized'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "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.6.2"
  },
  "toc": {
   "colors": {
    "hover_highlight": "#DAA520",
    "running_highlight": "#FF0000",
    "selected_highlight": "#FFD700"
   },
   "moveMenuLeft": true,
   "nav_menu": {
    "height": "12px",
    "width": "252px"
   },
   "navigate_menu": true,
   "number_sections": true,
   "sideBar": true,
   "threshold": 4,
   "toc_cell": false,
   "toc_section_display": "block",
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
