Conversion Utilities API

class pycoal.conversion.AsterToENVIConversion[source]
__init__()[source]

This class provides a method for converting the ASTER Spectral Library Version 2.0 into ENVI format.

Parameters:None
__weakref__

list of weak references to the object (if defined)

classmethod convert(data_dir='', db_file='', hdr_file='')[source]

This class method generates an ENVI format spectral library file. data_dir is optional as long as db_file is provided. Note that generating an SQLite database takes upwards of 10 minutes and creating an ENVI format file takes up to 5 minutes. Note: This feature is still experimental.

Parameters:
  • data_dir (str, optional) – path to directory containing ASCII data files
  • db_file (str) – name of the SQLite file that either already exists if data_dir isn’t provided, or will be generated if data_dir is provided
  • hdr_file (str) – name of the ENVI spectral library to generate (without the .hdr or .sli extension)
class pycoal.conversion.USGSSpectral7ToAsterConversion[source]
__init__()[source]

This class provides a method for converting USGS Spectral Library Version 7 .txt files into ASTER Spectral Library Version 2.0 <https://asterweb.jpl.nasa.gov/> .txt files

Parameters:none
__weakref__

list of weak references to the object (if defined)

classmethod convert(library_filename='')[source]

This class method converts a USGS Spectral Library Version 7 .txt file into an ASTER Spectral Library Version 2.0 .spectrum.txt file ASTER Library Version 2.0 Spectral Library files are in .spectrum.txt file format

Spectral Library Version 7 can be downloaded here

Parameters:library_filename (str) – path to Spectral File you wish to convert
class pycoal.conversion.FullUSGSSpectral7ToENVIConversion[source]
__init__()[source]

This class method converts the entire USGS Spectral Library Version 7 library into its convolved envi format

Parameters:none
__weakref__

list of weak references to the object (if defined)

classmethod convert(library_filename='')[source]

This class method converts the entire USGS Spectral Library Version 7 library into its convolved envi format

Spectral Library Version 7 can be downloaded here

Args: library_filename (str): path to USGS Spectral Library Version 7 directory