Without this modification, the EXP correction fails with "UnboundLocalError: local variable 'band_name' referenced before assignment" as the variable band_name is not defined up to this point. What actually should be tested is if ordered_bands[short_idx] and ordered_bands[long_idx] are in the dictionary or not.
Without this modification, the EXP correction fails with "UnboundLocalError: local variable 'band_name' referenced before assignment" as the variable
band_name
is not defined up to this point. What actually should be tested is ifordered_bands[short_idx]
andordered_bands[long_idx]
are in the dictionary or not.