Quickstart¶
<p class="sb-kicker">Getting started</p>
<h1>Quickstart</h1>
<p class="sb-doc-lead">Run SpectralBridge end to end from the command line or from Python using the same restart-safe pipeline.</p>
<div class="sb-doc-grid sb-doc-grid--two">
<article class="sb-doc-card">
<h3>CLI path</h3>
<p>Best for laptops, servers, containers, and batch jobs.</p>
<p><code>spectralbridge-pipeline</code></p>
</article>
<article class="sb-doc-card">
<h3>Notebook path</h3>
<p>Best for exploratory and reproducible Python workflows.</p>
<p><code>from spectralbridge import go_forth_and_multiply</code></p>
</article>
pip install spectralbridge
BASE=output_quickstart
mkdir -p "$BASE"
spectralbridge-pipeline \
--base-folder "$BASE" \
--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 2 \
--engine thread
from spectralbridge import go_forth_and_multiply
base = "output_quickstart_py"
go_forth_and_multiply(
base_folder=base,
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=2,
engine="thread",
)
import duckdb
import os
flightline = "NEON_D13_NIWO_DP1_L020-1_20230815_directional_reflectance"
merged = os.path.join(base, flightline, f"{flightline}_merged_pixel_extraction.parquet")
duckdb.query(f"SELECT * FROM '{merged}' LIMIT 5").df()