From da9b8d25e1f9570ecd2159595b60fa07811a8d0e Mon Sep 17 00:00:00 2001 From: Jesse Mapel <jam826@nau.edu> Date: Fri, 18 Oct 2019 14:09:13 -0700 Subject: [PATCH] Removed subwindowing code from MDIS drivers (#303) * Removed subwindowing from MDIS drivers * ticked version --- CMakeLists.txt | 2 +- ale/drivers/mess_drivers.py | 56 ------------------------------ setup.py | 2 +- tests/pytests/test_mdis_drivers.py | 28 ++------------- 4 files changed, 4 insertions(+), 84 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 743e163..4eaa5ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ # Specify the required version of CMake. # cmake 3.10 required for ctest/gtest integration cmake_minimum_required(VERSION 3.10) -project(ale VERSION 0.6.0 DESCRIPTION "Abstraction Library for Ephemerides ") +project(ale VERSION 0.6.2 DESCRIPTION "Abstraction Library for Ephemerides ") # include what we need include(GNUInstallDirs) diff --git a/ale/drivers/mess_drivers.py b/ale/drivers/mess_drivers.py index 6afe767..2dc561d 100644 --- a/ale/drivers/mess_drivers.py +++ b/ale/drivers/mess_drivers.py @@ -173,34 +173,6 @@ class MessengerMdisPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, Driver): # eval at the focal_plane_temperature return f_t(self.label['FOCAL_PLANE_TEMPERATURE'].value) - @property - def detector_start_sample(self): - """ - Returns starting detector sample quired from Spice Kernels. - Expects ikid to be defined. This should be the integer Naid ID code for - the instrument. - - Returns - ------- - : int - starting detector sample - """ - return int(spice.gdpool('INS{}_FPUBIN_START_SAMPLE'.format(self.ikid), 0, 1)[0]) - - @property - def detector_start_line(self): - """ - Returns starting detector line acquired from Spice Kernels. - Expects ikid to be defined. This should be the integer Naid ID code for - the instrument. - - Returns - ------- - : int - starting detector line - """ - return int(spice.gdpool('INS{}_FPUBIN_START_LINE'.format(self.ikid), 0, 1)[0]) - @property def detector_center_sample(self): """ @@ -396,34 +368,6 @@ class MessengerMdisIsisLabelNaifSpiceDriver(IsisLabel, NaifSpice, Framer, Driver # eval at the focal_plane_temperature return f_t(self.label['IsisCube']['Instrument']['FocalPlaneTemperature'].value) - @property - def detector_start_sample(self): - """ - Returns starting detector sample quired from Spice Kernels. - Expects ikid to be defined. This should be the integer Naid ID code for - the instrument. - - Returns - ------- - : int - starting detector sample - """ - return int(spice.gdpool('INS{}_FPUBIN_START_SAMPLE'.format(self.ikid), 0, 1)[0]) - - @property - def detector_start_line(self): - """ - Returns starting detector line acquired from Spice Kernels. - Expects ikid to be defined. This should be the integer Naid ID code for - the instrument. - - Returns - ------- - : int - detector start line - """ - return int(spice.gdpool('INS{}_FPUBIN_START_LINE'.format(self.ikid), 0, 1)[0]) - @property def detector_center_sample(self): """ diff --git a/setup.py b/setup.py index bc239b9..cde239d 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ import sys from setuptools import setup, find_packages NAME = "Ale" -VERSION = "0.6.0" +VERSION = "0.6.2" # To install the library, run the following # diff --git a/tests/pytests/test_mdis_drivers.py b/tests/pytests/test_mdis_drivers.py index b2ac9b2..3bb8108 100644 --- a/tests/pytests/test_mdis_drivers.py +++ b/tests/pytests/test_mdis_drivers.py @@ -149,8 +149,8 @@ image_dict = { 'detector_center': { 'line': 512, 'sample': 512}, - 'starting_detector_line': 1, - 'starting_detector_sample': 9, + 'starting_detector_line': 0, + 'starting_detector_sample': 0, 'focal2pixel_lines': [0.0, 0.0, 71.42857143], 'focal2pixel_samples': [0.0, 71.42857143, 0.0], 'optical_distortion': { @@ -209,18 +209,6 @@ class test_pds3_naif(unittest.TestCase): assert self.driver.focal_length == pytest.approx(6.0) gdpool.assert_called_with('INS-12345_FL_TEMP_COEFFS', 0, 6) - def test_detector_start_sample(self): - with patch('ale.drivers.mess_drivers.spice.gdpool', return_value=np.array([10.0])) as gdpool, \ - patch('ale.base.data_naif.spice.bods2c', return_value=-12345) as bods2c: - assert self.driver.detector_start_sample == 10.0 - gdpool.assert_called_with('INS-12345_FPUBIN_START_SAMPLE', 0, 1) - - def test_detector_start_line(self): - with patch('ale.drivers.mess_drivers.spice.gdpool', return_value=np.array([10.0])) as gdpool, \ - patch('ale.base.data_naif.spice.bods2c', return_value=-12345) as bods2c: - assert self.driver.detector_start_line == 10.0 - gdpool.assert_called_with('INS-12345_FPUBIN_START_LINE', 0, 1) - def test_detector_center_sample(self): assert self.driver.detector_center_sample == 512 @@ -274,18 +262,6 @@ class test_isis3_naif(unittest.TestCase): assert self.driver.focal_length == pytest.approx(6.0) gdpool.assert_called_with('INS-12345_FL_TEMP_COEFFS', 0, 6) - def test_detector_start_sample(self): - with patch('ale.drivers.mess_drivers.spice.gdpool', return_value=np.array([10.0])) as gdpool, \ - patch('ale.base.data_naif.spice.bods2c', return_value=-12345) as bods2c: - assert self.driver.detector_start_sample == 10.0 - gdpool.assert_called_with('INS-12345_FPUBIN_START_SAMPLE', 0, 1) - - def test_detector_start_line(self): - with patch('ale.drivers.mess_drivers.spice.gdpool', return_value=np.array([10.0])) as gdpool, \ - patch('ale.base.data_naif.spice.bods2c', return_value=-12345) as bods2c: - assert self.driver.detector_start_line == 10.0 - gdpool.assert_called_with('INS-12345_FPUBIN_START_LINE', 0, 1) - def test_detector_center_sample(self): with patch('ale.drivers.mess_drivers.spice.gdpool', return_value=np.array([512.5, 512.5, 1])) as gdpool, \ patch('ale.base.data_naif.spice.bods2c', return_value=-12345) as bods2c: -- GitLab