earthlib.sensors
Sensor definitions for common earth observing instruments.
Sensor
dataclass
¶
Base class for defining EO sensor specifications.
Source code in earthlib/sensors.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | |
get_band_descriptions(sensor)
¶
Returns a list band name descriptions by sensor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sensor
|
str
|
the name of the sensor (from earthlib.listSensors()). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bands |
list
|
a list of sensor-specific band names. |
Source code in earthlib/sensors.py
1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 | |
get_band_indices(custom_bands, sensor)
¶
Cross-references a list of bands passed as strings to the 0-based integer indices
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
custom_bands
|
list
|
a list of band names. |
required |
sensor
|
str
|
a string sensor type for indexing the supported collections. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
indices |
list
|
list of integer band indices. |
Source code in earthlib/sensors.py
1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 | |
get_bands(sensor)
¶
Returns a list of available band names by sensor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sensor
|
str
|
the name of the sensor (from earthlib.list_sensors()). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bands |
list
|
a list of sensor-specific band names. |
Source code in earthlib/sensors.py
1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 | |
get_collection_name(sensor)
¶
Returns the earth engine collection name for a specific satellite sensor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sensor
|
str
|
the name of the sensor (from earthlib.list_sensors()). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
collection |
str
|
a string with the earth engine collection. |
Source code in earthlib/sensors.py
1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 | |
get_scaler(sensor)
¶
Returns the scaling factor to convert sensor data to percent reflectance (0-1).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sensor
|
str
|
the name of the sensor (from earthlib.list_sensors()). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
scaler |
str
|
the scale factor to multiply. |
Source code in earthlib/sensors.py
1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 | |
get_sensor(sensor)
¶
Get the sensor instance, indexed by key.
Source code in earthlib/sensors.py
1674 1675 1676 1677 | |
list_sensors()
¶
Returns a list of the supported sensor image collections.
Returns:
| Name | Type | Description |
|---|---|---|
sensors |
list
|
a list of supported sensors using the names referenced by this package. |
Source code in earthlib/sensors.py
1664 1665 1666 1667 1668 1669 1670 1671 | |
validate_sensor(sensor)
¶
Verify a string sensor ID is valid, raise an error otherwise.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sensor
|
str
|
the name of the sensor (from earthlib.list_sensors()). |
required |
Raises:
| Type | Description |
|---|---|
SensorError
|
when an invalid sensor name is passed |
Source code in earthlib/sensors.py
1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 | |