As far as I understand, the registration metrics do not exclude any of the 'bad frames' at the moment: the PCA is performed on an equally subsampled set of frames from the registered movie. This leads to really high metrics on sessions where there were artefacts e.g. the signal dropping suddenly (I've attached a screenshot from the GUI as an example). This approach makes sense for the automatically computed bad frames as you would otherwise underestimate potential registration errors, but surely it would be good to at least take into account the user-defined bad_frames.npy array for these metrics?
As far as I understand, the registration metrics do not exclude any of the 'bad frames' at the moment: the PCA is performed on an equally subsampled set of frames from the registered movie. This leads to really high metrics on sessions where there were artefacts e.g. the signal dropping suddenly (I've attached a screenshot from the GUI as an example). This approach makes sense for the automatically computed bad frames as you would otherwise underestimate potential registration errors, but surely it would be good to at least take into account the user-defined bad_frames.npy array for these metrics?
It seems that this would be relatively easy fix in this part of the main pipeline code... https://github.com/MouseLand/suite2p/blob/c88e1ba3aa2013fe379e64c7e45ae73a417eb4a7/suite2p/run_s2p.py#L148-L163