Ticket #8186 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Relax CopyInstrumentParameters condition

Reported by: Gesner Passos Owned by: Gesner Passos
Priority: critical Milestone: Release 3.0
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Nick Draper

Description

This script fails because internally, it does not recognize that both instrument are the same.

import shutil
file_path =  FileFinder.getFullPath('SANS2D_Definition.xml')
shutil.copyfile(file_path,'/tmp/SANS2D_1.xml')
shutil.copyfile(file_path,'/tmp/SANS2D_2.xml')
ws1 = LoadEmptyInstrument('/tmp/SANS2D_1.xml')
ws2 = LoadEmptyInstrument('/tmp/SANS2D_2.xml')
CopyInstrumentParameters(ws1,ws2)

There are also cases, where the instrument evolves, and the users want to copy the calibration parameter and apply to old data. There is an user needing this, that is why it is critical.

Change History

comment:1 Changed 7 years ago by Gesner Passos

This script shows requires applying for different versions of the same instrument:

panel6_path = FileFinder.getFullPath('WISH_Definition_6Panel.xml')
panel9_path = FileFinder.getFullPath('WISH_Definition_9Panels.xml')


ws6 = LoadEmptyInstrument(panel6_path)
ws9 = LoadEmptyInstrument(panel9_path)


wsfrom9to6 = CloneWorkspace(ws6)
wsfrom6to9 = CloneWorkspace(ws9)

CopyInstrumentParameters(ws9, wsfrom9to6)
CopyInstrumentParameters(ws6, wsfrom6to9)

Although it is wrong, if the user wants to, he might want to try

panel6_path = FileFinder.getFullPath('WISH_Definition_6Panel.xml')
sans2d_path = FileFinder.getFullPath('SANS2D_Definition.xml')

wsWISH = LoadEmptyInstrument(panel6_path)
wsSANS = LoadEmptyInstrument(sans2d_path)

wsfromWISH2SANS = CloneWorkspace(wsSANS)
wsfromSANS2WISH = CloneWorkspace(wsWISH)

CopyInstrumentParameters(wsSANS, wsfromSANS2WISH)
CopyInstrumentParameters(wsWISH, wsfromWISH2SANS)

comment:2 Changed 7 years ago by Gesner Passos

  • Status changed from new to inprogress

CopyInstrumentParameters: change requirement different instruments

Now, it allows different instruments to copy parameters between them.

re #8186

Changeset: c6d90708cf1a0a70851c119a0f4723205635cda1

comment:3 Changed 7 years ago by Gesner Passos

  • Status changed from inprogress to verify
  • Resolution set to fixed

Tester:

run the scripts inside this ticket, and check that the copy parameters allow copying parameters among those workspaces.

comment:4 Changed 7 years ago by Nick Draper

  • Status changed from verify to verifying
  • Tester set to Nick Draper

comment:5 Changed 7 years ago by Nick Draper

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/8186_copy_instrument'

Full changeset: 0b3b39dd0e7f84dbcd20b05c6f0cfb10d7901259

comment:6 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9031

Note: See TracTickets for help on using tickets.