{ "info": { "author": "Team Deep-Data", "author_email": "seansmith@mines.edu", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "################################################################################\n#\n# Copyright (C) 2019 Team Deep-Data, Colorado School of Mines\n#\n# Date created: 1/22/19\n# Date last updated:\n#\n# Creators:\n# - Sean Smith seansmith@mines.edu\n# - Tyler Murphy tmurphy@mines.edu\n# - Tyler Blount trblount@mines.edu\n# - Sydney Nelson snelson1@mines.edu\n# - Josh Grego jgrego@mines.edu\n# - Jake Steiner msteiner@mines.edu\n# - Marcelo Gonzales magonzal@mines.edu\n# - Daniel Hanuszczak danielhanuszczak@mines.edu\n#\n################################################################################\n\n\nIncluded below are file descriptions for all files in deep_data_package module\nalong will descriptions of functionality.\n\n\n################################################################################\n### file_reader.py ###\n################################################################################\n\n Module for reading AVIRIS flight data and mapping\n\n# OVERVIEW =====================================================================\n\n Classes ====================================================================\n hyperion_band_reader\n aviris_band_reader\n pickled_aviris_band_reader\n\n Functions ==================================================================\n select_closest_band\n create_pickled_aviris_flight\n get_available_aviris_flights\n get_available_pickled_aviris_flights\n get_available_hyperion_passes\n\n\n\n# CLASS hyperion_band_reader ===================================================\n\n Class for reading Hyperion data from GEOtiff L1 files\n\n NOTE: bands 1-70 and VNIR, bands 71-242 are SWIR\n\n Reference ==================================================================\n https://archive.usgs.gov/archive/sites/eo1.usgs.gov/EO1userguidev2pt320030715UC.pdf\n https://crisp.nus.edu.sg/~research/tutorial/eo1.htm\n https://crisp.nus.edu.sg/~research/tutorial/eo1.htm\n\n Inputs =====================================================================\n Optional:\n hyperion_pass - name of Hyperion pass to load (Default EO1H0410362008289110KF)\n scale_factor - number to divide bands by (Defaul 80 to get radiance values)\n\n Returns ====================================================================\n class to load radiance bands as np arrays\n\n class Attributes ===========================================================\n band_reader.hyperion_pass - Hyperion flight loaded\n band_reader.scale_factor - number to divide bands by (Defaul 80 to get radiance values)\n band_reader.mode - self identified mode for reference ('hyperion')\n band_reader.approx_band_centers - string refence to what band centers correspond to what files in Hyperion GEOtif files\n self.swir_actual_band_centers - caluclated band centers for SWIR bands (for reference)\n\n\n METHODS ====================================================================\n\n load_band ==============================================================\n By defualt loads Hyperion pass EO1H0410362008289110KF over sunshine canyon\n landfill\n\n Reference ==========================================================\n N/A\n\n Inputs =============================================================\n band_req - band wavelength to load\n adjust_for_gain - N/A\n\n Returns ============================================================\n 2D np array of radiance data for band wavelength called\n\n - To load a row\n\n band_array[row_number, :]\n\n - To load a column\n\n band_array[:, col_number]\n\n - To load a pixel\n\n band_array[row_number, col_number]\n\n\n load_pixel =============================================================\n Function for reading all bands of an individual pixel from AVIRIS\n flight data\n\n Reference ==========================================================\n N/A\n\n Inputs =============================================================\n row - int of row number of requested pixel\n col - int of column number of requested pixel\n adjust_for_gain - N/A\n\n Returns ==========================================================\n Ordered dict of wavelengths vs irradiance for requested pixel\n\n\n\n# CLASS aviris_band_reader =====================================================\n\n Class for reading AVIRIS flight data from uncompressed AVIRIS flight\n folder. No files need to be modified after downloading from AVIRIS data\n portal. Just uncompress in the aviris_flight_folder and go.\n\n By defualt loads AVIRIS flight f111115t01p00r08 over sunshine canyon\n landfill\n\n Reference ==============================================================\n N/A\n\n Inputs =================================================================\n Optional:\n aviris_flight_number - AVIRIS flight number to load\n aviris_filename - filename to load in AVIRIS flight number folder\n samples - from hdr file in AVERIS flight folder (Defualt 780)\n lines - from hdr file in AVERIS flight folder (Defualt 8355)\n bands - from hdr file in AVERIS flight folder (Defualt 224)\n aviris_calibration_filename - name of AVIRIS file for reflectance calibration\n aviris_gain_filename - name of AVIRIS gain file for reflectance calibration\n\n Returns ================================================================\n class to load radiance bands as np arrays\n\n class Attributes =======================================================\n band_reader.aviris_flight - AVIRIS flight loaded\n band_reader.n_cols - number of columns in AVIRIS band file (equals input samples)\n band_reader.n_rows - number of rows in AVIRIS band file (equals input lines)\n band_reader.n_bands - number of bands in AVIRIS band file (equals input bands)\n band_reader.scale_factor - multiplier of bands (equals input scale_factor)\n band_reader.aviris_flight_folder_filepath - full filepath for AVIRIS flight folder\n band_reader.bands_filepath - full filepath for AVIRIS band file\n\n band_reader.info - dict with useful info from AVIRIS flight\n Contains:\n # General info\n ['info']['n_rows'] = number of rows in .npy files\n ['info']['n_cols'] = number of columns in .npy files\n ['info']['n_bands'] = number of bands from AVIRIS flight\n ['info']['AVIRIS_flight'] = aviris_flight\n\n # Band info\n ['band_calibration']['band_quantity'] = 'Wavelength'\n ['band_calibration']['band_unit'] = 'nm'\n ['band_calibration']['centers'] = mathmatical center of wavelength\n ['band_calibration']['bandwidths'] = bandwidths of wavelengths\n ['band_calibration']['bands'] = wavelengths callable\n\n # Gain values\n ['gain_values'] = np array of gain values for each band\n\n Call any of above w/ band_reader.info['INSERT_AS_SHOWN_ABOVE']\n\n METHODS ====================================================================\n\n parse_aviris_flight ====================================================\n Function for loading AVIRIS flight files of the first time\n By defualt loads AVIRIS flight f111115t01p00r08 over sunshine canyon landfill\n\n Inputs =============================================================\n info_file_name - name for info file to be written by parser\n aviris_calibration_filename - name of AVIRIS file for reflectance calibration\n aviris_gain_filename - name of AVIRIS gain file for reflectance calibration\n\n Returns ============================================================\n flight_dict - dict with useful info from AVIRIS flight\n Contains:\n # General info\n ['info']['n_rows'] = number of rows in .npy files\n ['info']['n_cols'] = number of columns in .npy files\n ['info']['n_bands'] = number of bands from AVIRIS flight\n ['info']['AVIRIS_flight'] = aviris_flight\n\n # Band info\n ['band_calibration']['band_quantity'] = 'Wavelength'\n ['band_calibration']['band_unit'] = 'nm'\n ['band_calibration']['centers'] = mathmatical center of wavelength\n ['band_calibration']['bandwidths'] = bandwidths of wavelengths\n ['band_calibration']['bands'] = wavelengths callable\n\n # Gain values\n ['gain_values'] = np array of gain values for each band\n\n\n get_memmap =============================================================\n Function for loading memmap of AVIRIS band file\n\n Inputs =============================================================\n N/A\n\n Returns ============================================================\n np.memmap of AVIRIS band file\n\n\n load_band ==============================================================\n Function for reading AVIRIS flight data from .npy files pickled by\n create_pickled_aviris_flight()\n\n By defualt loads AVIRIS flight f111115t01p00r08 over sunshine canyon\n landfill\n\n Reference ==========================================================\n N/A\n\n Inputs =============================================================\n band_req - band wavelength to load\n adjust_for_gain - If want to divide band array by gain value in .gain file (Default: False)\n\n Returns ============================================================\n 2D np array of radiance data for band wavelength called\n\n - To load a row\n\n band_array[row_number, :]\n\n - To load a column\n\n band_array[:, col_number]\n\n - To load a pixel\n\n band_array[row_number, col_number]\n\n\n load_pixel =============================================================\n Function for reading all bands of an individual pixel from AVIRIS\n flight data\n\n Reference ==========================================================\n N/A\n\n Inputs =============================================================\n row - int of row number of requested pixel\n col - int of column number of requested pixel\n adjust_for_gain - N/A\n\n Returns ============================================================\n Ordered dict of wavelengths vs irradience for requested pixel\n\n\n\n# CLASS pickled_aviris_band_reader =============================================\n\n Class for reading AVIRIS flight data from .npy files pickled by\n create_pickled_aviris_flight()\n\n By defualt loads AVIRIS flight f111115t01p00r08 over sunshine canyon\n landfill\n\n Reference ==============================================================\n N/A\n\n Inputs =================================================================\n Optional:\n aviris_flight - AVIRIS flight to load\n\n Returns ================================================================\n class to load radiance bands as np arrays\n\n class Attributes =======================================================\n band_reader.aviris_flight - AVIRIS flight loaded\n band_reader.np_path - path will load .npy files from\n\n band_reader.info - dict with useful info from AVIRIS flight\n Contains:\n # General info\n ['info']['n_rows'] = number of rows in .npy files\n ['info']['n_cols'] = number of columns in .npy files\n ['info']['n_bands'] = number of bands from AVIRIS flight\n ['info']['AVIRIS_flight'] = aviris_flight\n\n # Band info\n ['band_calibration']['band_quantity'] = 'Wavelength'\n ['band_calibration']['band_unit'] = 'nm'\n ['band_calibration']['centers'] = mathmatical center of wavelength\n ['band_calibration']['bandwidths'] = bandwidths of wavelengths\n ['band_calibration']['bands'] = wavelengths callable\n\n # Gain values\n ['gain_values'] = np array of gain values for each band\n\n Call any of above w/ band_reader.info['INSERT_AS_SHOWN_ABOVE']\n\n METHODS ====================================================================\n\n load_band ==============================================================\n Function for reading AVIRIS flight data from .npy files pickled by\n create_pickled_aviris_flight()\n\n Reference ==========================================================\n N/A\n\n Inputs =============================================================\n band_req - band wavelength to load\n\n Returns ============================================================\n 2D np array of radiance data for band wavelength called\n\n - To load a row\n\n band_array[row_number, :]\n\n - To load a column\n\n band_array[:, col_number]\n\n - To load a pixel\n\n band_array[row_number, col_number]\n\n\n load_pixel =============================================================\n Function for reading all bands of an individual pixel from AVIRIS\n flight data from .npy files pickled by create_pickled_aviris_flight()\n\n Reference ==========================================================\n N/A\n\n Inputs =============================================================\n row - int of row number of requested pixel\n col - int of column number of requested pixel\n adjust_for_gain - N/A\n\n Returns ============================================================\n Ordered dict of wavelengths vs irradience for requested pixel\n\n\n\n# FUNCTION select_closest_band =================================================\n\n Returns closest band available to band_req.\n\n Inputs =============================================================\n band_req - band wavelength to match\n band_req - list of band wavelengths available\n\n Returns ============================================================\n band available, if two numbers are equally close, returns the\n smallest number.\n\n\n\n# FUNCTION create_pickled_aviris_flight ========================================\n\n Function for creating pickled AVIRIS flight data using spectral python library\n\n By defualt loads AVIRIS flight f111115t01p00r08 over sunshine canyon landfill\n\n Reference ==============================================================\n N/A\n\n Inputs =================================================================\n Optional:\n aviris_flight - AVIRIS flight number\n aviris_flight_folder - AVIRIS flight folder to load\n aviris_bands_filename - filename to load in AVIRIS flight number folder\n samples - from hdr file in AVERIS flight folder (Defualt 780)\n lines - from hdr file in AVERIS flight folder (Defualt 8355)\n bands - from hdr file in AVERIS flight folder (Defualt 224)\n aviris_calibration_filename - name of AVIRIS file for reflectance calibration\n aviris_gain_filename - name of AVIRIS gain file for reflectance calibration\n adjust_for_gain - if should devide bands by associated gain value to true values (Default False)\n scale_factor - if want to dived all values by some value (Default 10000.0)\n\n Returns ================================================================\n N/A\n\n\n\n# FUNCTION get_available_aviris_flights ========================================\n\n Function listing all AVIRIS flights available\n\n Inputs =================================================================\n N/A\n\n Returns ================================================================\n List of AVIRIS flights available\n\n\n\n# FUNCTION get_available_pickled_aviris_flights ================================\n\n Function listing all pickled AVIRIS flights available\n\n Inputs =================================================================\n N/A\n\n Returns ================================================================\n List of pickled AVIRIS flights available\n\n\n\n# FUNCTION get_available_hyperion_passes =======================================\n\n Function listing all Hyperion passes available\n\n Inputs =================================================================\n N/A\n\n Returns ================================================================\n List of Hyperion passes available\n\n\n\n################################################################################\n\n\n\n################################################################################\n### mapper.py ###\n################################################################################\n\n Module for mapping band ratio output arrays\n\n# OVERVIEW =====================================================================\n\n Functions ==================================================================\n create_heatmap_interactive\n\n\n\n# FUNCTION create_heatmap_interactive ==========================================\n\n Function for creating an interactive heatmap\n\n Reference ==============================================================\n N/A\n\n Inputs =================================================================\n band_reader - band_reader class instance\n bandratio_array - bandratio result array for heatmap\n bandratio_array_name - name of bandratio calculated\n flight_name - name of the flight\n alpha - transparency value of overlay (Defualt 0.6)\n gamma_1 - threshold value for map (Default mean of normalized bandratio_array)\n interval - step value of threshold slider (Default 0.00001)\n std_multiplier - multiplier of std for range of values of threshold slider (Default 3)\n clipped - if want clipped heatmap instead of default treshhold (Default False)\n display - show plt (Default True)\n save - save plt when (Default False)\n cmap - color scheme for heatmap (Default 'hot' for threshold, 'jet' for clipped)\n quiet - if should not log info about bandratio_array (Defualt False)\n rgb_scale_value - float value to increase brightness of rgb image\n\n Returns ================================================================\n N/A\n\n\n\n################################################################################\n\n\n\n################################################################################\n### band_ratios.py ###\n################################################################################\n\n Module for calculating band ratios\n\n# OVERVIEW =====================================================================\n\n Functions ==================================================================\n Deep_Data\n HI_1453\n HI_1215\n HI_1732\n GM\n NDVI\n NDPI\n\n\n\n# FUNCTION Deep_Data ===========================================================\n\n Deep-Data Hydrocarbon Index ================================================\n Convert numpy arrays of radiance data to a Deep-Data hydrocarbon\n index map\n\n Inputs =====================================================================\n L_1197 : At-sensor radiance at 1197 nm wavelength (numpy array)\n L_1216 : At-sensor radiance at 1216 nm wavelength (numpy array)\n L_1235 : At-sensor radiance at 1235 nm wavelength (numpy array)\n L_1373 : At-sensor radiance at 1373 nm wavelength (numpy array)\n L_1453 : At-sensor radiance at 1453 nm wavelength (numpy array)\n L_1503 : At-sensor radiance at 1503 nm wavelength (numpy array)\n\n Returns ====================================================================\n Deep-Data Hydrocarbon Index Map\n\n\n\n# FUNCTION HI_1453 =============================================================\n\n 1453 Hydrocarbon Index =====================================================\n Convert numpy arrays of radiance data to a 1453 hydrocarbon index map\n\n Inputs =====================================================================\n L_1373 : At-sensor radiance at 1373 nm wavelength (numpy array)\n L_1453 : At-sensor radiance at 1453 nm wavelength (numpy array)\n L_1503 : At-sensor radiance at 1503 nm wavelength (numpy array)\n\n Returns ====================================================================\n 1453 Hydrocarbon Index Map\n\n\n\n# FUNCTION HI_1215 =============================================================\n\n 1215 Hydrocarbon Index =====================================================\n Convert numpy arrays of radiance data to a 1215 hydrocarbon index map\n\n Inputs =====================================================================\n L_1197 : At-sensor radiance at 1197 nm wavelength (numpy array)\n L_1216 : At-sensor radiance at 1216 nm wavelength (numpy array)\n L_1235 : At-sensor radiance at 1235 nm wavelength (numpy array)\n\n Returns ====================================================================\n 1215 Hydrocarbon Index Map\n\n\n\n# FUNCTION HI_1732 =============================================================\n\n 1732 Hydrocarbon Index =================================================\n Convert numpy arrays of radiance data to a 1732 hydrocarbon index map\n\n Inputs =====================================================================\n L_1705 : At-sensor radiance at 1705 nm wavelength (numpy array)\n L_1729 : At-sensor radiance at 1729 nm wavelength (numpy array)\n L_1741 : At-sensor radiance at 1741 nm wavelength (numpy array)\n\n Returns ====================================================================\n 1732 Hydrocarbon Index Map\n\n\n\n# FUNCTION GM ==================================================================\n\n Goddijn-Murphy Index =======================================================\n From: \"Proof of concept for a model of light reflectance of plastics\n floating on natural waters\" by Lonneke Goddijn-Murphy and Juvenal\n Dufaur. - See Table 5\n\n Convert numpy arrays of radiance data to a Goddijn-Murphy map\n\n Inputs =====================================================================\n L_850 : At-sensor radiance at 850 nm wavelength (numpy array)\n L_1660 : At-sensor radiance at 1660 nm wavelength (numpy array)\n\n Returns ====================================================================\n Goddijn-Murphy Map\n\n\n\n# FUNCTION NDVI ================================================================\n\n NDVI =======================================================================\n Convert numpy arrays of radiance data to a NDVI map\n\n Inputs =====================================================================\n L_1006 : At-sensor radiance at 1006 nm wavelength (numpy array)\n L_675 : At-sensor radiance at 675 nm wavelength (numpy array)\n\n Returns ====================================================================\n NDVI Map\n\n\n\n# FUNCTION NDPI ================================================================\n\n NDPI =======================================================================\n Convert numpy arrays of radiance data to a NDPI map\n\n Inputs =====================================================================\n L_1263 : At-sensor radiance at 1263 nm wavelength (numpy array)\n L_2417 : At-sensor radiance at 2417 nm wavelength (numpy array)\n\n Returns ====================================================================\n NDPI Map\n\n\n\n################################################################################", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/seansmith-mines/Deep-Data/archive/v1.0.0.tar.gz", "keywords": "deep-data,AVIRIS,Hyperion,spectral", "license": "", "maintainer": "", "maintainer_email": "", "name": "deep-data-package", "package_url": "https://pypi.org/project/deep-data-package/", "platform": "", "project_url": "https://pypi.org/project/deep-data-package/", "project_urls": { "Homepage": "https://github.com/seansmith-mines/Deep-Data/archive/v1.0.0.tar.gz" }, "release_url": "https://pypi.org/project/deep-data-package/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "Hyperion and AVIRIS: file reader, multiple band indici calculator, and interactive mapper", "version": "1.0.0" }, "last_serial": 5100144, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "83c523ef15acec6ff9e61be6c9f5f04d", "sha256": "36f8f864308c3f2ac62ce10dd184a3bd95dee1a3601c30cd38e84caa29d90fce" }, "downloads": -1, "filename": "deep_data_package-1.0.0.tar.gz", "has_sig": false, "md5_digest": "83c523ef15acec6ff9e61be6c9f5f04d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22306, "upload_time": "2019-04-04T17:45:43", "url": "https://files.pythonhosted.org/packages/9a/cc/3689da70ca0d1f9ebbb7e771a08a70d8ee7808884ef1d773866de7d87fb3/deep_data_package-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "83c523ef15acec6ff9e61be6c9f5f04d", "sha256": "36f8f864308c3f2ac62ce10dd184a3bd95dee1a3601c30cd38e84caa29d90fce" }, "downloads": -1, "filename": "deep_data_package-1.0.0.tar.gz", "has_sig": false, "md5_digest": "83c523ef15acec6ff9e61be6c9f5f04d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22306, "upload_time": "2019-04-04T17:45:43", "url": "https://files.pythonhosted.org/packages/9a/cc/3689da70ca0d1f9ebbb7e771a08a70d8ee7808884ef1d773866de7d87fb3/deep_data_package-1.0.0.tar.gz" } ] }