Units
convert_units(data, wavelengths)
Function to convert units from mW/m^2/sr/cm^-1 to W/m^2/sr/um in numpy array. Acts on each band separately.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
array
|
The input data to be converted. |
required |
wavelengths |
array
|
The wavelengths of the input data. |
required |
Returns:
Type | Description |
---|---|
array
|
np.array: The converted data. |
Source code in rs_tools/_src/geoprocessing/units.py
convert_units_ds(ds, wavelengths)
Function to convert units from mW/m^2/sr/cm^-1 to W/m^2/sr/um in xarray dataset. Acts on each band separately.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ds |
Dataset
|
The input dataset to be converted. |
required |
wavelengths |
Dict[float]
|
Dictionary of wavelengths of data for each band (i). |
required |
Returns:
Type | Description |
---|---|
Dataset
|
xr.Dataset: The converted dataset. |