DO NOT EDIT OUTSIDE MARKERS
Purpose
- Convert NEON HDF5 scenes to ENVI rasters.
- Export ancillary layers for geometry and topography.
- Apply polygon and QA masks.
- Run topographic correction followed by BRDF adjustment.
map info
or coordinate system string
); override if missing.Reflectance/Reflectance_Data
, Ancillary_Imagery/*
, Logs/Solar_*
,
to-sensor_*
.NEON_<domain>_<site>_<product>_<tile>_<date>_<time>_reflectance_envi.img
plus .hdr
.*_ancillary_envi.img
with bands Path Length, Sensor Azimuth, Sensor
Zenith, Solar Azimuth, Solar Zenith, Slope, Aspect._masked
.*_reflectance_brdfandtopo_corrected_<suffix>.img
.input_files
: list of ENVI reflectance images.anc_files
: mapping of ancillary band names to [path, index]
.corrections
: ordered list, e.g., ["topo", "brdf"]
.export.output_dir
and export.suffix
: where corrected files land.num_cpus
: Ray worker count.bad_bands
, topo
, brdf
: sections controlling masking and coefficient options.python src/neon_to_envi.py --images scene.h5 --output_dir out -anc
python src/topo_and_brdf_correction.py config.json
from src.neon_to_envi import neon_to_envi
from src.mask_raster import mask_raster_with_polygons
from src.topo_and_brdf_correction import topo_and_brdf_correction
neon_to_envi(["scene.h5"], "out", anc=True)
mask_raster_with_polygons(envi_file, "polygons.geojson")
topo_and_brdf_correction("config.json")
num_cpus
controls Ray parallelism.iterate(by="chunk")
respects chunk_size
to limit memory.metadata_override
when they do not.metadata_override
or raster_crs_override
.samples
, lines
, bands
) cause HyTools load errors—fix
headers or regenerate files.Last updated: 2025-08-18