Databases#

Web Databases#

class sasktran2.database.StandardDatabase(version: str = 'latest')[source]#

Bases: ZipWebDatabase

Standard databases that are downloaded from the sasktran website.

Parameters:

version (str, optional) – Specific version to use, by default “latest”

Internal Databases#

class sasktran2.database.MieDatabase(psize_distribution: ParticleSizeDistribution, refractive_index: RefractiveIndex, wavelengths_nm: array, db_root: Path | None = None, backend: str = 'sasktran_legacy', **kwargs)[source]#

Bases: CachedDatabase, OpticalDatabaseGenericScatterer

A MieDatabase is a database that caches Mie scattering data on the local file system. The root directly can optionally be specified, otherwise the default folder is used.

Parameters:
  • psize_distribution (ParticleSizeDistribution) – The particle size distribution

  • refractive_index (RefractiveIndex) – The refractive index

  • wavelengths_nm (np.array) – The wavelengths to calculate the Mie parameters at

  • db_root (Path, optional) – The root directory to store the database, by default None

  • backend (str, optional) – The backend to use, by default “sasktran_legacy” which requires the module sasktran to be installed. Currently supported options are [“sasktran_legacy”]. Default is “sasktran_legacy”

  • kwargs – Additional arguments to pass to the particle size distribution, these should match the psize_distribution.args() method

clear()[source]#

Deletes the entire database