{ "cells": [ { "cell_type": "code", "execution_count": 2, "metadata": { "ExecuteTime": { "end_time": "2018-12-23T15:38:53.675876Z", "start_time": "2018-12-23T15:38:53.616738Z" } }, "outputs": [], "source": [ "%reload_ext autoreload\n", "%autoreload 2\n", "import warnings\n", "warnings.filterwarnings(\"ignore\",category =RuntimeWarning)\n", "import numpy as np\n", "import de2 as de\n", "import multiprocessing as mp\n", "import makeqx as mkq\n", "import oldqx as oqx\n", "\n", "\n", "def rndtop5(x):\n", " return np.round(x*2.0)/2\n", "\n", "def tmm_wrapper2(arg):\n", " args, kwargs = arg\n", " return oqx.tmm_eval_wsweep(*args, **kwargs)\n", "\n", "def arc_par(pop, **kwargs):\n", " jobs = []\n", " pool=mp.Pool(90)\n", " for indiv in pop:\n", " #indiv = indiv.reshape((int(indiv.size/2), 2))\n", " #indiv[:,1] = mkq.digitize_qx(indiv[:,1], dlevels=2)\n", " indiv = rndtop5(indiv)\n", " #indiv = indiv.flatten()\n", " jobs.append((indiv, 0))\n", " arg = [(j, kwargs) for j in jobs]\n", " answ = np.array(pool.map(tmm_wrapper2, arg))\n", " pool.close()\n", " return answ\n", "\n", "\n" ] }, { "cell_type": "code", "execution_count": 35, "metadata": { "ExecuteTime": { "end_time": "2018-12-23T19:14:28.407811Z", "start_time": "2018-12-23T18:48:13.609264Z" } }, "outputs": [], "source": [ "dataset_size = 200000\n", "\n", "# parameters of the dataset\n", "num_layers = 16\n", "num_lpoints = 128\n", "# lam_min = 400.0\n", "# lam_max = 800.0\n", "d_min = 0.5\n", "d_max = 100\n", "\n", "lam_min = 400.0 # this is lam/d\n", "lam_max = 800.0 # this is lam/d\n", "\n", "lams = np.linspace(lam_min, lam_max, endpoint=True, num=num_lpoints)\n", "# lam_inv = np.linspace(1/lam_min, 1/lam_max, num=num_lpoints, endpoint=True)\n", "# lams = 1.0/lam_inv\n", "\n", "\n", "#lams = np.linspace(lam_low, lam_high, endpoint=True, num=lam_pts)\n", "#lam_inv = np.linspace(1/400.0, 1/800.0, num=num_lpoints, endpoint=True)\n", "#lams = 1.0/lam_inv\n", "dataset_X = np.random.uniform(0,1,num_layers*dataset_size).astype(float).reshape(dataset_size, num_layers)\n", "\n", "# for ds in dataset_X:\n", "# ds = ds/np.sum(ds)\n", "\n", "#lams = np.linspace(lam_min, lam_max, num_lpoints, endpoint=True)\n", "dataset_Y = np.zeros((dataset_size,num_lpoints))\n", "\n", "dataset_Y = arc_par( d_min + (d_max - d_min)*dataset_X, lam_low=lam_min, lam_high=lam_max, lam_pts = num_lpoints)" ] }, { "cell_type": "code", "execution_count": 56, "metadata": { "ExecuteTime": { "end_time": "2018-12-23T19:19:42.741175Z", "start_time": "2018-12-23T19:19:42.609535Z" } }, "outputs": [ { "data": { "text/plain": [ "(0, 100)" ] }, "execution_count": 56, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZwAAAFWCAYAAABdMivrAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3XlwnOWB5/Hv0y2pdZ+WZUm28W1sbIwPTMDYMcSYcARIQg4m2WxSE2Z2yO7UTJLdqd1NpWaqdicztZvJbGqLZZIwCUlIIJmEAAFjjMH4AGyML4zvQ5ZlWbKsW2p1S+p+9o/XFhhsyXZ3v4f0+1S5kPttve9Pr4R+ft/3eZ/X3LTiHouIiEiGhbwOICIiY4MKR0REXKHCERERV6hwRETEFSocERFxhQpHRERcocIRERFXZF3OmxbfeAvzb1jM+KpqTjXU8+TPHhtalp2Tw133fpaZs+eSGBxk185tbHhlzWUvFxGRsSE88ZpZfzvSm4pLSmior6Ors4PiklLe3bV9aNld936GwsIifvGvj/Lunne4bdXdADSeOnlZy0VEZGy4rFNqB/fv5eD+vfT2dl/welZ2NtfNX8iGV18iFuujs6OdrVteZ8HCpZe1XERExo7LOqV2KeUVlYTDYZqbGodeazrdQOX4KowxIy639uKz6uTmFzI40J9KNBERSZOs7Bxi0Z7U15PKJ0dyIgwMDGCTyaHXYrEYoVCYrOzsEZcP9H+0VHLzC7n7M19LJZaIiKTZi7//acqlk1LhxPvjZGdnY0KhoVLJzc0lmUwwODAw4vKLOX9k89KzP2egP55KPFeYUIiaa2bTeOLgBcXqZ8qceUHLC8rshqDlBcjOifDJ+7+SlrNOKRVOW2sLiUSCqqpqmk6fAqCqupazLWew1o64fDgD/XEG4rFU4rnChEIkEgkG4rHA/AApc+YFLS8osxuCljfdLmvQgAmFCGdlEQqFMcY4H4fDDA4M8N67O/n47Z8kkptLSWkZN93ycXbt2Aow4nIRERk7LusI59YVn2D5ytVDf/+b73yPE3VHefJnj7FuzXN88t7P8B//+r+TSCTYtWMr27duGXrvSMtFRGRsuKzC2bRhHZs2rLvosv7+OM/9/teX/NyRlouIyNigqW1ERMQVKhwREXGFCkdERFyhwhEREVeocERExBUqHBERcYUKR0REXKHCERERV6hwRETEFSocERFxhQpHRERcocIRERFXqHBERMQVKhwREXGFCkdERFyhwhEREVeocERExBUqHBERcYUKR0REXKHCERERV6hwRETEFSocERFxhQpHRERcocIRERFXqHBERMQVKhwREXGFCkdERFyhwhEREVeocERExBUqHBERcYUKR0REXKHCERERV6hwRETEFSocERFxhQpHRERcocIRERFXqHBERMQVKhwREXGFCkdERFyhwhEREVeocERExBUqHBERcYUKR0REXKHCERERV6hwRETEFSocERFxhQpHRERcocIRERFXqHBERMQVKhwREXGFCkdERFyRlY6VFBYVs/quB5g8ZRoADfV1rH3xGbq7OjGhEKtW38u8BYsxxnBg3x7WvvAMiUQiHZsWEZGASMsRzp33fJpQOMSj//w9/u8P/icDA/3c/akHAVi2/HYmT5nOjx/9Po/98B8ZVzmBlavuTsdmRUQkQNJSOGVlFezfu5v+/jiDAwPs3bODyqoJACxYtJQtG1+hp7uLaLSXTRte5vobloAx6di0iIgERFpOqW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kKex/bzcLFi1l/drn6el2Huy1acPLPPDgl1j/8h/BXnpIrgmFMCH/n/E7n9GLrCZ2Blv3B5JT7ofsAkzT5o90iTUh7PQHwYQJHXsKY6ynma9W0DIHLS8osxuClhfSmzXlwvkwEwoxcfJU3tqygUhuLiUlZTSdbhxa3nz6FHl5+RQXl9DV2XHJ9dRcMztQp91qp871bNux6DbOVH+M/HGTKYrXkZ3sAgzR7Gq6ItNJmBwm9Gwma8rMCz7Py8xXK2iZg5YXlNkNQcobDofTtq60F87qu+4nHovx7u53KCgoBCAe7xtaHos5H0ciw98t33jiIAPxWLrjpZ0JhaidOpdTx/dhk949T8bkHaBn8ifpKVwBiRgkByGUhWnZiTmznabBXt9lvhJByxy0vKDMbghaXoDsSC6LltyalnWltXA+sfpeJk2eypNPPEYykaC/Pw5AJJJHXzQKQG6uc8NiPB4fdl02mQzMNwR8kLf3NKH9P3WmvSmcDOEIdBzAJJ17bS528tLzzFchaJmDlheU2Q1BypvOnGkrnFWfvI8pU2fwqyf+Zahc4rEYnZ3tVE2ooaPded5KVXUtfX1Ruro607Vp+QCTiEPnYa9jiIh8RFquBt1x1/1MnTaTXz3xL0SjvRcs271jG8tW3E5hUTH5+QUsX3kHe3ZtH3bAgIiIjD4pH+EUl5Ry4023Mjg4wCN/9V+HXj954jhPP/k4Wza9Sl5+AQ8/8q2h+3A2rB/5vhERERldUi6crs4O/v5v//Mll9tkknVrnmXdmmdT3ZSIiARYcAaDi4hIoKlwRETEFSocERFxhQpHRERcocIRERFXqHBERMQVKhwREXGFCkdERFyhwhEREVeocERExBUqHBERcYUKR0REXKHCERERV6hwRETEFSocERFxhQpHRERcocIRERFXqHBERMQVKhwREXGFCkdERFyhwhEREVeocERExBUqHBERcYUKR0REXKHCERERV6hwRETEFSocERFxhQpHRERcocIRERFXqHBERMQVKhwREXGFCkdERFyhwhEREVeocERExBUqHBERcYUKR0REXKHCERERV6hwRETEFSocERFxhQpHRERcocIRERFXqHBERMQVKhwREXGFCkdERFyh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By8rOVeZP7y1/6C8VXVhEIhurs62b3zbd564/Whne1F5lQz+TGzH/czxnDbJ+5iwcIbwRga6ut4ec0f6Ors8OU+HimzL/cxcNsd91BbO4lf/uyxj345PtzPw+X16z4eVzmeVXfex4SaiRhjaG5qZP3a52luaszIPtZMAyIi4gpX78MREZGxS4UjIiKuUOGIiIgrVDgiIuIKFY6IiLhChSMiIq5Q4YiIiCtUOCIi4goVjoiIuOL/AzSwPrcwFRCaAAAAAElFTkSuQmCC\n", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import numpy as np\n", "import matplotlib.pyplot as plt\n", "from jupyterthemes import jtplot\n", "# currently installed theme will be used to\n", "# set plot style if no arguments provided\n", "jtplot.style()\n", "\n", "#plt.plot(dataset_Y[ 0 ])\n", "plt.plot(lams, dataset_Y[ np.random.randint(0, 1000) ])\n", "\n", "plt.xlim([400,800])\n", "plt.ylim([0, 100])" ] }, { "cell_type": "code", "execution_count": 57, "metadata": { "ExecuteTime": { "end_time": "2018-12-23T19:20:21.693949Z", "start_time": "2018-12-23T19:20:21.551102Z" } }, "outputs": [], "source": [ "import h5py\n", "h5f = h5py.File('./datasets/s16_d_siti_2.h5', 'w')\n", "h5f.create_dataset('sizes', data=dataset_X)\n", "h5f.create_dataset('spectrum', data=dataset_Y)\n", "h5f.close()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "ExecuteTime": { "end_time": "2018-12-23T13:34:10.538963Z", "start_time": "2018-12-23T13:34:10.522776Z" } }, "outputs": [], "source": [ "dataset_X.shape" ] }, { "cell_type": "code", "execution_count": 34, "metadata": { "ExecuteTime": { "end_time": "2018-12-23T16:40:22.352387Z", "start_time": "2018-12-23T16:40:22.337616Z" } }, "outputs": [ { "data": { "text/plain": [ "array([400. , 403.1496063 , 406.2992126 , 409.4488189 ,\n", " 412.5984252 , 415.7480315 , 418.8976378 , 422.04724409,\n", " 425.19685039, 428.34645669, 431.49606299, 434.64566929,\n", " 437.79527559, 440.94488189, 444.09448819, 447.24409449,\n", " 450.39370079, 453.54330709, 456.69291339, 459.84251969,\n", " 462.99212598, 466.14173228, 469.29133858, 472.44094488,\n", " 475.59055118, 478.74015748, 481.88976378, 485.03937008,\n", " 488.18897638, 491.33858268, 494.48818898, 497.63779528,\n", " 500.78740157, 503.93700787, 507.08661417, 510.23622047,\n", " 513.38582677, 516.53543307, 519.68503937, 522.83464567,\n", " 525.98425197, 529.13385827, 532.28346457, 535.43307087,\n", " 538.58267717, 541.73228346, 544.88188976, 548.03149606,\n", " 551.18110236, 554.33070866, 557.48031496, 560.62992126,\n", " 563.77952756, 566.92913386, 570.07874016, 573.22834646,\n", " 576.37795276, 579.52755906, 582.67716535, 585.82677165,\n", " 588.97637795, 592.12598425, 595.27559055, 598.42519685,\n", " 601.57480315, 604.72440945, 607.87401575, 611.02362205,\n", " 614.17322835, 617.32283465, 620.47244094, 623.62204724,\n", " 626.77165354, 629.92125984, 633.07086614, 636.22047244,\n", " 639.37007874, 642.51968504, 645.66929134, 648.81889764,\n", " 651.96850394, 655.11811024, 658.26771654, 661.41732283,\n", " 664.56692913, 667.71653543, 670.86614173, 674.01574803,\n", " 677.16535433, 680.31496063, 683.46456693, 686.61417323,\n", " 689.76377953, 692.91338583, 696.06299213, 699.21259843,\n", " 702.36220472, 705.51181102, 708.66141732, 711.81102362,\n", " 714.96062992, 718.11023622, 721.25984252, 724.40944882,\n", " 727.55905512, 730.70866142, 733.85826772, 737.00787402,\n", " 740.15748031, 743.30708661, 746.45669291, 749.60629921,\n", " 752.75590551, 755.90551181, 759.05511811, 762.20472441,\n", " 765.35433071, 768.50393701, 771.65354331, 774.80314961,\n", " 777.95275591, 781.1023622 , 784.2519685 , 787.4015748 ,\n", " 790.5511811 , 793.7007874 , 796.8503937 , 800. ])" ] }, "execution_count": 34, "metadata": {}, "output_type": "execute_result" } ], "source": [ "lams" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "hide_input": false, "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.7.0" }, "varInspector": { "cols": { "lenName": 16, "lenType": 16, "lenVar": 40 }, "kernels_config": { "python": { "delete_cmd_postfix": "", "delete_cmd_prefix": "del ", "library": "var_list.py", "varRefreshCmd": "print(var_dic_list())" }, "r": { "delete_cmd_postfix": ") ", "delete_cmd_prefix": "rm(", "library": "var_list.r", "varRefreshCmd": "cat(var_dic_list()) " } }, "types_to_exclude": [ "module", "function", "builtin_function_or_method", "instance", "_Feature" ], "window_display": false } }, "nbformat": 4, "nbformat_minor": 2 }