hytools icon indicating copy to clipboard operation
hytools copied to clipboard

BRDF correction progress bar error

Open davidraythompson opened this issue 4 years ago • 1 comments

Hello!

I'm attempting to use FlexBRDF correction and am getting an error when it attempts to print the progress bar. Here is my configuration: demo_config.txt I'll fix it with a manual conversion for now.

Here's the output:

Using 1 CPUs. Scene average solar zenith angle : 116.841 degrees Calculating BRDF coefficients Traceback (most recent call last): File "/home/drt/src/hytools/scripts/image_correct.py", line 162, in main() File "/home/drt/src/hytools/scripts/image_correct.py", line 48, in main calc_brdf_coeffs(actors,config_dict) File "/home/drt/src/anaconda3/lib/python3.7/site-packages/hytools/brdf/brdf.py", line 89, in calc_brdf_coeffs flex_brdf(actors,config_dict) File "/home/drt/src/anaconda3/lib/python3.7/site-packages/hytools/brdf/flex.py", line 39, in flex_brdf actors = calc_flex_group(actors,brdf_dict) File "/home/drt/src/anaconda3/lib/python3.7/site-packages/hytools/brdf/flex.py", line 200, in calc_flex_group progbar(np.sum(~bad_bands[:band_num+1]),np.sum(~bad_bands)) File "/home/drt/src/anaconda3/lib/python3.7/site-packages/hytools/misc/misc.py", line 41, in progbar print('\r', '#'filled_progbar + '-'(full_progbar-filled_progbar), '[{:>7.2%}]'.format(frac), end='') TypeError: can't multiply sequence by non-int of type 'numpy.float64'

davidraythompson avatar Sep 03 '21 01:09 davidraythompson

Hey David,

I just tested a random AVNG scene with your config file and it ran without issue (this one if you want to try it), which suggests there might be a problem with the input files.

Can you share the header file for the image you are trying to correct?

Also, the solar zenith angle, 116.841, is outside the expected range (0 to 90 degrees), I'd recommend double checking the values in the obs file.

-Adam

adamchlus avatar Sep 03 '21 13:09 adamchlus