Envi Download¶
Module: spectralbridge.envi_download.
Helpers for downloading NEON hyperspectral flight line products.
API glossary ยท Workflow / scientific context
Signatures and documentation below are collected from the current source. Advanced objects are not newly declared stable by inclusion here.
Audience: advanced.
list_neon_products ¶
list_neon_products() -> None
Print the available NEON products (utility/debug helper).
Audience: advanced.
download_neon_file ¶
download_neon_file(site_code: str, product_code: str, year_month: str, flight_line: str, out_dir: str | Path, *, output_path: str | Path | None = None, session: Session | None = None, api_token: str | None = None) -> tuple[Path, bool]
Download a single NEON flight line HDF5.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
site_code
|
str
|
Identify the desired NEON hyperspectral flight line. |
required |
product_code
|
str
|
Identify the desired NEON hyperspectral flight line. |
required |
year_month
|
str
|
Identify the desired NEON hyperspectral flight line. |
required |
flight_line
|
str
|
Identify the desired NEON hyperspectral flight line. |
required |
out_dir
|
str | Path
|
Directory where downloads should be written when |
required |
output_path
|
str | Path | None
|
Optional explicit destination path for the downloaded file. When provided, the file will always be written to this location. |
None
|
session
|
Session | None
|
Optional |
None
|
api_token
|
str | None
|
Optional NEON Data API token. When omitted, |
None
|
Returns:
| Type | Description |
|---|---|
(path, was_downloaded)
|
|
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If the requested flight line could not be located in the NEON API response. |
RuntimeError
|
If an HTTP error occurs or the downloaded file is empty. |
Audience: advanced.
download_neon_flight_lines ¶
download_neon_flight_lines(site_code: str, year_month: str, flight_lines: Sequence[str] | str, out_dir: str | Path, product_code: str = 'DP1.30006.001') -> list[Path]
Download one or more NEON flight lines into out_dir.
Returns a list of Path objects pointing to the downloaded (or reused)
files.