sicor.tables package

Submodules

sicor.tables.get_tables module

Functions to download latest SICOR tables, also download links.

sicor.tables.get_tables.download_file_from_google_drive(gid, destination)[source]

Download from gdrive using public id (gid).

sicor.tables.get_tables.get_tables(sicor_table_path=None, sensor='s2', style='link', optional_downloads=None, export_options_to=None)[source]

Get LUT tables needed for SICOR. This function tries to automatically acquire the files. Tables are searched for in sys.path which includes the installations defaults and the $PYTHONPATH from the environment.

Parameters:
  • sensor – sensor string from [“s2”, “l8”, “enmap”]

  • sicor_table_path – None or path where to store SICOR tables, if “None”, tables are stored within sicor.tables.

  • style – either: “link”: try to make symbolic link or “copy”: copy LUT files

  • optional_downloads – either None or iterable of strings such as : (“ch4”,)

  • export_options_to – None: export user options to: ./sicor_s2_user_options.json [filename]: If filename is given, export options to [filename], should be json

Returns:

None

Raises:

ValueError if tables are not present after all attempts to acquire them.

sicor.tables.get_tables.verify_table(fn: str)[source]

Check md5 sum os file fn

Parameters:

fn

Returns:

None

Raises:

ValuError if fn of file is other than given in file_checksums

Module contents

Downloading latest SICOR tables.

sicor.tables.get_tables(sicor_table_path=None, sensor='s2', style='link', optional_downloads=None, export_options_to=None)[source]

Get LUT tables needed for SICOR. This function tries to automatically acquire the files. Tables are searched for in sys.path which includes the installations defaults and the $PYTHONPATH from the environment.

Parameters:
  • sensor – sensor string from [“s2”, “l8”, “enmap”]

  • sicor_table_path – None or path where to store SICOR tables, if “None”, tables are stored within sicor.tables.

  • style – either: “link”: try to make symbolic link or “copy”: copy LUT files

  • optional_downloads – either None or iterable of strings such as : (“ch4”,)

  • export_options_to – None: export user options to: ./sicor_s2_user_options.json [filename]: If filename is given, export options to [filename], should be json

Returns:

None

Raises:

ValueError if tables are not present after all attempts to acquire them.