yannforget/conda-recipes

code running

Opened this issue · 7 comments

Dear yannforget,

Could you please give three examples to how to run ledaps, lasrc and cfmask ater these packages are installed as conda-recipes show. I did not find the codes like do_ledaps.py etc.

You can download do_ledaps.py from upstream repositories. It should work since ledaps and lasrc binaries are now installed in your conda environment.

The manual procedure is documented in upstream repositories (USGS-EROS/espa-surface-reflectance). I don't have the time to update the documentation, but IIRC the procedure was:

  1. Dowload auxiliary data for ledaps or lasrc if needed.
  2. Set required environment variables for ledaps or lasrc (LEDAPS_AUX_DIR, L8_AUX_DIR, ESUN, ESPA_LAND_MASS_POLYGON, ESPA_SCHEMA).

Then for ledaps:

convert_lpgs_to_espa --mtl <mtl_file>
create_angle_bands --xml <xml_file>
mask_per_pixel_angles.py --xml <xml_file>
lndpm --xml <xml_file> --process_sr=true
lndcal --pfile <lndcal_txt_file>
lndsr --pfile <lndsr_txt_file>
cfmask --xml <xml_file>
convert_espa_to_gtif --xml <xml_file> --gtif <arbitrary_prefix>

Or for lasrc:

convert_lpgs_to_espa --mtl <mtl_file>
create_angle_bands --xml <xml_file>
mask_per_pixel_angles.py --xml <xml_file>
lasrc --xml <xml_file> --aux <aux_file> --write-toa
cfmask --xml <xml_file>
convert_espa_to_gtif --xml <xml_file> --gtif

Sorry for the late response,

create_angle_bands is a binary tool included in the recipe that generates per-pixel zenith and azimuth. For more details regarding each command in LEDAPS, please see the official documentation or the upstream do_ledaps.py script.

PS: No, LEDAPS/LaSRC code cannot be used with Sentinel data, only Landsat

Yann

Yes, it is used by the LEDAPS modules. I'm not sure they are necessary though.

Note that, IIRC, create_angle_bands is for Landsat 8 data, and create_landsat_angle_bands is for Landsat TM & ETM.

Yann