456 lines
97 KiB
Plaintext
456 lines
97 KiB
Plaintext
|
{
|
|||
|
"cells": [
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 19,
|
|||
|
"metadata": {},
|
|||
|
"outputs": [],
|
|||
|
"source": [
|
|||
|
"examples_dir = '/home/mmn/repo/qpms-article/lepaper/figs/examples/' # prefix where the data is located"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 78,
|
|||
|
"metadata": {},
|
|||
|
"outputs": [],
|
|||
|
"source": [
|
|||
|
"from matplotlib import pyplot as plt\n",
|
|||
|
"from scipy.constants import elementary_charge, hbar\n",
|
|||
|
"from scipy.interpolate import griddata\n",
|
|||
|
"eh = elementary_charge/hbar\n",
|
|||
|
"import numpy as np\n",
|
|||
|
"import os\n",
|
|||
|
"import glob\n",
|
|||
|
"import matplotlib\n",
|
|||
|
"matplotlib.use('pdf')\n",
|
|||
|
"\n",
|
|||
|
"D4h_irlabels = {\"B2''\":\"$B_2''$\",\n",
|
|||
|
" \"B2'\":\"$B_2'$\",\n",
|
|||
|
" \"A1''\":\"$A_1''$\",\n",
|
|||
|
" \"A1'\":\"$A_1'$\",\n",
|
|||
|
" \"A2''\":\"$A_2''$\",\n",
|
|||
|
" \"B1''\":\"$B_1''$\",\n",
|
|||
|
" \"A2'\":\"$A_2'$\", \n",
|
|||
|
" \"B1'\":\"$B_1'$\",\n",
|
|||
|
" \"E'\":\"$E'$\",\n",
|
|||
|
" \"E''\":\"$E''$\",}\n",
|
|||
|
"\n"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 21,
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"data": {
|
|||
|
"text/plain": [
|
|||
|
"['/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/cyl_r30nm_h30nm_p375nmx375nm_20x20_mAg_bg1.52_φ0π_θ(-0.025_0.025)π_ψ0.5π_χ0π_f2.15eV_L3.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/cyl_r30nm_h30nm_p375nmx375nm_mAg_bg1.52_φ0_θ(-0.0075_0.0075)π_ψ0π_χ0π_f2.11–2.23eV_L3.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/inf_big_px.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/cyl_r30nm_h30nm_p375nmx375nm_mAg_bg1.52_φ0_θ(-0.025_0.025)π_ψ0.5π_χ0π_f2.15eV_L3.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/cyl_r30nm_h30nm_p375nmx375nm_50x50_mAg_bg1.52_φ0π_θ(-0.025_0.025)π_ψ0.5π_χ0π_f2.15eV_L2.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/cyl_r30nm_h30nm_p375nmx375nm_40x40_mAg_bg1.52_φ0π_θ(-0.025_0.025)π_ψ0π_χ0π_f2.15eV_L2.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/cyl_r30nm_h30nm_p375nmx375nm_mAg_bg1.52_φ0_θ(-0.075_0.075)π_ψ0π_χ0π_f2.11–2.23eV_L3.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/cyl_r30nm_h30nm_p375nmx375nm_mAg_bg1.52_φ0_θ(-0.025_0.025)π_ψ0π_χ0π_f2.15eV_L2.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/cyl_r30nm_h30nm_p375nmx375nm_70x70_mAg_bg1.52_φ0π_θ(-0.025_0.025)π_ψ0π_χ0π_f2.15eV_L2.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/40x400.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/cyl_r30nm_h30nm_p375nmx375nm_50x50_mAg_bg1.52_φ0π_θ(-0.025_0.025)π_ψ0π_χ0π_f2.15eV_L2.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/cyl_r30nm_h30nm_p375nmx375nm_20x20_mAg_bg1.52_φ0π_θ(-0.0025_0.0025)π_ψ0.5π_χ0π_f2.19eV_L3.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/40x401.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/cyl_r30nm_h30nm_p375nmx375nm_mAg_bg1.52_φ0_θ(-0.025_0.025)π_ψ0.5π_χ0π_f2.15eV_L2.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/cyl_r30nm_h30nm_p375nmx375nm_20x20_mAg_bg1.52_φ0π_θ(-0.0025_0.0025)π_ψ0.5π_χ0π_f2.15eV_L3.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/30x30_psi0.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/cyl_r30nm_h30nm_p375nmx375nm_40x40_mAg_bg1.52_φ0π_θ(-0.025_0.025)π_ψ0.5π_χ0π_f2.15eV_L3.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/cyl_r30nm_h30nm_p375nmx375nm_20x20_mAg_bg1.52_φ0π_θ(-0.0025_0.0025)π_ψ0π_χ0π_f2.15eV_L3.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/cyl_r30nm_h30nm_p375nmx375nm_20x20_mAg_bg1.52_φ0π_θ(-0.0025_0.0025)π_ψ0π_χ0π_f2.19eV_L3.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/cyl_r30nm_h30nm_p375nmx375nm_20x20_mAg_bg1.52_φ0π_θ(-0.025_0.025)π_ψ0.5π_χ0π_f2.16eV_L3.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/30x30_psi1.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/cyl_r30nm_h30nm_p375nmx375nm_40x40_mAg_bg1.52_φ0π_θ(-0.025_0.025)π_ψ0.5π_χ0π_f2.15eV_L2.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/inf.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/40x40_psi1.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/cyl_r30nm_h30nm_p375nmx375nm_mAg_bg1.52_φ0_θ(-0.075_0.075)π_ψ0.5π_χ0π_f2.11–2.23eV_L3.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/cyl_r30nm_h30nm_p375nmx375nm_mAg_bg1.52_φ0_θ(-0.0025_0.0025)π_ψ0.5π_χ0π_f2.15eV_L3.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/cyl_r30nm_h30nm_p375nmx375nm_mAg_bg1.52_φ0_θ(-0.0075_0.0075)π_ψ0.5π_χ0π_f2.11–2.23eV_L3.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/cyl_r30nm_h30nm_p375nmx375nm_mAg_bg1.52_φ0_θ(-0.025_0.025)π_ψ0π_χ0π_f2.15eV_L3.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/cyl_r30nm_h30nm_p375nmx375nm_40x40_mAg_bg1.52_φ0π_θ(-0.025_0.025)π_ψ0π_χ0π_f2.15eV_L3.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/5x5.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/cyl_r30nm_h30nm_p375nmx375nm_20x20_mAg_bg1.52_φ0π_θ(-0.025_0.025)π_ψ0π_χ0π_f2.15eV_L3.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/cyl_r30nm_h30nm_p375nmx375nm_70x70_mAg_bg1.52_φ0π_θ(-0.025_0.025)π_ψ0.5π_χ0π_f2.15eV_L2.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/100x100.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/140x100.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/40x40_psi0.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/cyl_r30nm_h30nm_p375nmx375nm_mAg_bg1.52_φ0_θ(-0.0025_0.0025)π_ψ0π_χ0π_f2.15eV_L3.npz',\n",
|
|||
|
" '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/cyl_r30nm_h30nm_p375nmx375nm_20x20_mAg_bg1.52_φ0π_θ(-0.025_0.025)π_ψ0π_χ0π_f2.16eV_L3.npz']"
|
|||
|
]
|
|||
|
},
|
|||
|
"execution_count": 21,
|
|||
|
"metadata": {},
|
|||
|
"output_type": "execute_result"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"cd = os.path.join(examples_dir, \"rectangular/scattering\")\n",
|
|||
|
"glob.glob(cd + '/*.npz')"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 48,
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"data": {
|
|||
|
"text/plain": [
|
|||
|
"['meta',\n",
|
|||
|
" 'dir_sph',\n",
|
|||
|
" 'k_cart',\n",
|
|||
|
" 'omega',\n",
|
|||
|
" 'E_cart',\n",
|
|||
|
" 'wavenumbers',\n",
|
|||
|
" 'σ_ext',\n",
|
|||
|
" 'σ_abs',\n",
|
|||
|
" 'σ_scat',\n",
|
|||
|
" 'unitcell_area']"
|
|||
|
]
|
|||
|
},
|
|||
|
"execution_count": 48,
|
|||
|
"metadata": {},
|
|||
|
"output_type": "execute_result"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"#f_finite_mesh = '/home/mmn/repo/qpms-article/lepaper/figs/examples/rectangular/scattering/40x40_psi1.npz'\n",
|
|||
|
"f_mesh_y = '/home/mmn/repo/qpms/examples/rectangular/scattering/inf.npz'\n",
|
|||
|
"f_mesh_x = '/home/mmn/repo/qpms/examples/rectangular/scattering/inf_big_px.npz'\n",
|
|||
|
"data_y = np.load(f_mesh_y)\n",
|
|||
|
"data_x = np.load(f_mesh_x)\n",
|
|||
|
"list(data_x.keys())"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 107,
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"data": {
|
|||
|
"text/plain": [
|
|||
|
"(8.798339185764132e-14, 3.7485521428797764e-17)"
|
|||
|
]
|
|||
|
},
|
|||
|
"execution_count": 107,
|
|||
|
"metadata": {},
|
|||
|
"output_type": "execute_result"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"sigmas = [[data_y[s], data_x[s]] for s in ['σ_scat','σ_abs','σ_ext']]\n",
|
|||
|
"omegas = [data_y['omega'], data_x['omega']]\n",
|
|||
|
"kxs = [data_y['k_cart'][:,:,0], data_x['k_cart'][:,:,0]]\n",
|
|||
|
"# for colorbar range\n",
|
|||
|
"#maxsigma = max(np.amax(sigmas[2][0]), np.amax(sigmas[2][1]))\n",
|
|||
|
"#minsigma = min(min(np.amin(sigmas[l][0]), np.amin(sigmas[l][1])) for l in range(3))\n",
|
|||
|
"maxsigma = max(np.quantile(sigmas[2][0], 0.999), np.quantile(sigmas[2][1], 0.999))\n",
|
|||
|
"minsigma = min(min(np.quantile(sigmas[l][0], 0.001), np.quantile(sigmas[l][0], 0.001)) for l in range(3))\n",
|
|||
|
"maxsigma, minsigma\n",
|
|||
|
"\n",
|
|||
|
"# manual ranges\n",
|
|||
|
"omegamin = 2.09 * eh\n",
|
|||
|
"omegamax = 2.24 * eh\n",
|
|||
|
"kmin = -0.6e6\n",
|
|||
|
"kmax = 0.6e6\n",
|
|||
|
"\n",
|
|||
|
"imshow_extent = (kmin / 1e6, kmax / 1e6, omegamin / eh, omegamax/eh) \n",
|
|||
|
"maxsigma, minsigma"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 135,
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"data": {
|
|||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAbYAAAFUCAYAAABIhRn5AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzsvXmYLVlZ5vv7VsSecj5jTacGGVpmpBgKxAYZRGi9gt3YQNuIt0HEblq5V263Yrcoj7aKNi0+6MVS5MqMEy0qiiiKylwgk1XMHqpODafqzHly2jtiffePtSJ2ROyIPWTmzsyTJ97nyXNiR6xYsWJab3yzqCo1atSoUaPGfoHZ7QHUqFGjRo0a24ma2GrUqFGjxr5CTWw1atSoUWNfoSa2GjV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bTWdU8niAjLTcS7l6rwlBdykmpXeMupJIC/BwaCKMjfwbSa5rWKcya/Khpbdv0pK87Y0Nrro6hrx+QsEB5dS+6ad62DbIRpuTkrbKfva/R54Bf/plc9iYXGGa284jDHCW3/rQ7z1t/52/E5qteT0cDmS+GWKfU1sCak1GwE/9/Lv5mff+Ofc+vV7+OHnfivNRsjN7/kINARRECvEDUUUTKREMwFimwQH2i4sILIE5w86u8/Zc9hTp9GNDcJrjzn7W2CQIOjHUJmMFAd9+1t2worJk10WRaeTvYKKgjxSHGcJmUFeQiOOndoxionuOIG0WphOm/D6Y47QWg2iuaZTPYZC3HQerTYUT2AFr8eqyIppXcLMOTeaIT/188/lta9+D1+69U5e9LKn0GyGvPXmv9l838M+fmpMhmG27hr7Dvv7tfHP7mMfej1fOn6SW7/
|
|||
|
"text/plain": [
|
|||
|
"<Figure size 432x360 with 7 Axes>"
|
|||
|
]
|
|||
|
},
|
|||
|
"metadata": {
|
|||
|
"needs_background": "light"
|
|||
|
},
|
|||
|
"output_type": "display_data"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"%matplotlib inline\n",
|
|||
|
"ipm = \"nearest\" # interpolation method for griddata\n",
|
|||
|
"f, ax = plt.subplots(3,2, figsize=(6,5))\n",
|
|||
|
"#ax[0,0].set_title(\"TE\")\n",
|
|||
|
"#ax[0,1].set_title(\"TM\")\n",
|
|||
|
"ax[0,0].set_title(\"$y$ polarisation\")\n",
|
|||
|
"ax[0,1].set_title(\"$x\\,(z)$ polarisation\")\n",
|
|||
|
"for l in (0,1):\n",
|
|||
|
" for c in (0,1):\n",
|
|||
|
" ax[l,c].tick_params(labelbottom=False)\n",
|
|||
|
"for l in range(3):\n",
|
|||
|
" ax[l,1].tick_params(labelleft=False)\n",
|
|||
|
"\n",
|
|||
|
"\n",
|
|||
|
"for c in (0,1):\n",
|
|||
|
" ax[2,c].set_xlabel('$k_x/\\mathrm{\\mu m^{-1}}$')\n",
|
|||
|
" \n",
|
|||
|
" om = omegas[c]\n",
|
|||
|
" dom = np.amin(np.diff(om)) / 2 # It should be equidistant, but...\n",
|
|||
|
" kx = kxs[c]\n",
|
|||
|
" dkx = np.amin(np.diff(kx)) / 2\n",
|
|||
|
" #grid_y, grid_x = np.mgrid[om[0]:om[-1]:dom, np.amax(kx[:,0]) : np.amin(kx[:,-1]) : dkx]\n",
|
|||
|
" grid_y, grid_x = np.mgrid[omegamin:omegamax:dom, kmin : kmax : dkx]\n",
|
|||
|
" \n",
|
|||
|
" # source points for griddata\n",
|
|||
|
" ompoints = np.broadcast_to(om[:,None], kx.shape)\n",
|
|||
|
" points = np.stack((kx.flatten(), ompoints.flatten()), axis=-1)\n",
|
|||
|
" \n",
|
|||
|
" for l in range(3):\n",
|
|||
|
" grid_z = griddata(points, sigmas[l][c].flatten(), (grid_x, grid_y), method=ipm) / 1e-12 # square micrometers\n",
|
|||
|
" im = ax[l,c].imshow(grid_z, origin='lower', vmin=0, vmax=maxsigma/1e-12, extent=imshow_extent,\n",
|
|||
|
" aspect='auto', interpolation='none')\n",
|
|||
|
" \n",
|
|||
|
" # manual xticks, so they are the same as in the Beyn mode image\n",
|
|||
|
" #ax[l,c].set_xticks(np.arange(-0.6,0.7,0.2))\n",
|
|||
|
"cax = f.add_axes([0.83, 0.15, 0.05, 0.7])\n",
|
|||
|
"plt.subplots_adjust(right = 0.78, left=0.12, wspace=0.15, hspace=0.15)\n",
|
|||
|
"cbar = f.colorbar(im, cax=cax)\n",
|
|||
|
"cbar.set_label('$\\sigma / \\mathrm{\\mu m^2}$')\n",
|
|||
|
" \n",
|
|||
|
" \n",
|
|||
|
" \n",
|
|||
|
" \n",
|
|||
|
" \n",
|
|||
|
"for l, txt in enumerate(['$\\\\sigma_\\\\mathrm{scat}$','$\\\\sigma_\\\\mathrm{abs}$','$\\\\sigma_\\\\mathrm{ext}$']):\n",
|
|||
|
" for i in (0,1):\n",
|
|||
|
" ax[l,i].text(0.02, 0.95,txt,\n",
|
|||
|
" color='white',\n",
|
|||
|
" horizontalalignment='left',\n",
|
|||
|
" verticalalignment='top',\n",
|
|||
|
" transform = ax[l,i].transAxes)\n",
|
|||
|
" ax[l,0].set_ylabel('$\\hbar\\omega / \\mathrm{eV}$')\n",
|
|||
|
"\n",
|
|||
|
"plt.savefig(\"sqlat_inf_scatter.pdf\")\n"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 85,
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"data": {
|
|||
|
"text/plain": [
|
|||
|
"(150, 201)"
|
|||
|
]
|
|||
|
},
|
|||
|
"execution_count": 85,
|
|||
|
"metadata": {},
|
|||
|
"output_type": "execute_result"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"kx.shape"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 65,
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"data": {
|
|||
|
"text/plain": [
|
|||
|
"(150, 201, 3)"
|
|||
|
]
|
|||
|
},
|
|||
|
"execution_count": 65,
|
|||
|
"metadata": {},
|
|||
|
"output_type": "execute_result"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"data_y['k_cart'].shape"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 76,
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"data": {
|
|||
|
"text/plain": [
|
|||
|
"array([[6045.26556378, 6045.35790435, 6045.44931265, ..., 6045.44931265,\n",
|
|||
|
" 6045.35790435, 6045.26556378],\n",
|
|||
|
" [6050.13423404, 6050.22664897, 6050.31813089, ..., 6050.31813089,\n",
|
|||
|
" 6050.22664897, 6050.13423404],\n",
|
|||
|
" [6055.00290429, 6055.09539359, 6055.18694913, ..., 6055.18694913,\n",
|
|||
|
" 6055.09539359, 6055.00290429],\n",
|
|||
|
" ...,\n",
|
|||
|
" [6760.96009093, 6761.06336363, 6761.16559369, ..., 6761.16559369,\n",
|
|||
|
" 6761.06336363, 6760.96009093],\n",
|
|||
|
" [6765.82876118, 6765.93210825, 6766.03441193, ..., 6766.03441193,\n",
|
|||
|
" 6765.93210825, 6765.82876118],\n",
|
|||
|
" [6770.69743144, 6770.80085288, 6770.90323017, ..., 6770.90323017,\n",
|
|||
|
" 6770.80085288, 6770.69743144]])"
|
|||
|
]
|
|||
|
},
|
|||
|
"execution_count": 76,
|
|||
|
"metadata": {},
|
|||
|
"output_type": "execute_result"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"np.diff(data_y['k_cart'][:,:,0])"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 82,
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"data": {
|
|||
|
"text/plain": [
|
|||
|
"array([-604832.84966793, -605319.96337236, -605807.07707679,\n",
|
|||
|
" -606294.19078123, -606781.30448566, -607268.41819009,\n",
|
|||
|
" -607755.53189452, -608242.64559895, -608729.75930338,\n",
|
|||
|
" -609216.87300781, -609703.98671224, -610191.10041667,\n",
|
|||
|
" -610678.2141211 , -611165.32782553, -611652.44152996,\n",
|
|||
|
" -612139.55523439, -612626.66893882, -613113.78264325,\n",
|
|||
|
" -613600.89634768, -614088.01005211, -614575.12375654,\n",
|
|||
|
" -615062.23746098, -615549.35116541, -616036.46486984,\n",
|
|||
|
" -616523.57857427, -617010.6922787 , -617497.80598313,\n",
|
|||
|
" -617984.91968756, -618472.03339199, -618959.14709642,\n",
|
|||
|
" -619446.26080085, -619933.37450528, -620420.48820971,\n",
|
|||
|
" -620907.60191414, -621394.71561857, -621881.829323 ,\n",
|
|||
|
" -622368.94302743, -622856.05673186, -623343.17043629,\n",
|
|||
|
" -623830.28414073, -624317.39784516, -624804.51154959,\n",
|
|||
|
" -625291.62525402, -625778.73895845, -626265.85266288,\n",
|
|||
|
" -626752.96636731, -627240.08007174, -627727.19377617,\n",
|
|||
|
" -628214.3074806 , -628701.42118503, -629188.53488946,\n",
|
|||
|
" -629675.64859389, -630162.76229832, -630649.87600275,\n",
|
|||
|
" -631136.98970718, -631624.10341161, -632111.21711604,\n",
|
|||
|
" -632598.33082047, -633085.44452491, -633572.55822934,\n",
|
|||
|
" -634059.67193377, -634546.7856382 , -635033.89934263,\n",
|
|||
|
" -635521.01304706, -636008.12675149, -636495.24045592,\n",
|
|||
|
" -636982.35416035, -637469.46786478, -637956.58156921,\n",
|
|||
|
" -638443.69527364, -638930.80897807, -639417.9226825 ,\n",
|
|||
|
" -639905.03638693, -640392.15009136, -640879.26379579,\n",
|
|||
|
" -641366.37750022, -641853.49120466, -642340.60490909,\n",
|
|||
|
" -642827.71861352, -643314.83231795, -643801.94602238,\n",
|
|||
|
" -644289.05972681, -644776.17343124, -645263.28713567,\n",
|
|||
|
" -645750.4008401 , -646237.51454453, -646724.62824896,\n",
|
|||
|
" -647211.74195339, -647698.85565782, -648185.96936225,\n",
|
|||
|
" -648673.08306668, -649160.19677111, -649647.31047554,\n",
|
|||
|
" -650134.42417997, -650621.53788441, -651108.65158884,\n",
|
|||
|
" -651595.76529327, -652082.8789977 , -652569.99270213,\n",
|
|||
|
" -653057.10640656, -653544.22011099, -654031.33381542,\n",
|
|||
|
" -654518.44751985, -655005.56122428, -655492.67492871,\n",
|
|||
|
" -655979.78863314, -656466.90233757, -656954.016042 ,\n",
|
|||
|
" -657441.12974643, -657928.24345086, -658415.35715529,\n",
|
|||
|
" -658902.47085972, -659389.58456416, -659876.69826859,\n",
|
|||
|
" -660363.81197302, -660850.92567745, -661338.03938188,\n",
|
|||
|
" -661825.15308631, -662312.26679074, -662799.38049517,\n",
|
|||
|
" -663286.4941996 , -663773.60790403, -664260.72160846,\n",
|
|||
|
" -664747.83531289, -665234.94901732, -665722.06272175,\n",
|
|||
|
" -666209.17642618, -666696.29013061, -667183.40383504,\n",
|
|||
|
" -667670.51753947, -668157.63124391, -668644.74494834,\n",
|
|||
|
" -669131.85865277, -669618.9723572 , -670106.08606163,\n",
|
|||
|
" -670593.19976606, -671080.31347049, -671567.42717492,\n",
|
|||
|
" -672054.54087935, -672541.65458378, -673028.76828821,\n",
|
|||
|
" -673515.88199264, -674002.99569707, -674490.1094015 ,\n",
|
|||
|
" -674977.22310593, -675464.33681036, -675951.45051479,\n",
|
|||
|
" -676438.56421922, -676925.67792366, -677412.79162809])"
|
|||
|
]
|
|||
|
},
|
|||
|
"execution_count": 82,
|
|||
|
"metadata": {},
|
|||
|
"output_type": "execute_result"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"data_y['k_cart'][:,0,0]"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 79,
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"data": {
|
|||
|
"text/plain": [
|
|||
|
"(150,)"
|
|||
|
]
|
|||
|
},
|
|||
|
"execution_count": 79,
|
|||
|
"metadata": {},
|
|||
|
"output_type": "execute_result"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"omegas[0].shape"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 114,
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"data": {
|
|||
|
"text/plain": [
|
|||
|
"'/home/mmn'"
|
|||
|
]
|
|||
|
},
|
|||
|
"execution_count": 114,
|
|||
|
"metadata": {},
|
|||
|
"output_type": "execute_result"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"import os\n",
|
|||
|
"os.getcwd()"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"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.7.3"
|
|||
|
}
|
|||
|
},
|
|||
|
"nbformat": 4,
|
|||
|
"nbformat_minor": 2
|
|||
|
}
|