From f55cbbfd4df4da911defa3ccaffc5101e3051672 Mon Sep 17 00:00:00 2001
From: Tyler Thatcher <tdt62@nau.edu>
Date: Mon, 14 May 2018 11:04:04 -0700
Subject: [PATCH] Updated read_atf

---
 notebooks/Socet2ISIS.ipynb | 558 +++----------------------------------
 1 file changed, 35 insertions(+), 523 deletions(-)

diff --git a/notebooks/Socet2ISIS.ipynb b/notebooks/Socet2ISIS.ipynb
index cf8bd44..a0e5788 100644
--- a/notebooks/Socet2ISIS.ipynb
+++ b/notebooks/Socet2ISIS.ipynb
@@ -2,18 +2,9 @@
  "cells": [
   {
    "cell_type": "code",
-   "execution_count": 5,
+   "execution_count": null,
    "metadata": {},
-   "outputs": [
-    {
-     "name": "stderr",
-     "output_type": "stream",
-     "text": [
-      "/home/tthatcher/anaconda3/envs/autocnet/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.\n",
-      "  from ._conv import register_converters as _register_converters\n"
-     ]
-    }
-   ],
+   "outputs": [],
    "source": [
     "import os\n",
     "import sys\n",
@@ -25,467 +16,49 @@
     "import math\n",
     "import pyproj\n",
     "\n",
-    "# Path to local plio if wanted\n",
-    "sys.path.insert(0, \"/home/tthatcher/Desktop/Projects/Plio/plio\")\n",
-    "\n",
     "from plio.examples import get_path\n",
     "from plio.io.io_bae import read_gpf, read_ipf\n",
+    "from collections import defaultdict\n",
     "import plio.io.io_controlnetwork as cn\n",
     "import plio.io.isis_serial_number as sn"
    ]
   },
   {
    "cell_type": "code",
-   "execution_count": 32,
+   "execution_count": null,
    "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "HATS_File_Version_7\n",
-      "\n",
-      "PROJ_FLAG 1\n",
-      "\n",
-      "PROJECT D:\\data\\CTX_Athabasca_Middle.prj\n",
-      "\n",
-      "ATF_FILE CTX_Athabasca_Middle_step0.atf\n",
-      "\n",
-      "GP_FILE CTX_Athabasca_Middle.gpf\n",
-      "\n",
-      "STRAT_FILE apm.apm_strat\n",
-      "\n",
-      "SOLVE_STRAT_FILE default.solve\n",
-      "\n",
-      "DTM_FILE null\n",
-      "\n",
-      "GPS_INFO_FILE null\n",
-      "\n",
-      "INPUT_COV_FILE null\n",
-      "\n",
-      "TRI_CONSTRAINT_FILE null\n",
-      "\n",
-      "ADJ absolute\n",
-      "\n",
-      "NUM_IMGS 6\n",
-      "\n",
-      "STRIP_SEQ 0\n",
-      "\n",
-      "NUM_STRIPS 3\n",
-      "\n",
-      "STRIP_FLAG 1\n",
-      "\n",
-      "STRIP_FLAG 1\n",
-      "\n",
-      "STRIP_ID 1\n",
-      "\n",
-      "IMAGE_SEQ 0\n",
-      "\n",
-      "NUM_IMGS_STRIP 2\n",
-      "\n",
-      "STRIP_BEGIN         0         0         0       0.0       0.0\n",
-      "\n",
-      "STRIP_END         0         0         0       0.0       0.0\n",
-      "\n",
-      "STRIP_SCAN 1\n",
-      "\n",
-      "IMAGE_FLAG 1\n",
-      "\n",
-      "IMAGE_FLAG 1\n",
-      "\n",
-      "IMAGE_ID 0\n",
-      "\n",
-      "IMAGE_SUP P19_008344_1894_XN_09N203W.sup\n",
-      "\n",
-      "IMAGE_IPF P19_008344_1894_XN_09N203W.ipf\n",
-      "\n",
-      "SENSOR GENERIC_PUSHBROOM\n",
-      "\n",
-      "INCLUDE_IN_SOLUTION 1\n",
-      "\n",
-      "IMG_DATA_1       60.0        0.0\n",
-      "\n",
-      "IMG_DATA_2     1000.0        0.0\n",
-      "\n",
-      "IMG_DATA_3        0.0      228.6\n",
-      "\n",
-      "DEFAULT_FLAG 1\n",
-      "\n",
-      "NUM_ADJ_PARMS 16\n",
-      "\n",
-      "ADJUST_&_SIGMA  0                  100\n",
-      "\n",
-      "ADJUST_&_SIGMA  0                  100\n",
-      "\n",
-      "ADJUST_&_SIGMA  0                   10\n",
-      "\n",
-      "ADJUST_&_SIGMA  0                   13\n",
-      "\n",
-      "ADJUST_&_SIGMA  0                   13\n",
-      "\n",
-      "ADJUST_&_SIGMA  0                  1.3\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0173\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0173\n",
-      "\n",
-      "ADJUST_&_SIGMA  0                  0.1\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0017\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0017\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0017\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0002\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0002\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0002\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0353\n",
-      "\n",
-      "IMAGE_FLAG 1\n",
-      "\n",
-      "IMAGE_ID 1\n",
-      "\n",
-      "IMAGE_SUP P20_008845_1894_XN_09N203W.sup\n",
-      "\n",
-      "IMAGE_IPF P20_008845_1894_XN_09N203W.ipf\n",
-      "\n",
-      "SENSOR GENERIC_PUSHBROOM\n",
-      "\n",
-      "INCLUDE_IN_SOLUTION 1\n",
-      "\n",
-      "IMG_DATA_1       60.0        0.0\n",
-      "\n",
-      "IMG_DATA_2     1000.0        0.0\n",
-      "\n",
-      "IMG_DATA_3        0.0      228.6\n",
-      "\n",
-      "DEFAULT_FLAG 1\n",
-      "\n",
-      "NUM_ADJ_PARMS 16\n",
-      "\n",
-      "ADJUST_&_SIGMA  1                  100\n",
-      "\n",
-      "ADJUST_&_SIGMA  1                  100\n",
-      "\n",
-      "ADJUST_&_SIGMA  1                   10\n",
-      "\n",
-      "ADJUST_&_SIGMA  1                   13\n",
-      "\n",
-      "ADJUST_&_SIGMA  1                   13\n",
-      "\n",
-      "ADJUST_&_SIGMA  1                  1.3\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0173\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0173\n",
-      "\n",
-      "ADJUST_&_SIGMA  1                  0.1\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0017\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0017\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0017\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0002\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0002\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0002\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0353\n",
-      "\n",
-      "STRIP_FLAG 1\n",
-      "\n",
-      "STRIP_ID 2\n",
-      "\n",
-      "IMAGE_SEQ 0\n",
-      "\n",
-      "NUM_IMGS_STRIP 2\n",
-      "\n",
-      "STRIP_BEGIN         0         0         0       0.0       0.0\n",
-      "\n",
-      "STRIP_END         0         0         0       0.0       0.0\n",
-      "\n",
-      "STRIP_SCAN 1\n",
-      "\n",
-      "IMAGE_FLAG 1\n",
-      "\n",
-      "IMAGE_FLAG 1\n",
-      "\n",
-      "IMAGE_ID 0\n",
-      "\n",
-      "IMAGE_SUP P03_002371_1888_XI_08N204W.sup\n",
-      "\n",
-      "IMAGE_IPF P03_002371_1888_XI_08N204W.ipf\n",
-      "\n",
-      "SENSOR GENERIC_PUSHBROOM\n",
-      "\n",
-      "INCLUDE_IN_SOLUTION 0\n",
-      "\n",
-      "IMG_DATA_1       60.0        0.0\n",
-      "\n",
-      "IMG_DATA_2     1000.0        0.0\n",
-      "\n",
-      "IMG_DATA_3        0.0      228.6\n",
-      "\n",
-      "DEFAULT_FLAG 1\n",
-      "\n",
-      "NUM_ADJ_PARMS 16\n",
-      "\n",
-      "ADJUST_&_SIGMA  0                  100\n",
-      "\n",
-      "ADJUST_&_SIGMA  0                  100\n",
-      "\n",
-      "ADJUST_&_SIGMA  0                   10\n",
-      "\n",
-      "ADJUST_&_SIGMA  0                   13\n",
-      "\n",
-      "ADJUST_&_SIGMA  0                   13\n",
-      "\n",
-      "ADJUST_&_SIGMA  0                  1.3\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0173\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0173\n",
-      "\n",
-      "ADJUST_&_SIGMA  0                  0.1\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0017\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0017\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0017\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0002\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0002\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0002\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0353\n",
-      "\n",
-      "IMAGE_FLAG 1\n",
-      "\n",
-      "IMAGE_ID 1\n",
-      "\n",
-      "IMAGE_SUP P01_001540_1889_XI_08N204W.sup\n",
-      "\n",
-      "IMAGE_IPF P01_001540_1889_XI_08N204W.ipf\n",
-      "\n",
-      "SENSOR GENERIC_PUSHBROOM\n",
-      "\n",
-      "INCLUDE_IN_SOLUTION 0\n",
-      "\n",
-      "IMG_DATA_1       60.0        0.0\n",
-      "\n",
-      "IMG_DATA_2     1000.0        0.0\n",
-      "\n",
-      "IMG_DATA_3        0.0      228.6\n",
-      "\n",
-      "DEFAULT_FLAG 1\n",
-      "\n",
-      "NUM_ADJ_PARMS 16\n",
-      "\n",
-      "ADJUST_&_SIGMA  1                  100\n",
-      "\n",
-      "ADJUST_&_SIGMA  1                  100\n",
-      "\n",
-      "ADJUST_&_SIGMA  1                   10\n",
-      "\n",
-      "ADJUST_&_SIGMA  1                   13\n",
-      "\n",
-      "ADJUST_&_SIGMA  1                   13\n",
-      "\n",
-      "ADJUST_&_SIGMA  1                  1.3\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0173\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0173\n",
-      "\n",
-      "ADJUST_&_SIGMA  1                  0.1\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0017\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0017\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0017\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0002\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0002\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0002\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0353\n",
-      "\n",
-      "STRIP_FLAG 1\n",
-      "\n",
-      "STRIP_ID 3\n",
-      "\n",
-      "IMAGE_SEQ 0\n",
-      "\n",
-      "NUM_IMGS_STRIP 2\n",
-      "\n",
-      "STRIP_BEGIN         0         0         0       0.0       0.0\n",
-      "\n",
-      "STRIP_END         0         0         0       0.0       0.0\n",
-      "\n",
-      "STRIP_SCAN 1\n",
-      "\n",
-      "IMAGE_FLAG 1\n",
-      "\n",
-      "IMAGE_FLAG 1\n",
-      "\n",
-      "IMAGE_ID 0\n",
-      "\n",
-      "IMAGE_SUP P01_001606_1897_XI_09N203W.sup\n",
-      "\n",
-      "IMAGE_IPF P01_001606_1897_XI_09N203W.ipf\n",
-      "\n",
-      "SENSOR GENERIC_PUSHBROOM\n",
-      "\n",
-      "INCLUDE_IN_SOLUTION 0\n",
-      "\n",
-      "IMG_DATA_1       60.0        0.0\n",
-      "\n",
-      "IMG_DATA_2     1000.0        0.0\n",
-      "\n",
-      "IMG_DATA_3        0.0      228.6\n",
-      "\n",
-      "DEFAULT_FLAG 1\n",
-      "\n",
-      "NUM_ADJ_PARMS 16\n",
-      "\n",
-      "ADJUST_&_SIGMA  0                  100\n",
-      "\n",
-      "ADJUST_&_SIGMA  0                  100\n",
-      "\n",
-      "ADJUST_&_SIGMA  0                   10\n",
-      "\n",
-      "ADJUST_&_SIGMA  0                   13\n",
-      "\n",
-      "ADJUST_&_SIGMA  0                   13\n",
-      "\n",
-      "ADJUST_&_SIGMA  0                  1.3\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0173\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0173\n",
-      "\n",
-      "ADJUST_&_SIGMA  0                  0.1\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0017\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0017\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0017\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0002\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0002\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0002\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0353\n",
-      "\n",
-      "IMAGE_FLAG 1\n",
-      "\n",
-      "IMAGE_ID 1\n",
-      "\n",
-      "IMAGE_SUP P03_002226_1895_XI_09N203W.sup\n",
-      "\n",
-      "IMAGE_IPF P03_002226_1895_XI_09N203W.ipf\n",
-      "\n",
-      "SENSOR GENERIC_PUSHBROOM\n",
-      "\n",
-      "INCLUDE_IN_SOLUTION 0\n",
-      "\n",
-      "IMG_DATA_1       60.0        0.0\n",
-      "\n",
-      "IMG_DATA_2     1000.0        0.0\n",
-      "\n",
-      "IMG_DATA_3        0.0      228.6\n",
-      "\n",
-      "DEFAULT_FLAG 1\n",
-      "\n",
-      "NUM_ADJ_PARMS 16\n",
-      "\n",
-      "ADJUST_&_SIGMA  1                  100\n",
-      "\n",
-      "ADJUST_&_SIGMA  1                  100\n",
-      "\n",
-      "ADJUST_&_SIGMA  1                   10\n",
-      "\n",
-      "ADJUST_&_SIGMA  1                   13\n",
-      "\n",
-      "ADJUST_&_SIGMA  1                   13\n",
-      "\n",
-      "ADJUST_&_SIGMA  1                  1.3\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0173\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0173\n",
-      "\n",
-      "ADJUST_&_SIGMA  1                  0.1\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0017\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0017\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0017\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0002\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0002\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0002\n",
-      "\n",
-      "ADJUST_&_SIGMA  0               0.0353\n",
-      "\n",
-      "TPP_FILE 3x3.tpp\n",
-      "\n",
-      "TRANS_TF_CTL_IMG 0\n",
-      "\n",
-      "UPDATE_ZERO_SIGMAS 0\n",
-      "\n",
-      "USE_DTM_FILE 0\n",
-      "\n",
-      "USE_GPS_FILE 0\n",
-      "\n",
-      "USE_INPUT_COV_FILE 0\n",
-      "\n",
-      "USE_TRI_CONSTRAINT_FILE 0\n",
-      "\n",
-      "PERCENT_REMOVED_POINTS 50\n",
-      "\n",
-      "{'IMAGE_IPF': [['IMAGE_IPF', 'P19_008344_1894_XN_09N203W.ipf'], ['IMAGE_IPF', 'P20_008845_1894_XN_09N203W.ipf'], ['IMAGE_IPF', 'P03_002371_1888_XI_08N204W.ipf'], ['IMAGE_IPF', 'P01_001540_1889_XI_08N204W.ipf'], ['IMAGE_IPF', 'P01_001606_1897_XI_09N203W.ipf'], ['IMAGE_IPF', 'P03_002226_1895_XI_09N203W.ipf']], 'IMAGE_SUP': [['IMAGE_SUP', 'P19_008344_1894_XN_09N203W.sup'], ['IMAGE_SUP', 'P20_008845_1894_XN_09N203W.sup'], ['IMAGE_SUP', 'P03_002371_1888_XI_08N204W.sup'], ['IMAGE_SUP', 'P01_001540_1889_XI_08N204W.sup'], ['IMAGE_SUP', 'P01_001606_1897_XI_09N203W.sup'], ['IMAGE_SUP', 'P03_002226_1895_XI_09N203W.sup']], 'PATH': '/home/tthatcher/Desktop/Projects/plio_imgs/quest_imgs'}\n"
-     ]
-    }
-   ],
+   "outputs": [],
    "source": [
-    "from collections import defaultdict\n",
-    "\n",
-    "atf_file = ('/home/tthatcher/Desktop/Projects/plio_imgs/quest_imgs/CTX_Athabasca_Middle_step0.atf')\n",
-    "\n",
-    "with open(atf_file) as f:\n",
+    "# Reads a .atf file and outputs all of the \n",
+    "# .ipf, .gpf, .sup, .prj, and path to locate the \n",
+    "# .apf file (should be the same as all others) \n",
+    "def read_atf(atf_file):\n",
+    "    with open(atf_file) as f:\n",
     "        \n",
-    "        files_ext = ['.prj', '.sup', '.ipf']\n",
+    "        # Extensions of files we want\n",
+    "        files_ext = ['.prj', '.sup', '.ipf', '.gpf']\n",
     "        files_dict = []\n",
     "        files = defaultdict(list)\n",
     "\n",
     "        for line in f:\n",
-    "            print(line)\n",
-    "            ext = os.path.splitext(line)[-1]\n",
+    "            ext = os.path.splitext(line)[-1].strip()\n",
     "            \n",
+    "            # Check is needed for split as all do not have a space\n",
     "            if ext in files_ext:\n",
-    "                files[ext.strip()].append(line.strip().split(' '))\n",
-    "        \n",
+    "                \n",
+    "                # If it is the .prj file, it strips the directory away and grabs file name\n",
+    "                if ext == '.prj':\n",
+    "                    files[ext].append(line.strip().split(' ')[1].split('\\\\')[-1])\n",
+    "                \n",
+    "                # If the ext is in the list of files we care about, it addes to the dict\n",
+    "                files[ext].append(line.strip().split(' ')[-1])\n",
+    "            \n",
+    "            else:\n",
+    "                \n",
+    "                # Adds to the dict even if not in files we care about\n",
+    "                files[ext.strip()].append(line)\n",
     "        \n",
+    "        # Gets the base filepath\n",
     "        files['basepath'] = os.path.dirname(os.path.abspath(atf_file))\n",
     "        \n",
     "        # Creates a dict out of file lists for GPF, PRJ, IPF, and ATF\n",
@@ -497,69 +70,14 @@
     "        # Sets the value of IMAGE_SUP to all SUP images\n",
     "        files_dict['IMAGE_SUP'] = files['.sup']\n",
     "        \n",
-    "        # Sets the value of PATH to the path of the ATF file\n",
-    "        files_dict['PATH'] = files['basepath']\n",
-    "        \n",
-    "print(files_dict)\n"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": []
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "# Reads a .atf file and outputs all of the \n",
-    "# .ipf, .gpf, .sup, .prj, and path to locate the \n",
-    "# .apf file (should be the same as all others) \n",
-    "def read_atf(atf_file):\n",
-    "    with open(atf_file) as f:\n",
-    "\n",
-    "        files = []\n",
-    "        ipf = []\n",
-    "        sup = []\n",
-    "        files_dict = []\n",
-    "        \n",
-    "        # Grabs every PRJ, GPF, SUP, and IPF image from the ATF file\n",
-    "        for line in f:\n",
-    "            if line[-4:-1] == 'prj' or line[-4:-1] == 'gpf' or line[-4:-1] == 'sup' or line[-4:-1] == 'ipf' or line[-4:-1] == 'atf':\n",
-    "                files.append(line)\n",
-    "        \n",
-    "        files = np.array(files)\n",
+    "        # Sets value for GPF file\n",
+    "        files_dict['GP_FILE'] = files['.gpf'][0]\n",
     "        \n",
-    "        # Creates appropriate arrays for certain files in the right format\n",
-    "        for file in files:\n",
-    "            file = file.strip()\n",
-    "            file = file.split(' ')\n",
-    "\n",
-    "            # Grabs all the IPF files\n",
-    "            if file[1].endswith('.ipf'):\n",
-    "                ipf.append(file[1])\n",
-    "\n",
-    "            # Grabs all the SUP files\n",
-    "            if file[1].endswith('.sup'):\n",
-    "                sup.append(file[1])\n",
-    "\n",
-    "            files_dict.append(file)\n",
-    "\n",
-    "        # Creates a dict out of file lists for GPF, PRJ, IPF, and ATF\n",
-    "        files_dict = (dict(files_dict))\n",
-    "        \n",
-    "        # Sets the value of IMAGE_IPF to all IPF images\n",
-    "        files_dict['IMAGE_IPF'] = ipf\n",
-    "        \n",
-    "        # Sets the value of IMAGE_SUP to all SUP images\n",
-    "        files_dict['IMAGE_SUP'] = sup\n",
+    "        # Sets value for PRJ file\n",
+    "        files_dict['PROJECT'] = files['.prj'][0]\n",
     "        \n",
     "        # Sets the value of PATH to the path of the ATF file\n",
-    "        files_dict['PATH'] = os.path.dirname(os.path.abspath(atf_file))\n",
+    "        files_dict['PATH'] = files['basepath']\n",
     "        \n",
     "        return files_dict\n",
     "\n",
@@ -753,7 +271,7 @@
     "\n",
     "# applys transformations to columns\n",
     "def apply_transformations(atf_dict, df):\n",
-    "    prj_file = os.path.join(atf_dict['PATH'], atf_dict['PROJECT'].split('\\\\')[-1])\n",
+    "    prj_file = os.path.join(atf_dict['PATH'], atf_dict['PROJECT'])\n",
     "    \n",
     "    eRadius, pRadius = get_axis(prj_file)\n",
     "    \n",
@@ -831,15 +349,11 @@
    },
    "outputs": [],
    "source": [
-    "# path = '/home/tthatcher/Desktop/Projects/plio_imgs/quest_imgs/'\n",
-    "# extension = '.lev1.cub'\n",
-    "# atf_file = ('/home/tthatcher/Desktop/Projects/plio_imgs/quest_imgs/CTX_Athabasca_Middle_step0.atf')\n",
-    "\n",
     "# Setup stuffs for the cub information namely the path and extension\n",
     "path = '/path/where/cub/files/are/'\n",
     "\n",
     "# Extension of your cub files\n",
-    "extension = '.8bit.cub'\n",
+    "extension = '.something.cub'\n",
     "\n",
     "# Path to atf file\n",
     "atf_file = ('/path/to/atf/file')\n",
@@ -851,9 +365,7 @@
     "serial_dict = serial_numbers(images, path, extension)\n",
     "\n",
     "# creates the control network\n",
-    "cn.to_isis('/path/you/want/the/cnet/to/be/in/cn.net', socet_df, serial_dict)\n",
-    "\n",
-    "# cn.to_isis('/home/tthatcher/Desktop/Projects/plio_imgs/quest_imgs/cn.net', socet_df, serial_dict)"
+    "cn.to_isis('/path/you/want/the/cnet/to/be/in/cn.net', socet_df, serial_dict)"
    ]
   },
   {
-- 
GitLab