Raise an exception if after many tries the replicas are still negative
Created by: scarlehoff
I've empirically chosen the very conservative 1e6
as the number of tries because in my laptop the worst group takes about 5 minutes. I think it can safely be lowered but I preferred to start high.
Fixes #1783 (closed)
This is how an error would look like:
[INFO]: Loading positivity dataset POSXSQ
[INFO]: Loading positivity dataset POSXSB
[INFO]: Loading positivity dataset POSXGL
[ERROR]: Error generating replicas for CDFZRAP_NEW
[CRITICAL]: Bug in n3fit ocurred. Please report it.
Traceback (most recent call last):
<etc>
validphys.pseudodata.ReplicaGenerationError: No valid replica found after 1000000 attempts