diff --git a/notebooks/2015-10-27 Ground projection.ipynb b/notebooks/2015-10-27 Ground projection.ipynb new file mode 100644 index 0000000..fbad974 --- /dev/null +++ b/notebooks/2015-10-27 Ground projection.ipynb @@ -0,0 +1,2012 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "from __future__ import print_function, division\n", + "from pysis.util import file_variations\n", + "import os\n", + "from pysis import CubeFile\n", + "from pysis.isis import cubenorm, handmos, hi2isis, hical, histitch, spiceinit, getkey\n", + "import subprocess as sp\n", + "from pysis.exceptions import ProcessError\n", + "import sys\n", + "\n", + "# case 2: turn IMG to cub, give information of it (spiceinit), don't calibrate it\n", + "def nocal_hi(img_name):\n", + " (img_name, cub_name) = file_variations(img_name, ['.IMG', '.cub'])\n", + " # something wrong here, if just put one extension in it, the name will contain brankets\n", + " try:\n", + " hi2isis(from_=img_name, to=cub_name)\n", + " spiceinit(from_=cub_name)\n", + " except ProcessError as e:\n", + " print(e.stdout)\n", + " print(e.stderr)\n", + " sys.exit()\n", + "\n", + "# stitch _0 and _1 together and normalize it\n", + "def stit_norm_hi(img1, img2):\n", + " cub = img1[0:20]+'.cub'\n", + " (cub, norm) = file_variations(cub, ['.cub', '.norm.cub']) # same here\n", + " try:\n", + " histitch(from1=img1, from2=img2, to=cub)\n", + " cubenorm(from_=cub, to=norm)\n", + " except ProcessError as e:\n", + " print(e.stdout)\n", + " print(e.stderr)\n", + " sys.exit()\n", + " \n", + "def hi2mos(nm):\n", + " os.chdir('/Users/klay6683/data/planet4/season2_3_EDRs')\n", + " print('Processing the EDR data associated with '+nm)\n", + "\n", + " mos_name = 'redMosaic'+nm+'.cub'\n", + "# status = os.path.isfile(mos_name)\n", + " status = False\n", + " if status is True:\n", + " print('skip processing '+nm+'...')\n", + " return nm, False\n", + " else:\n", + " nm = nm+'_RED'\n", + " channel = [4, 5]\n", + " ccd = [0, 1]\n", + "\n", + " for c in channel:\n", + " for chip in ccd:\n", + " nocal_hi(nm+str(c)+'_'+str(chip)+'.IMG')\n", + "\n", + " stit_norm_hi(nm+str(c)+'_0.cub', nm+str(c)+'_1.cub')\n", + "\n", + " # handmos part\n", + " im0 = CubeFile.open(nm+'4.norm.cub') # use CubeFile to get lines and samples\n", + " # use linux commands to get binning mode\n", + " bin = int(getkey(from_=nm+'4.norm.cub', objname=\"isiscube\", grpname=\"instrument\",\n", + " keyword=\"summing\"))\n", + "\n", + " # because there is a gap btw RED4 & 5, nsamples need to first make space\n", + " # for 2 cubs then cut some overlap pixels\n", + " try:\n", + " handmos(from_=nm+'4.norm.cub', mosaic=mos_name, nbands=1, outline=1, outband=1,\n", + " create='Y', outsample=1, nsamples=im0.samples*2-48//bin, \n", + " nlines=im0.lines)\n", + " except ProcessError as e:\n", + " print(\"STDOUT:\", e.stdout)\n", + " print(\"STDERR:\", e.stderr)\n", + " im0 = CubeFile.open(nm+'5.norm.cub') # use CubeFile to get lines and samples\n", + "\n", + " # deal with the overlap gap between RED4 & 5:\n", + " handmos(from_=nm+'5.norm.cub', mosaic=mos_name, outline=1, outband=1, create='N',\n", + " outsample=im0.samples-48//bin+1) \n", + " return nm, True \n", + "\n", + "\n", + "def cleanup(data_dir, img):\n", + " # do some cleanup removing temporary files\n", + " # removing ISIS cubes made during processing that aren't needed\n", + " fs = glob.glob(data_dir+'/'+img+'_RED*.cub')\n", + "\n", + " print(fs)\n", + " for f in fs:\n", + " os.remove(f)\n", + "\n", + " # removing the normalized files\n", + "\n", + " fs = glob.glob(data_dir+'/'+img+'_RED*.norm.cub')\n", + " for f in fs:\n", + " os.remove(f)\n", + "\n", + " # remove the raw EDR data\n", + "\n", + " fs = glob.glob(data_dir+'/'+img+'_RED*.IMG')\n", + " for f in fs:\n", + " os.remove(f)\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/plain": [ + "0 ESP_013113_0985\n", + "1 ESP_013034_0985\n", + "2 ESP_012889_0985\n", + "3 ESP_012744_0985\n", + "4 ESP_012691_0985\n", + "Name: 0, dtype: object" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "img_names = pd.read_table('/Users/klay6683/Dropbox/data/planet4/season2_3_image_names.txt',\n", + " header=None, squeeze=True)\n", + "img_names.head()" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "/Users/klay6683/data/planet4/season2_3_EDRs\n" + ] + } + ], + "source": [ + "cd ~/data/planet4/season2_3_EDRs/" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "from ipyparallel import Client\n", + "c = Client()" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "lbview = c.load_balanced_view()\n", + "dview = c.direct_view()" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "%%px \n", + "from __future__ import print_function,division\n", + "from pysis.util import file_variations\n", + "import os\n", + "from pysis import CubeFile\n", + "from pysis.isis import cubenorm, handmos, hi2isis, hical, histitch, spiceinit, getkey\n", + "import subprocess as sp\n", + "from pysis.exceptions import ProcessError\n", + "import sys" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "dview.push({'nocal_hi':nocal_hi,\n", + " 'stit_norm_hi':stit_norm_hi})" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "results = lbview.map_async(hi2mos, img_names)" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "from iuvs.multitools import nb_progress_display" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "nb_progress_display(results, img_names)" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "('ESP_013113_0985_RED', True)\n", + "('ESP_013034_0985_RED', True)\n", + "('ESP_012889_0985_RED', True)\n", + "('ESP_012744_0985_RED', True)\n", + "('ESP_012691_0985_RED', True)\n", + "('ESP_012467_0985_RED', True)\n", + "('ESP_012322_0985_RED', True)\n", + "('ESP_012256_0985_RED', True)\n", + "('ESP_011900_0985_RED', True)\n", + "('ESP_011729_0985_RED', True)\n", + "('ESP_011702_0985_RED', True)\n", + "('ESP_011623_0985_RED', True)\n", + "('ESP_011557_0985_RED', True)\n", + "('ESP_011544_0985_RED', True)\n", + "('ESP_011491_0985_RED', True)\n", + "('ESP_022699_0985_RED', True)\n", + "('ESP_021460_0985_RED', True)\n", + "('ESP_020959_0985_RED', True)\n", + "('ESP_020748_0985_RED', True)\n", + "('ESP_020194_0985_RED', True)\n", + "('ESP_020128_0985_RED', True)\n", + "('ESP_020049_0985_RED', True)\n", + "('ESP_021829_0985_RED', True)\n", + "('ESP_021684_0985_RED', True)\n", + "('ESP_021671_0985_RED', True)\n", + "('ESP_021605_0985_RED', True)\n", + "('ESP_021526_0985_RED', True)\n", + "('ESP_020827_0985_RED', True)\n", + "('ESP_020339_0985_RED', True)\n", + "('ESP_020115_0985_RED', True)\n" + ] + } + ], + "source": [ + "for res in results:\n", + " print(res)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## cleanup" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "!rm -f *RED*.cub" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# xy2latlon" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "def xy2latlon(p):\n", + " pass" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
image_ximage_yangleradius_1radius_2xy
01054.10256369636.46153820.38601824.27316520.5810541054.10256369636.461538
1782.14341069245.25581417.05796321.46938017.194975782.14341069245.255814
2808.65872969585.88095215.85655324.47768519.156379808.65872969585.880952
32778.41320747754.7962267.09219911.00060610.6407082778.41320747754.796226
42676.12857147665.0000003.86017711.02881810.4528942676.12857147665.000000
\n", + "
" + ], + "text/plain": [ + " image_x image_y angle radius_1 radius_2 x \\\n", + "0 1054.102563 69636.461538 20.386018 24.273165 20.581054 1054.102563 \n", + "1 782.143410 69245.255814 17.057963 21.469380 17.194975 782.143410 \n", + "2 808.658729 69585.880952 15.856553 24.477685 19.156379 808.658729 \n", + "3 2778.413207 47754.796226 7.092199 11.000606 10.640708 2778.413207 \n", + "4 2676.128571 47665.000000 3.860177 11.028818 10.452894 2676.128571 \n", + "\n", + " y \n", + "0 69636.461538 \n", + "1 69245.255814 \n", + "2 69585.880952 \n", + "3 47754.796226 \n", + "4 47665.000000 " + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df = pd.read_csv('/Users/klay6683/Dropbox/data/planet4/season23_catalog/ESP_021684_0985_blotches.csv',\n", + " index_col=0)\n", + "df.head()" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "from pysis.isis import campt\n", + "from pysis.exceptions import ProcessError\n", + "import pvl" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "from pathlib import Path\n", + "edrpath = Path('/Users/klay6683/data/planet4/season2_3_EDRs/')\n", + "clusterpath = Path('/Users/klay6683/Dropbox/data/planet4/season23_catalog/')" + ] + }, + { + "cell_type": "code", + "execution_count": 135, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fnotches = list(clusterpath.glob('*_fnotches*'))" + ] + }, + { + "cell_type": "code", + "execution_count": 136, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/plain": [ + "PosixPath('/Users/klay6683/Dropbox/data/planet4/season23_catalog/ESP_011296_0975_fnotches.csv')" + ] + }, + "execution_count": 136, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "fnotches[0]" + ] + }, + { + "cell_type": "code", + "execution_count": 137, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
fan_image_xfan_image_yfan_anglefan_spreadfan_distancefan_xfan_yblotch_image_xblotch_image_yblotch_angleblotch_radius_1blotch_radius_2blotch_xblotch_yfnotch_value
0612.7635107189.901442-158.53054165.18495536.362188612.7635107189.901442596.1608537183.073644-10.94668219.32225015.003017596.1608537183.0736440.426667
0572.3750007174.00000023.34463323.97915347.651901572.3750007174.000000596.1608537183.073644-10.94668219.32225015.003017596.1608537183.0736440.085106
0213.6055067165.379892-157.44320266.98669240.885272213.6055067165.379892196.5876077157.106838-13.13922720.79740517.382564196.5876077157.1068380.493506
0174.8333337154.33333311.031186117.84497543.825654174.8333337154.333333196.5876077157.106838-13.13922720.79740517.382564196.5876077157.1068380.071429
0418.1428576979.857143-163.92448060.48176232.612338418.1428576979.857143406.1553036976.371212-17.54919217.75748513.575457406.1553036976.3712120.388889
0756.4117656581.823529-157.37041463.86251931.956122756.4117656581.823529745.9422226578.008333-3.17363717.64070014.012971745.9422226578.0083330.361702
0287.0416677085.583333-151.73936252.67508727.182625287.0416677085.583333277.9746387080.137681-42.51852913.76109411.862814277.9746387080.1376810.342857
0116.5882356996.764706-153.05905370.50450335.796345116.5882356996.764706103.8564826991.898148-21.41922921.04084816.441664103.8564826991.8981480.485714
0293.8947376978.842105-155.48385468.73804541.096732293.8947376978.842105276.5912706971.150794-12.02473826.06281119.382369276.5912706971.1507940.475000
0797.6041676666.833333-151.48392652.69754244.101117797.6041676666.833333784.2387606659.773256-8.37111419.69479816.116172784.2387606659.7732560.358209
0503.3437506629.250000-117.54935042.20881229.517538503.3437506629.250000495.4553336625.14833310.46179115.65074413.314149495.4553336625.1483330.242424
0347.2368426760.000000-143.97431374.50356730.696165347.2368426760.000000337.4068636754.058824-12.96616620.06828116.801532337.4068636754.0588240.527778
0528.8333337549.000000-150.09033556.89072416.312027528.8333337549.000000522.3584277544.613676-7.19436111.01276810.390235522.3584277544.6136760.166667
0459.1428577524.714286-141.3882492.67502720.961637459.1428577524.714286450.0034147519.0212212.98871310.87958810.314751450.0034147519.0212210.194444
0366.4334347580.589746-138.36888840.23904919.769995366.4334347580.589746362.5356127576.153846-5.77932611.89212310.847372362.5356127576.1538460.333333
0201.1071437518.357143-120.40181364.42889819.035668201.1071437518.357143193.1235907515.2140475.75967012.23685011.025464193.1235907515.2140470.378378
070.2731404788.750000-149.430149111.84070215.25892770.2731404788.75000061.5817664784.4209403.41185310.59294710.91199661.5817664784.4209400.133333
0680.6902334593.000000-150.85517581.80408229.824945680.6902334593.000000668.3631394588.187830-17.88502511.99560311.639124668.3631394588.1878300.343750
0462.7989374568.714286-150.48288499.62495924.577819462.7989374568.714286454.3650374565.397777-3.56789810.87070510.779755454.3650374565.3977770.218750
0319.3181823248.545455-148.34930341.21754819.086496319.3181823248.545455311.3376213242.8697626.48915116.44282613.527928311.3376213242.8697620.189655
0234.2525253125.686869-136.88648351.85337542.780838234.2525253125.686869220.8208343113.592593-3.11774922.77381117.558686220.8208343113.5925930.428571
0764.6661442911.398119-132.39914080.01450939.430957764.6661442911.398119752.3887262899.176471-0.44385725.52228421.088602752.3887262899.1764710.460317
0713.8327272954.461818-147.67494390.73250940.379788713.8327272954.461818697.5476862943.250000-2.35709825.39866819.492700697.5476862943.2500000.409836
0373.6043772925.057239-148.99389280.23429546.156848373.6043772925.057239355.5442862912.94285712.57873027.32980821.301991355.5442862912.9428570.435484
0132.9545453000.059441-133.82367475.07909038.383066132.9545453000.059441116.2097232987.731482-15.59451322.87009118.479712116.2097232987.7314820.419355
031.09090945138.181818-157.50123436.60264030.65006431.09090945138.18181820.95833445132.12500029.58304820.02291814.85532020.95833445132.1250000.578947
0271.52777844994.777778-136.25311461.48284129.430470271.52777844994.777778261.51111144987.46666732.79256817.98371715.315785261.51111144987.4666670.705882
0248.87777744974.00000041.03579762.74746431.898059248.87777744974.000000261.51111144987.46666732.79256817.98371715.315785261.51111144987.4666670.166667
0496.61904845087.095238-123.51789435.39973826.372469496.61904845087.095238486.64285745083.8571437.47249615.53750913.619684486.64285745083.8571430.750000
0660.75490244972.627451-137.84649548.07004140.709228660.75490244972.627451645.20000044964.1000002.51814316.73123616.216426645.20000044964.1000000.836066
................................................
078.40000021007.400000-152.69106157.52003328.94252978.40000021007.40000063.50000021001.00000014.17014912.09294010.00000063.50000021001.0000000.625000
093.37500020926.875000-147.62678162.26224837.37880993.37500020926.87500076.50000020914.000000-1.12981821.92061516.17548076.50000020914.0000000.615385
0431.37500035119.900000-131.51593550.04142340.624285431.37500035119.900000420.50000035108.333333-51.73102429.19726821.897951420.50000035108.3333330.869565
0465.40476319842.857143-153.35037633.64963830.638048465.40476319842.857143455.75000019838.2500006.86860814.54450112.783376455.75000019838.2500000.777778
0609.97777919939.800000-142.25082762.67535141.126621609.97777919939.800000591.75000019927.50000016.65301223.97191118.041434591.75000019927.5000000.789474
0585.00000020017.000000-155.18847061.02012932.741588585.00000020017.000000568.75000020009.0000006.94598214.93303413.074776568.75000020009.0000000.733333
036.90476320238.357143-154.17626766.36802834.68874936.90476320238.35714318.33333320233.33333331.19211118.02081314.68227618.33333320233.3333330.823529
0152.60000020253.800000-144.37415974.65801428.513568152.60000020253.800000145.40000020248.400000-61.31136215.77551313.331635145.40000020248.4000000.666667
0337.85000030889.400000-150.69673657.11936758.337440337.85000030889.400000312.83333330876.33333327.10541824.79334718.595010312.83333330876.3333330.769231
0233.85714315513.571429-147.34741343.58055953.047009233.85714315513.571429208.00000015501.000000-3.74642836.88392924.763149208.00000015501.0000000.700000
0391.50000027359.000000-122.75364432.82352926.092198391.50000027359.000000384.83333327349.3333330.00000010.00000010.000000384.83333327349.3333330.785714
0532.43750026893.875000-154.95941459.89179038.476365532.43750026893.875000521.66666726886.333333-44.17014913.53042011.814482521.66666726886.3333330.842105
0798.25000026961.200000-149.05550256.53091138.916293798.25000026961.200000786.50000026950.0000008.85501710.00000010.000000786.50000026950.0000000.769231
0648.78571423618.285714-135.26360823.80260532.323334648.78571423618.285714641.91666723611.33333343.24586812.69019510.876198641.91666723611.3333330.700000
0607.73809416484.333333-159.45682115.55150828.732118607.73809416484.333333593.60555016481.00000015.00000010.00000010.000000593.60555016481.0000000.700000
0332.866564342.031746-141.99045386.55000231.866359332.866564342.031746321.972229334.00000046.04293717.40439913.886633321.972229334.0000000.700000
0336.118439229.135802-139.27502460.91461938.933238336.118439229.135802319.972229217.33333378.31935722.58501116.938758319.972229217.3333330.750000
0342.1932105946.778395-135.38589951.72150440.450200342.1932105946.778395323.5555575936.66666716.36187219.89962216.591383323.5555575936.6666670.900000
00.00000015344.0000000.0000002.01745010.0000000.00000015344.0000000.00000015344.0000000.00000010.00000010.0000000.00000015344.0000000.625000
0359.72222215359.444444-140.63901920.01802830.114636359.72222215359.444444349.83333315354.00000015.00000010.90930710.000000349.83333315354.0000000.750000
0693.87500014959.250000-144.65120548.80817036.300818693.87500014959.250000682.16666714950.66666733.70827021.25309613.226462682.16666714950.6666670.571429
0716.39523815238.759524-148.27190032.16233743.333801716.39523815238.759524703.16666715231.33333323.25838017.48402010.000000703.16666715231.3333330.700000
0768.90000020821.000000-155.60566024.87846331.991032768.90000020821.000000755.50000020813.000000-2.18209721.40112716.884179755.50000020813.0000000.625000
0298.83333216534.666667-110.53116448.81333718.353726298.83333216534.666667291.60555016529.6666675.31513210.00000010.000000291.60555016529.6666670.727273
0525.2347625585.771905-122.00255160.68853842.980011525.2347625585.771905515.0000005573.666667-52.63018418.17994410.000000515.0000005573.6666670.921053
0265.91717713360.067349-130.91895268.15314437.444111265.91717713360.067349249.22222913348.777776-32.62914626.29763521.974155249.22222913348.7777760.823529
0199.76923135951.026924-142.38582316.83461219.250015199.76923135951.026924194.18864935946.00000039.81514310.56823310.000000194.18864935946.0000000.812500
0620.62500012170.500000-148.14734522.15659931.942502620.62500012170.500000605.33333312156.33333312.12811714.53361612.566879605.33333312156.3333330.727273
0101.62500016703.875000-146.22585327.23390030.303039101.62500016703.87500088.75306216698.44444417.58838912.75439511.03988188.75306216698.4444440.727273
0602.79411849398.823529-148.75838774.23927247.642413602.79411849398.823529576.00000049387.00000019.21938124.49283218.443356576.00000049387.0000000.918919
\n", + "

1764 rows × 15 columns

\n", + "
" + ], + "text/plain": [ + " fan_image_x fan_image_y fan_angle fan_spread fan_distance \\\n", + "0 612.763510 7189.901442 -158.530541 65.184955 36.362188 \n", + "0 572.375000 7174.000000 23.344633 23.979153 47.651901 \n", + "0 213.605506 7165.379892 -157.443202 66.986692 40.885272 \n", + "0 174.833333 7154.333333 11.031186 117.844975 43.825654 \n", + "0 418.142857 6979.857143 -163.924480 60.481762 32.612338 \n", + "0 756.411765 6581.823529 -157.370414 63.862519 31.956122 \n", + "0 287.041667 7085.583333 -151.739362 52.675087 27.182625 \n", + "0 116.588235 6996.764706 -153.059053 70.504503 35.796345 \n", + "0 293.894737 6978.842105 -155.483854 68.738045 41.096732 \n", + "0 797.604167 6666.833333 -151.483926 52.697542 44.101117 \n", + "0 503.343750 6629.250000 -117.549350 42.208812 29.517538 \n", + "0 347.236842 6760.000000 -143.974313 74.503567 30.696165 \n", + "0 528.833333 7549.000000 -150.090335 56.890724 16.312027 \n", + "0 459.142857 7524.714286 -141.388249 2.675027 20.961637 \n", + "0 366.433434 7580.589746 -138.368888 40.239049 19.769995 \n", + "0 201.107143 7518.357143 -120.401813 64.428898 19.035668 \n", + "0 70.273140 4788.750000 -149.430149 111.840702 15.258927 \n", + "0 680.690233 4593.000000 -150.855175 81.804082 29.824945 \n", + "0 462.798937 4568.714286 -150.482884 99.624959 24.577819 \n", + "0 319.318182 3248.545455 -148.349303 41.217548 19.086496 \n", + "0 234.252525 3125.686869 -136.886483 51.853375 42.780838 \n", + "0 764.666144 2911.398119 -132.399140 80.014509 39.430957 \n", + "0 713.832727 2954.461818 -147.674943 90.732509 40.379788 \n", + "0 373.604377 2925.057239 -148.993892 80.234295 46.156848 \n", + "0 132.954545 3000.059441 -133.823674 75.079090 38.383066 \n", + "0 31.090909 45138.181818 -157.501234 36.602640 30.650064 \n", + "0 271.527778 44994.777778 -136.253114 61.482841 29.430470 \n", + "0 248.877777 44974.000000 41.035797 62.747464 31.898059 \n", + "0 496.619048 45087.095238 -123.517894 35.399738 26.372469 \n", + "0 660.754902 44972.627451 -137.846495 48.070041 40.709228 \n", + ".. ... ... ... ... ... \n", + "0 78.400000 21007.400000 -152.691061 57.520033 28.942529 \n", + "0 93.375000 20926.875000 -147.626781 62.262248 37.378809 \n", + "0 431.375000 35119.900000 -131.515935 50.041423 40.624285 \n", + "0 465.404763 19842.857143 -153.350376 33.649638 30.638048 \n", + "0 609.977779 19939.800000 -142.250827 62.675351 41.126621 \n", + "0 585.000000 20017.000000 -155.188470 61.020129 32.741588 \n", + "0 36.904763 20238.357143 -154.176267 66.368028 34.688749 \n", + "0 152.600000 20253.800000 -144.374159 74.658014 28.513568 \n", + "0 337.850000 30889.400000 -150.696736 57.119367 58.337440 \n", + "0 233.857143 15513.571429 -147.347413 43.580559 53.047009 \n", + "0 391.500000 27359.000000 -122.753644 32.823529 26.092198 \n", + "0 532.437500 26893.875000 -154.959414 59.891790 38.476365 \n", + "0 798.250000 26961.200000 -149.055502 56.530911 38.916293 \n", + "0 648.785714 23618.285714 -135.263608 23.802605 32.323334 \n", + "0 607.738094 16484.333333 -159.456821 15.551508 28.732118 \n", + "0 332.866564 342.031746 -141.990453 86.550002 31.866359 \n", + "0 336.118439 229.135802 -139.275024 60.914619 38.933238 \n", + "0 342.193210 5946.778395 -135.385899 51.721504 40.450200 \n", + "0 0.000000 15344.000000 0.000000 2.017450 10.000000 \n", + "0 359.722222 15359.444444 -140.639019 20.018028 30.114636 \n", + "0 693.875000 14959.250000 -144.651205 48.808170 36.300818 \n", + "0 716.395238 15238.759524 -148.271900 32.162337 43.333801 \n", + "0 768.900000 20821.000000 -155.605660 24.878463 31.991032 \n", + "0 298.833332 16534.666667 -110.531164 48.813337 18.353726 \n", + "0 525.234762 5585.771905 -122.002551 60.688538 42.980011 \n", + "0 265.917177 13360.067349 -130.918952 68.153144 37.444111 \n", + "0 199.769231 35951.026924 -142.385823 16.834612 19.250015 \n", + "0 620.625000 12170.500000 -148.147345 22.156599 31.942502 \n", + "0 101.625000 16703.875000 -146.225853 27.233900 30.303039 \n", + "0 602.794118 49398.823529 -148.758387 74.239272 47.642413 \n", + "\n", + " fan_x fan_y blotch_image_x blotch_image_y blotch_angle \\\n", + "0 612.763510 7189.901442 596.160853 7183.073644 -10.946682 \n", + "0 572.375000 7174.000000 596.160853 7183.073644 -10.946682 \n", + "0 213.605506 7165.379892 196.587607 7157.106838 -13.139227 \n", + "0 174.833333 7154.333333 196.587607 7157.106838 -13.139227 \n", + "0 418.142857 6979.857143 406.155303 6976.371212 -17.549192 \n", + "0 756.411765 6581.823529 745.942222 6578.008333 -3.173637 \n", + "0 287.041667 7085.583333 277.974638 7080.137681 -42.518529 \n", + "0 116.588235 6996.764706 103.856482 6991.898148 -21.419229 \n", + "0 293.894737 6978.842105 276.591270 6971.150794 -12.024738 \n", + "0 797.604167 6666.833333 784.238760 6659.773256 -8.371114 \n", + "0 503.343750 6629.250000 495.455333 6625.148333 10.461791 \n", + "0 347.236842 6760.000000 337.406863 6754.058824 -12.966166 \n", + "0 528.833333 7549.000000 522.358427 7544.613676 -7.194361 \n", + "0 459.142857 7524.714286 450.003414 7519.021221 2.988713 \n", + "0 366.433434 7580.589746 362.535612 7576.153846 -5.779326 \n", + "0 201.107143 7518.357143 193.123590 7515.214047 5.759670 \n", + "0 70.273140 4788.750000 61.581766 4784.420940 3.411853 \n", + "0 680.690233 4593.000000 668.363139 4588.187830 -17.885025 \n", + "0 462.798937 4568.714286 454.365037 4565.397777 -3.567898 \n", + "0 319.318182 3248.545455 311.337621 3242.869762 6.489151 \n", + "0 234.252525 3125.686869 220.820834 3113.592593 -3.117749 \n", + "0 764.666144 2911.398119 752.388726 2899.176471 -0.443857 \n", + "0 713.832727 2954.461818 697.547686 2943.250000 -2.357098 \n", + "0 373.604377 2925.057239 355.544286 2912.942857 12.578730 \n", + "0 132.954545 3000.059441 116.209723 2987.731482 -15.594513 \n", + "0 31.090909 45138.181818 20.958334 45132.125000 29.583048 \n", + "0 271.527778 44994.777778 261.511111 44987.466667 32.792568 \n", + "0 248.877777 44974.000000 261.511111 44987.466667 32.792568 \n", + "0 496.619048 45087.095238 486.642857 45083.857143 7.472496 \n", + "0 660.754902 44972.627451 645.200000 44964.100000 2.518143 \n", + ".. ... ... ... ... ... \n", + "0 78.400000 21007.400000 63.500000 21001.000000 14.170149 \n", + "0 93.375000 20926.875000 76.500000 20914.000000 -1.129818 \n", + "0 431.375000 35119.900000 420.500000 35108.333333 -51.731024 \n", + "0 465.404763 19842.857143 455.750000 19838.250000 6.868608 \n", + "0 609.977779 19939.800000 591.750000 19927.500000 16.653012 \n", + "0 585.000000 20017.000000 568.750000 20009.000000 6.945982 \n", + "0 36.904763 20238.357143 18.333333 20233.333333 31.192111 \n", + "0 152.600000 20253.800000 145.400000 20248.400000 -61.311362 \n", + "0 337.850000 30889.400000 312.833333 30876.333333 27.105418 \n", + "0 233.857143 15513.571429 208.000000 15501.000000 -3.746428 \n", + "0 391.500000 27359.000000 384.833333 27349.333333 0.000000 \n", + "0 532.437500 26893.875000 521.666667 26886.333333 -44.170149 \n", + "0 798.250000 26961.200000 786.500000 26950.000000 8.855017 \n", + "0 648.785714 23618.285714 641.916667 23611.333333 43.245868 \n", + "0 607.738094 16484.333333 593.605550 16481.000000 15.000000 \n", + "0 332.866564 342.031746 321.972229 334.000000 46.042937 \n", + "0 336.118439 229.135802 319.972229 217.333333 78.319357 \n", + "0 342.193210 5946.778395 323.555557 5936.666667 16.361872 \n", + "0 0.000000 15344.000000 0.000000 15344.000000 0.000000 \n", + "0 359.722222 15359.444444 349.833333 15354.000000 15.000000 \n", + "0 693.875000 14959.250000 682.166667 14950.666667 33.708270 \n", + "0 716.395238 15238.759524 703.166667 15231.333333 23.258380 \n", + "0 768.900000 20821.000000 755.500000 20813.000000 -2.182097 \n", + "0 298.833332 16534.666667 291.605550 16529.666667 5.315132 \n", + "0 525.234762 5585.771905 515.000000 5573.666667 -52.630184 \n", + "0 265.917177 13360.067349 249.222229 13348.777776 -32.629146 \n", + "0 199.769231 35951.026924 194.188649 35946.000000 39.815143 \n", + "0 620.625000 12170.500000 605.333333 12156.333333 12.128117 \n", + "0 101.625000 16703.875000 88.753062 16698.444444 17.588389 \n", + "0 602.794118 49398.823529 576.000000 49387.000000 19.219381 \n", + "\n", + " blotch_radius_1 blotch_radius_2 blotch_x blotch_y fnotch_value \n", + "0 19.322250 15.003017 596.160853 7183.073644 0.426667 \n", + "0 19.322250 15.003017 596.160853 7183.073644 0.085106 \n", + "0 20.797405 17.382564 196.587607 7157.106838 0.493506 \n", + "0 20.797405 17.382564 196.587607 7157.106838 0.071429 \n", + "0 17.757485 13.575457 406.155303 6976.371212 0.388889 \n", + "0 17.640700 14.012971 745.942222 6578.008333 0.361702 \n", + "0 13.761094 11.862814 277.974638 7080.137681 0.342857 \n", + "0 21.040848 16.441664 103.856482 6991.898148 0.485714 \n", + "0 26.062811 19.382369 276.591270 6971.150794 0.475000 \n", + "0 19.694798 16.116172 784.238760 6659.773256 0.358209 \n", + "0 15.650744 13.314149 495.455333 6625.148333 0.242424 \n", + "0 20.068281 16.801532 337.406863 6754.058824 0.527778 \n", + "0 11.012768 10.390235 522.358427 7544.613676 0.166667 \n", + "0 10.879588 10.314751 450.003414 7519.021221 0.194444 \n", + "0 11.892123 10.847372 362.535612 7576.153846 0.333333 \n", + "0 12.236850 11.025464 193.123590 7515.214047 0.378378 \n", + "0 10.592947 10.911996 61.581766 4784.420940 0.133333 \n", + "0 11.995603 11.639124 668.363139 4588.187830 0.343750 \n", + "0 10.870705 10.779755 454.365037 4565.397777 0.218750 \n", + "0 16.442826 13.527928 311.337621 3242.869762 0.189655 \n", + "0 22.773811 17.558686 220.820834 3113.592593 0.428571 \n", + "0 25.522284 21.088602 752.388726 2899.176471 0.460317 \n", + "0 25.398668 19.492700 697.547686 2943.250000 0.409836 \n", + "0 27.329808 21.301991 355.544286 2912.942857 0.435484 \n", + "0 22.870091 18.479712 116.209723 2987.731482 0.419355 \n", + "0 20.022918 14.855320 20.958334 45132.125000 0.578947 \n", + "0 17.983717 15.315785 261.511111 44987.466667 0.705882 \n", + "0 17.983717 15.315785 261.511111 44987.466667 0.166667 \n", + "0 15.537509 13.619684 486.642857 45083.857143 0.750000 \n", + "0 16.731236 16.216426 645.200000 44964.100000 0.836066 \n", + ".. ... ... ... ... ... \n", + "0 12.092940 10.000000 63.500000 21001.000000 0.625000 \n", + "0 21.920615 16.175480 76.500000 20914.000000 0.615385 \n", + "0 29.197268 21.897951 420.500000 35108.333333 0.869565 \n", + "0 14.544501 12.783376 455.750000 19838.250000 0.777778 \n", + "0 23.971911 18.041434 591.750000 19927.500000 0.789474 \n", + "0 14.933034 13.074776 568.750000 20009.000000 0.733333 \n", + "0 18.020813 14.682276 18.333333 20233.333333 0.823529 \n", + "0 15.775513 13.331635 145.400000 20248.400000 0.666667 \n", + "0 24.793347 18.595010 312.833333 30876.333333 0.769231 \n", + "0 36.883929 24.763149 208.000000 15501.000000 0.700000 \n", + "0 10.000000 10.000000 384.833333 27349.333333 0.785714 \n", + "0 13.530420 11.814482 521.666667 26886.333333 0.842105 \n", + "0 10.000000 10.000000 786.500000 26950.000000 0.769231 \n", + "0 12.690195 10.876198 641.916667 23611.333333 0.700000 \n", + "0 10.000000 10.000000 593.605550 16481.000000 0.700000 \n", + "0 17.404399 13.886633 321.972229 334.000000 0.700000 \n", + "0 22.585011 16.938758 319.972229 217.333333 0.750000 \n", + "0 19.899622 16.591383 323.555557 5936.666667 0.900000 \n", + "0 10.000000 10.000000 0.000000 15344.000000 0.625000 \n", + "0 10.909307 10.000000 349.833333 15354.000000 0.750000 \n", + "0 21.253096 13.226462 682.166667 14950.666667 0.571429 \n", + "0 17.484020 10.000000 703.166667 15231.333333 0.700000 \n", + "0 21.401127 16.884179 755.500000 20813.000000 0.625000 \n", + "0 10.000000 10.000000 291.605550 16529.666667 0.727273 \n", + "0 18.179944 10.000000 515.000000 5573.666667 0.921053 \n", + "0 26.297635 21.974155 249.222229 13348.777776 0.823529 \n", + "0 10.568233 10.000000 194.188649 35946.000000 0.812500 \n", + "0 14.533616 12.566879 605.333333 12156.333333 0.727273 \n", + "0 12.754395 11.039881 88.753062 16698.444444 0.727273 \n", + "0 24.492832 18.443356 576.000000 49387.000000 0.918919 \n", + "\n", + "[1764 rows x 15 columns]" + ] + }, + "execution_count": 137, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "pd.read_csv(fnotches[0], index_col=0)" + ] + }, + { + "cell_type": "code", + "execution_count": 106, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "df['image_x image_y'.split()].to_csv(s, header=False, index=False)" + ] + }, + { + "cell_type": "code", + "execution_count": 107, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "b'**I/O ERROR** Unable to open [<_io.StringIO object at 0x107684948>].\\n'\n" + ] + } + ], + "source": [ + "try:\n", + " _ = campt(from_=s, to='ESP_021684_0985_blotches_campt.txt',\n", + " format='flat', append='no', coordlist='coordlist.txt',\n", + " coordtype='image')\n", + "except ProcessError as e:\n", + " print(e.stderr)" + ] + }, + { + "cell_type": "code", + "execution_count": 130, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "obsids = !cat /Users/klay6683/Dropbox/data/planet4/season2_3_image_names.txt" + ] + }, + { + "cell_type": "code", + "execution_count": 131, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "def xy2latlon(obsid):\n", + " from pathlib import Path\n", + " from pysis.isis import campt\n", + " from pysis.exceptions import ProcessError\n", + " coords = ['image_x','image_y']\n", + " edrpath = Path('/Users/klay6683/data/planet4/season2_3_EDRs/')\n", + " clusterpath = Path('/Users/klay6683/Dropbox/data/planet4/season23_catalog/') \n", + " for marking in ['_fans', '_blotches']:\n", + " inpath = clusterpath / (obsid + marking + '.csv')\n", + " df = pd.read_csv(inpath, index_col=0)\n", + " temppath = inpath.with_suffix('.tocampt')\n", + " df[coords].to_csv(str(temppath), header=False, index=False)\n", + " mosaicname = 'redMosaic' + obsid + '.cub'\n", + " mosaicpath = edrpath / mosaicname\n", + " savename = inpath.stem + '_campt_out.csv'\n", + " savepath = edrpath / savename\n", + " try:\n", + " campt(from_=mosaicname, to=savepath, format='flat', append='no',\n", + " coordlist=temppath, coordtype='image')\n", + " except ProcessError as e:\n", + " print(e.stderr)\n", + " return obsid, False\n", + " return obsid, True" + ] + }, + { + "cell_type": "code", + "execution_count": 119, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "savepath = xy2latlon(fnames[0])" + ] + }, + { + "cell_type": "code", + "execution_count": 128, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "c = Client()" + ] + }, + { + "cell_type": "code", + "execution_count": 129, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "lbview = c.load_balanced_view()" + ] + }, + { + "cell_type": "code", + "execution_count": 132, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "results = lbview.map_async(xy2latlon, obsids)" + ] + }, + { + "cell_type": "code", + "execution_count": 133, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "nb_progress_display(results, obsids)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "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.5.0" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/notebooks/2015-10-27 parsing HiRISE labels.ipynb b/notebooks/2015-10-27 parsing HiRISE labels.ipynb new file mode 100644 index 0000000..286dcb3 --- /dev/null +++ b/notebooks/2015-10-27 parsing HiRISE labels.ipynb @@ -0,0 +1,6 @@ +{ + "cells": [], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/notebooks/2015-10-28 L_s graphic.ipynb b/notebooks/2015-10-28 L_s graphic.ipynb new file mode 100644 index 0000000..cbc5607 --- /dev/null +++ b/notebooks/2015-10-28 L_s graphic.ipynb @@ -0,0 +1,951 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%matplotlib nbagg\n", + "# import seaborn as sns\n", + "# sns.set_context('notebook')" + ] + }, + { + "cell_type": "code", + "execution_count": 248, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "from matplotlib.lines import Line2D\n", + "def draw_coord_axes(ax):\n", + " xline = Line2D([-4.8, 4.8], [0, 0], ls='dotted',lw=2)\n", + " yline = Line2D([0, 0], [-8.5, 4.5], ls='dotted', lw=2)\n", + " ax.add_line(xline)\n", + " ax.add_line(yline)" + ] + }, + { + "cell_type": "code", + "execution_count": 298, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "def annotate_degrees(ax):\n", + " size = 55\n", + " ax.annotate('$0^\\circ$', xy=(5.5, 0), va='center', size=size)\n", + " ax.annotate('$180^\\circ$', xy=(-10, 0), va='center', size=size)\n", + " ax.annotate('$90^\\circ$', xy=(0, 5), ha='center', size=size)\n", + " ax.annotate('$270^\\circ$', xy=(0, -9), va='top', ha='center', size=size)" + ] + }, + { + "cell_type": "code", + "execution_count": 299, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "import math\n", + "from matplotlib.patches import Circle\n", + "def annotate_sun(ax):\n", + " circle = Circle(xy=(0, 0), radius=2, color='yellow')\n", + " ax.add_artist(circle)" + ] + }, + { + "cell_type": "code", + "execution_count": 300, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "def draw_ls(ls, ax):\n", + " theta = math.radians(ls)\n", + " ax.annotate('',\n", + " xy=(theta, 5), # theta, radius\n", + " xytext=(0, 0), # theta, radius\n", + " xycoords='polar',\n", + " textcoords='polar',\n", + " arrowprops=dict(facecolor='black', width=10, headwidth=20),\n", + " horizontalalignment='center',\n", + " verticalalignment='center',\n", + " clip_on=True, # clip to the axes bounding box\n", + " )" + ] + }, + { + "cell_type": "code", + "execution_count": 301, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "application/javascript": [ + "/* Put everything inside the global mpl namespace */\n", + "window.mpl = {};\n", + "\n", + "mpl.get_websocket_type = function() {\n", + " if (typeof(WebSocket) !== 'undefined') {\n", + " return WebSocket;\n", + " } else if (typeof(MozWebSocket) !== 'undefined') {\n", + " return MozWebSocket;\n", + " } else {\n", + " alert('Your browser does not have WebSocket support.' +\n", + " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", + " 'Firefox 4 and 5 are also supported but you ' +\n", + " 'have to enable WebSockets in about:config.');\n", + " };\n", + "}\n", + "\n", + "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", + " this.id = figure_id;\n", + "\n", + " this.ws = websocket;\n", + "\n", + " this.supports_binary = (this.ws.binaryType != undefined);\n", + "\n", + " if (!this.supports_binary) {\n", + " var warnings = document.getElementById(\"mpl-warnings\");\n", + " if (warnings) {\n", + " warnings.style.display = 'block';\n", + " warnings.textContent = (\n", + " \"This browser does not support binary websocket messages. \" +\n", + " \"Performance may be slow.\");\n", + " }\n", + " }\n", + "\n", + " this.imageObj = new Image();\n", + "\n", + " this.context = undefined;\n", + " this.message = undefined;\n", + " this.canvas = undefined;\n", + " this.rubberband_canvas = undefined;\n", + " this.rubberband_context = undefined;\n", + " this.format_dropdown = undefined;\n", + "\n", + " this.image_mode = 'full';\n", + "\n", + " this.root = $('
');\n", + " this._root_extra_style(this.root)\n", + " this.root.attr('style', 'display: inline-block');\n", + "\n", + " $(parent_element).append(this.root);\n", + "\n", + " this._init_header(this);\n", + " this._init_canvas(this);\n", + " this._init_toolbar(this);\n", + "\n", + " var fig = this;\n", + "\n", + " this.waiting = false;\n", + "\n", + " this.ws.onopen = function () {\n", + " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", + " fig.send_message(\"send_image_mode\", {});\n", + " fig.send_message(\"refresh\", {});\n", + " }\n", + "\n", + " this.imageObj.onload = function() {\n", + " if (fig.image_mode == 'full') {\n", + " // Full images could contain transparency (where diff images\n", + " // almost always do), so we need to clear the canvas so that\n", + " // there is no ghosting.\n", + " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", + " }\n", + " fig.context.drawImage(fig.imageObj, 0, 0);\n", + " };\n", + "\n", + " this.imageObj.onunload = function() {\n", + " this.ws.close();\n", + " }\n", + "\n", + " this.ws.onmessage = this._make_on_message_function(this);\n", + "\n", + " this.ondownload = ondownload;\n", + "}\n", + "\n", + "mpl.figure.prototype._init_header = function() {\n", + " var titlebar = $(\n", + " '
');\n", + " var titletext = $(\n", + " '
');\n", + " titlebar.append(titletext)\n", + " this.root.append(titlebar);\n", + " this.header = titletext[0];\n", + "}\n", + "\n", + "\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._init_canvas = function() {\n", + " var fig = this;\n", + "\n", + " var canvas_div = $('
');\n", + "\n", + " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", + "\n", + " function canvas_keyboard_event(event) {\n", + " return fig.key_event(event, event['data']);\n", + " }\n", + "\n", + " canvas_div.keydown('key_press', canvas_keyboard_event);\n", + " canvas_div.keyup('key_release', canvas_keyboard_event);\n", + " this.canvas_div = canvas_div\n", + " this._canvas_extra_style(canvas_div)\n", + " this.root.append(canvas_div);\n", + "\n", + " var canvas = $('');\n", + " canvas.addClass('mpl-canvas');\n", + " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", + "\n", + " this.canvas = canvas[0];\n", + " this.context = canvas[0].getContext(\"2d\");\n", + "\n", + " var rubberband = $('');\n", + " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", + "\n", + " var pass_mouse_events = true;\n", + "\n", + " canvas_div.resizable({\n", + " start: function(event, ui) {\n", + " pass_mouse_events = false;\n", + " },\n", + " resize: function(event, ui) {\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " stop: function(event, ui) {\n", + " pass_mouse_events = true;\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " });\n", + "\n", + " function mouse_event_fn(event) {\n", + " if (pass_mouse_events)\n", + " return fig.mouse_event(event, event['data']);\n", + " }\n", + "\n", + " rubberband.mousedown('button_press', mouse_event_fn);\n", + " rubberband.mouseup('button_release', mouse_event_fn);\n", + " // Throttle sequential mouse events to 1 every 20ms.\n", + " rubberband.mousemove('motion_notify', mouse_event_fn);\n", + "\n", + " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", + " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", + "\n", + " canvas_div.on(\"wheel\", function (event) {\n", + " event = event.originalEvent;\n", + " event['data'] = 'scroll'\n", + " if (event.deltaY < 0) {\n", + " event.step = 1;\n", + " } else {\n", + " event.step = -1;\n", + " }\n", + " mouse_event_fn(event);\n", + " });\n", + "\n", + " canvas_div.append(canvas);\n", + " canvas_div.append(rubberband);\n", + "\n", + " this.rubberband = rubberband;\n", + " this.rubberband_canvas = rubberband[0];\n", + " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", + " this.rubberband_context.strokeStyle = \"#000000\";\n", + "\n", + " this._resize_canvas = function(width, height) {\n", + " // Keep the size of the canvas, canvas container, and rubber band\n", + " // canvas in synch.\n", + " canvas_div.css('width', width)\n", + " canvas_div.css('height', height)\n", + "\n", + " canvas.attr('width', width);\n", + " canvas.attr('height', height);\n", + "\n", + " rubberband.attr('width', width);\n", + " rubberband.attr('height', height);\n", + " }\n", + "\n", + " // Set the figure to an initial 600x600px, this will subsequently be updated\n", + " // upon first draw.\n", + " this._resize_canvas(600, 600);\n", + "\n", + " // Disable right mouse context menu.\n", + " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", + " return false;\n", + " });\n", + "\n", + " function set_focus () {\n", + " canvas.focus();\n", + " canvas_div.focus();\n", + " }\n", + "\n", + " window.setTimeout(set_focus, 100);\n", + "}\n", + "\n", + "mpl.figure.prototype._init_toolbar = function() {\n", + " var fig = this;\n", + "\n", + " var nav_element = $('
')\n", + " nav_element.attr('style', 'width: 100%');\n", + " this.root.append(nav_element);\n", + "\n", + " // Define a callback function for later on.\n", + " function toolbar_event(event) {\n", + " return fig.toolbar_button_onclick(event['data']);\n", + " }\n", + " function toolbar_mouse_event(event) {\n", + " return fig.toolbar_button_onmouseover(event['data']);\n", + " }\n", + "\n", + " for(var toolbar_ind in mpl.toolbar_items) {\n", + " var name = mpl.toolbar_items[toolbar_ind][0];\n", + " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", + " var image = mpl.toolbar_items[toolbar_ind][2];\n", + " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", + "\n", + " if (!name) {\n", + " // put a spacer in here.\n", + " continue;\n", + " }\n", + " var button = $('