sasktran2.database.MieDatabase#
- class sasktran2.database.MieDatabase(psize_distribution: ParticleSizeDistribution, refractive_index: RefractiveIndex, wavelengths_nm: array, db_root: Path | None = None, backend: str = 'sasktran2_cpp', max_legendre_moments: int = 64, num_size_quadrature: int = 1000, num_threads=1, **kwargs)[source]#
Bases:
CachedDatabase,OpticalDatabaseGenericScattererRustA 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 “sasktran2_cpp”. Currently supported options are [“sasktran_legacy”, “sasktran2”, “sasktran2_cpp”]. “sasktran_legacy” requires the module sasktran to be installed.
num_threads (int, optional) – The number of threads to use for the calculation, by default 1. Only current works in the sasktran2_cpp backend
kwargs – Additional arguments to pass to the particle size distribution, these should match the psize_distribution.args() method
- __init__(psize_distribution: ParticleSizeDistribution, refractive_index: RefractiveIndex, wavelengths_nm: array, db_root: Path | None = None, backend: str = 'sasktran2_cpp', max_legendre_moments: int = 64, num_size_quadrature: int = 1000, num_threads=1, **kwargs) None[source]#
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 “sasktran2_cpp”. Currently supported options are [“sasktran_legacy”, “sasktran2”, “sasktran2_cpp”]. “sasktran_legacy” requires the module sasktran to be installed.
num_threads (int, optional) – The number of threads to use for the calculation, by default 1. Only current works in the sasktran2_cpp backend
kwargs – Additional arguments to pass to the particle size distribution, these should match the psize_distribution.args() method
Methods
__init__(psize_distribution, ...[, db_root, ...])A MieDatabase is a database that caches Mie scattering data on the local file system.
atmosphere_quantities(atmo, **kwargs)clear()Deletes the entire database
cross_section_derivatives(wavelengths_nm, ...)cross_sections(wavelengths_nm, altitudes_m, ...)generate()load_ds([key])optical_derivatives(atmo, **kwargs)path([key])