Ticket #9983 (closed: worksforme)
Setting ei-mon2-spec in iliad script sets both monitors up
Reported by: | Alex Buts | Owned by: | Alex Buts |
---|---|---|---|
Priority: | major | Milestone: | Release 3.4 |
Component: | Direct Inelastic | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Nick Draper |
Description
running standard illiad reduction script
argi={}; argi['ei-mon2-spec']=xxxxxx .... out=iliad("wb_wksp","w1",energy,energybin,mapping,MonoVanRun,**argi)
results in both monitors being equal xxxxx: namely:
Value of : ei_mon_spectra is set to : [xxxxx,xxxxx]
Change History
comment:5 Changed 6 years ago by Alex Buts
- Status changed from assigned to verify
- Resolution set to worksforme
- Milestone changed from Backlog to Release 3.4
I can not find correct solution to the problem (illustrated by e.g. DirectReductionHelpersTest.py rows 456-468, see extract below) so it still can happen.
But global changes to reduction made this ticket not relevant as everybody expected to assign reduction properties not directly but using auxiliary dictionary using reduction wrapper. This in some way eliminate the issue. I have also prohibited partial assignment with the lists with number of elements different from expected (see unit tests and example below).
This is why I am marking this ticket as works for me...
t1.A = [1,10] self.assertEqual(t1.A,[1,10]) # This does not work as the assignment occurs to temporary vector # lets ban partial assignment #t1.D[0] = 200 #self.assertEqual(t1.B,200) # This kind of assignment requests the whole list to be setup self.assertRaises(KeyError,setattr,t1,'A',200) # Very bad -- fails silently t1.A[0] = 10 self.assertEqual(t1.A,[1,10])