API ReferenceBand Convolution

Band Convolution API

Map 480-band spectral output onto satellite and climate model bands.

from biosnicar.bands import to_platform

Outputs.to_platform()

Chains onto run_model() or run_emulator():

s2 = run_model(solzen=50).to_platform("sentinel2")
ParameterTypeDescription
platformstrPlatform key

Returns: BandResult

SweepResult.to_platform()

Chains onto parameter_sweep():

df = parameter_sweep(params={...}).to_platform("sentinel2")
df = parameter_sweep(params={...}).to_platform("sentinel2", "modis")

With multiple platforms, columns are prefixed (sentinel2_B3, modis_B1).

Returns: pandas.DataFrame

to_platform() (standalone)

from biosnicar.bands import to_platform
 
result = to_platform(albedo_array, "sentinel2", flx_slr=flux_array)
ParameterTypeDescription
albedondarray (480,)Spectral albedo
platformstrPlatform key
flx_slrndarray (480,)Spectral solar flux

Returns: BandResult

BandResult

AttributeTypeDescription
platformstrPlatform key
band_nameslist[str]Band attribute names
index_nameslist[str]Index attribute names

Band and index values are accessible as named attributes: result.B3, result.NDSI.

Methods: as_dict(), repr().

Platform keys

KeyPlatformBandsIndices
sentinel2Sentinel-2 MSI13NDSI, NDVI, II
sentinel3Sentinel-3 OLCI21I2DBA, I3DBA, NDCI, MCI, NDVI
landsat8Landsat 8 OLI7NDSI, NDVI
modisMODIS7 + 3 broadbandNDSI
cesm2bandCESM 2-band2
cesmrrtmgCESM RRTMG14
marMAR4
hadcm3HadCM36