Skip to content

run_algo fails when no observation is available for the first analysis

Bug

KeyError: ER when trying to get the misfits after the first analysis if no observations is available.

Cause

current_misfits is initiated to an empty dict. If no observation is available, the misfits dict is not populated and therefore has no keys.

Proposed fix

Initiate current_misfits with the needed keys thanks to a method of analyser, overridden to add PCA_U if needed (similar to what is already done for inv_cov_matrices).