The error arises in the function calc_av_en_flux_PSP_EPIHI in line 420, due to the variable en_str that is defined in line 392, inside an if clause. If the statement in line 392 is evaluated as False, then en_str is never defined and this raises the error later after the else bloack that starts in line 418.
The error arises in the function calc_av_en_flux_PSP_EPIHI in line 420, due to the variable
en_str
that is defined in line 392, inside an if clause. If the statement in line 392 is evaluated asFalse
, thenen_str
is never defined and this raises the error later after theelse
bloack that starts in line 418.