File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -239,7 +239,14 @@ def make_replica(
239239 if np .all (shifted_pseudodata [full_mask ] >= 0 ) or not resample_negative_pseudodata :
240240 return shifted_pseudodata
241241
242- raise ReplicaGenerationError (f"No valid replica found after { max_tries } attempts" )
242+ # Find which dataset index corresponds to the negative points, and print it out for debugging purposes
243+ negative_mask = shifted_pseudodata < 0 & full_mask
244+ negative_indices = np .where (negative_mask )[0 ]
245+
246+ raise ReplicaGenerationError (
247+ f"No valid replica found after { max_tries } attempts. "
248+ f"Negative global indices: { negative_indices .tolist ()} "
249+ )
243250
244251
245252def central_values_array (groups_dataset_inputs_loaded_cd_with_cuts ):
You can’t perform that action at this time.
0 commit comments