Ticket #7945 (closed: fixed)
Add tolerance options to CheckWorkspacesMatch for events
Reported by: | Peter Peterson | Owned by: | Peter Peterson |
---|---|---|---|
Priority: | critical | Milestone: | Release 3.0 |
Component: | Framework | Keywords: | |
Cc: | campbellsi@… | Blocked By: | |
Blocking: | Tester: | Russell Taylor |
Description (last modified by Peter Peterson) (diff)
Some exploration has pointed out that CheckWorkspacesMatch does not say that two event workspaces match even when they do (within a reasonable tolerance). The script below should "pass" since all events are the same between the two files within 50ns for TOF and 1ns for pulse-time.
datadir='/SNS/REF_L/IPTS-9370/0/99508/' nxsfile=datadir+'NeXus/REF_L_99508_event.nxs' prefile=datadir+'preNeXus/REF_L_99508_runinfo.xml' mapfile="/SNS/REF_L/2009_3_4B_CAL/calibrations/REF_L_TS_2010_02_19.dat" nxs = LoadEventNexus(nxsfile) pre = LoadPreNexus(prefile, MappingFilename=mapfile, LoadMonitors=False) print "match = %s" % CheckWorkspacesMatch(pre, nxs, Tolerance=.05)
Change History
comment:2 Changed 7 years ago by Peter Peterson
Re #7945. Adding equals with tolerance to Events.
Changeset: 1ab9d8021f9045a3e5adf5c2dbda813740a1afd6
comment:3 Changed 7 years ago by Peter Peterson
Re #7945. Moved implementation of Event from header to source.
Changeset: 5a35b080e978992f627915eabe3308c4dff7ebc0
comment:4 Changed 7 years ago by Peter Peterson
Re #7945. Adding EventList::equals with tolerances.
Changeset: 6cefc08049917c00319e379933a0b437074275b8
comment:5 Changed 7 years ago by Peter Peterson
Re #7945. Removed debug print statement.
Changeset: 240e54dd8f874dbef2ca7d2911bd89623a698e83
comment:6 Changed 7 years ago by Peter Peterson
Re #7945. Using EventList::equals in CheckWorkspacesMatch.
Also a hidey change over using std::fdim in favor of std::abs.
Changeset: 230bf567e4a3a04fd619de0b47d2403e71d71702
comment:7 Changed 7 years ago by Peter Peterson
Re #7945. Making the event->tof tolerance a bit smarter.
Changeset: 1852fb683c035bef311b86aa8ec51697458baed2
comment:8 Changed 7 years ago by Peter Peterson
Re #7945. Adding missing include for windoze.
Changeset: ad1a1f02c6a7241bdd09270a6f3731c34160f51a
comment:9 Changed 7 years ago by Peter Peterson
Re #7945. Changing from fdim to std::fdim.
Changeset: c75b8f648fd6f3a759ef9e762028563affdd0be9
comment:10 Changed 7 years ago by Peter Peterson
Refs #7945. Windows is forcing this back to std::fabs.
Changeset: 46c037e521f1e5174f922f6170080c676812437a
comment:11 Changed 7 years ago by Peter Peterson
Re #7945. Modifying unit tests for double compares.
Changeset: cac5059fce61a01a585230f99ba565c50d91b5e7
comment:13 Changed 7 years ago by Peter Peterson
- Status changed from inprogress to verify
- Resolution set to fixed
This is on feature/7945_check_events_match.
To test: Run the script in the ticket description. Everything should work.
comment:14 Changed 7 years ago by Russell Taylor
- Status changed from verify to verifying
- Tester set to Russell Taylor
comment:15 Changed 7 years ago by Russell Taylor
- Status changed from verifying to closed
Merge remote branch 'origin/feature/7945_check_events_match'
comment:16 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 8790
Re #7945. Added DateAndTime::equals operator for tolerance compare.
Changeset: df63f568c0a84a3aea718ab62c9c2b8f1b15a7a6