Local

pansat.catalogue.local

This module defines the catalogue class to look at and list information about downloaded files in local directory.

class pansat.catalogue.local.ProductCatalogue

The ProductCatalogue class contains methods to extract information about downloaded files.

available_products

string list with all currently supoprted products

__init__()
__weakref__

list of weak references to the object (if defined)

get_file_catalogue(destination=None)

Getting a dictionary with all downloaded files, sorted by product and product class.

Parameters:

destination (str) – string or Path to folder to check file structure from. If destination is None, the catalogue starts checking for default destinations.

Returns:

nested dictionary with all downloaded files at default locations.

Return type:

catalogue(dict)

get_files_for_product(product, path=None)

Get list with all files for specific product.

Parameters:
  • product – pansat product instance

  • path (str) – string or Path for product path, if None files are listed from default destination

Returns:

list containing all names that have been downloaded for a certain product.

Return type:

file_lists(list)

print_file_catalogue()

Prints the nested dictionary with all files per product and product class in tree-like structure.

print_nested(d, i)

Function to print a nested dictionary in tree-like structure.