Reference
Python API¶
Use the Python surface when you want the same file-based workflow as the CLI but need to stay inside a notebook, script, or larger scientific application.
Batch NEON runs
go_forth_and_multiply is the top-level batch entry point.
Single-flightline control
process_one_flightline exposes the ordered restart-safe stages for one flight line.
Drone workflows
run_drone_pipeline handles the drone-specific local processing path.
Canonical usage
Most users should start here¶
from spectralbridge import go_forth_and_multiply
go_forth_and_multiply(
base_folder="output_demo",
site_code="NIWO",
year_month="2023-08",
product_code="DP1.30006.001",
flight_lines=[
"NEON_D13_NIWO_DP1_L020-1_20230815_directional_reflectance",
],
max_workers=1,
engine="thread",
)
This follows the same ordered, restart-safe contract as the CLI and writes the same on-disk outputs.
Public entry points
What is intentionally public?¶
go_forth_and_multiply
Batch-oriented NEON orchestration including download, export, correction, harmonization, parquet writing, merge, and QA.
process_one_flightline
Single-flightline execution with explicit knobs for chunk size, merge behavior, polygon options, and engine choice.
run_drone_pipeline
Local drone processing path with QA, polygon support, and mixed HDF5/TIFF source handling.
apply_brightness_correction
Lower-level reflectance adjustment helper used when you need targeted brightness normalization logic outside the main pipeline.
API philosophy
How to think about the Python surface¶
- Prefer the top-level orchestrators over stitching internal helpers together yourself.
- Treat output files and naming conventions as part of the public contract.
- Use tests and nearby docs to distinguish stable entry points from implementation details.
- Expect idempotent, restart-safe behavior rather than pure in-memory return-value workflows.
Autogenerated reference
Module reference¶
Use the API docs below when you need the full function and class signatures in addition to the workflow-oriented guides.
SpectralBridge public package surface.
_PLOT_EXPORTS = (make_micasense_vs_landsat_panels.__name__, make_sensor_vs_neon_panels.__name__)
module-attribute
¶
__all__ = sorted(set(__all__ + (['apply_brightness_correction', 'go_forth_and_multiply', 'process_one_flightline', 'run_drone_pipeline', load_brightness_coefficients.__name__] + list(_PLOT_EXPORTS))))
module-attribute
¶
__version__ = '2.2.0'
module-attribute
¶
__getattr__(name)
¶
load_brightness_coefficients(system_pair='landsat_to_micasense')
¶
Load brightness coefficients for a given system pair.
Parameters¶
system_pair : str Key identifying the pair of systems, e.g. "landsat_to_micasense".
Returns¶
dict[int, float] Mapping from 1-based band index to brightness coefficient (percent).
Notes¶
- Values are stored in percent (e.g., -7.3959 means "reduce by 7.3959%").