Closed evan-greenbrg closed 3 years ago
Hey Evan,
I will review the new PR, but here were my comments from the previous PR, ignore any that no longer apply:
There are a just of few changes I’d recommend to the ‘image_config_generate.py’:
config_dict["glint"]["calc_mask"] = [ ["water", {'band_1': 560,'band_2': 860, 'threshold': -0.05}]]
config_dict['glint']['bounds']
for the sky_glint
correction.Also in my tests I was able to successfully run gao
, hochberg
and hedley
with no issues. Skyglint
seems to take a long time, how long does it typically take to run?
-Adam
Thanks for the comments Adam.
For 1. I was testing the index-based water-masks for the glint correction and found that it benefited from being a little more generalized. This was the main change between this PR and the last. The current config for the glint correction includes explicit paths to water mask files in the same way that you point the BRDF to ancillary files of solar zenith, etc. As a result, the glint config doesn't need to generate any masks within the HyTools algorithm. How do you feel about this change? Given the change, the logic at line 133 within image_correct.py might have to be altered because you aren't calculating a mask for the glint step, it is given explicitly.
The actual code changes for this are within each individual glint module where the water masks are loaded with the get_anc() function and then in the edited image_correct_json_generate.json on line 57.
I think I covered 3. in this PR, but will correct for 2.
The sky_glint algorithm takes a while. The bottleneck is the fact that you have to optimize for an effective wind speed at every pixel within the image individually. There was no clear vectorized solution that I found.
-Evan
All references to the sky glint module should be removed. I opened a new branch that still has the sky glint module on my fork.
Thanks for all your work on this, everything looks good!
Hey. I closed and reopened the pull request. I slightly changed how I was doing to water masks. Now it follows the same logic as the ancillary files and passes water mask files explicitly within the config.
Let me know if you have any thoughts or questions.