Project

General

Profile

Bug #14758

Comparison breaks when given 2 data-like and 2-mc like datasets

Added by Erika Catano Mur almost 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Low
Start date:
12/05/2016
Due date:
% Done:

0%

Estimated time:
Duration:

Description

With a list of 4 data sets ({data,mc}{old,new}, MC split by components) single-dataset plots are ok, but making the comparison plots breaks with error

Traceback (most recent call last):
  File "/nova/app/users/ecatanom/feature_caf_size/feature_branch/Validation/generic/controllers/MakeCanvases.py", line 531, in <module>
    maker.MakeCanvases()
  File "/nova/app/users/ecatanom/feature_caf_size/feature_branch/Validation/generic/controllers/MakeCanvases.py", line 322, in MakeCanvases
    if len(set.symmetric_difference(*[category_lists[ds][gp_idx] for ds in category_lists]) ) > 0:
TypeError: symmetric_difference() takes exactly one argument (3 given)

Same folder/name structure used in previous iterations. I moved on to compare only data/data, MC/MC, but other users might find this error.

Associated revisions

Revision 23536 (diff)
Added by Jeremy Wolcott over 2 years ago

Don't assume there will be exactly two sets of plots when making
comparisons. (Fixes Redmine issue #14758.)

History

#1 Updated by Gavin Davies almost 3 years ago

  • Project changed from NOvA-ART to NOvA validation
  • Category deleted (Validation Website)

and this one moves to validation sub-project too

#2 Updated by Jeremy Wolcott almost 3 years ago

  • Assignee set to Jeremy Wolcott

Hmm, my fault, didn't read the set.symmetric_difference() method signature carefully enough. Could you try replacing line 322 of controllers/MakeCanvases.py with:

if len(set.union(*[category_lists[ds][gp_idx] for ds in category_lists])) == len(category_lists[category_lists.keys()[0]][gp_idx]):

and see if it "just works?"

#3 Updated by Jeremy Wolcott almost 3 years ago

Test with

/nova/app/users/ecatanom/feature_caf_size/feature_branch/CAFAna/Validation/nue_nd_config_validation.json

#4 Updated by Jeremy Wolcott over 2 years ago

  • Status changed from New to Resolved

Looks like that indeed was the solution. Fixed in novaart:r23536.

#5 Updated by Jeremy Wolcott over 2 years ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF