Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code running #4

Open
chexianghong opened this issue Jul 29, 2019 · 7 comments
Open

code running #4

chexianghong opened this issue Jul 29, 2019 · 7 comments

Comments

@chexianghong
Copy link

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.

@yannforget
Copy link
Owner

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

@chexianghong
Copy link
Author

chexianghong commented Aug 5, 2019 via email

@chexianghong
Copy link
Author

chexianghong commented Aug 21, 2019 via email

@yannforget
Copy link
Owner

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

@chexianghong
Copy link
Author

chexianghong commented Aug 29, 2019 via email

@yannforget
Copy link
Owner

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

@chexianghong
Copy link
Author

chexianghong commented Sep 16, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants