Ticket #10466 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

Introduce "silicon" component in BASIS instrument definition file

Reported by: Jose Borreguero Owned by: Jose Borreguero
Priority: major Milestone: Release 3.3
Component: Indirect Inelastic Keywords:
Cc: spencer.howells@… Blocked By:
Blocking: Tester: Federico M Pouzols

Description

In order to comply with requirements of the Indirect Analysis Interface

Attachments

runtest.sh (303 bytes) - added by Jose Borreguero 6 years ago.

Change History

comment:1 Changed 6 years ago by Jose Borreguero

Refs #10466 Include inelastic banks in new silicon component

Changeset: 179cdc9c07090ecfa60854b84a25295f005aea75

Changed 6 years ago by Jose Borreguero

comment:2 Changed 6 years ago by Jose Borreguero

  • Status changed from new to assigned

comment:3 Changed 6 years ago by Jose Borreguero

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

comment:4 Changed 6 years ago by Jose Borreguero

To tester:

  1. Edit and then attached script runtest.sh. Ignore errors messages like "LoadMask-[Error] Pixel w/ ID = 15871 Cannot Be Located". The test should finish with the following message:
100% tests passed, 0 tests failed out of 1 (250 skipped)
All tests passed? True
  1. Load BSS_11841_event.nxs from Autotest Data/, then "show instrument" -> "Instrument Tree". A component "silicon" should be there, containing bank1 to bank4 components.

comment:5 Changed 6 years ago by Federico M Pouzols

  • Status changed from verify to verifying
  • Tester set to Federico M Pouzols

comment:6 Changed 6 years ago by Federico M Pouzols

Do you need any additional step (or enable/disable anything) in order to see the new component in the instrument tree? I might be missing something, but I don't see it. Tried on Linux and Windows. I made sure that my MantidPlot is using the new .xml files and not any old copy from an old directory in the settings.

I run the commands included in the script runtest.sh and the system test passes. But I cannot see silicon->bank1...bank4 in the instrument view->Instrument Tree.

comment:7 Changed 6 years ago by Jose Borreguero

What happens if you "Load" BSS_11841_event.nxs, then "LoadInstrument" to the workspace applying the BASIS_Definition.xml that is under mantid/Code/Mantid/instrument/, and then look in the instrument tree?

comment:8 Changed 6 years ago by Federico M Pouzols

With Load and LoadInstruments commands what I get is different but silicon doesn't show up:

BASIS
 moderator
 sample-position
 monitors...
 bank1...
 bank2...
 bank3...
 bank4...
 elastic...

Using the GUI (load file / show instrument) I get this:

BASIS
 moderator
 sample-position
 monitors...
 bank1...
 bank2...

comment:9 Changed 6 years ago by Jose Borreguero

Can you please check file BASIS_Definition.xml contain the following lines?:

  <component type="silicon">
    <location/>
  </component>
  <type name="silicon">
    <component type="bank1" idlist="bank1">
      <location/>
    </component>
    <component type="bank2" idlist="bank2">
      <location/>
    </component>
    <component type="bank3" idlist="bank3">
      <location/>
    </component>
    <component type="bank4" idlist="bank4">
      <location/>
    </component>
  </type>

comment:10 Changed 6 years ago by Federico M Pouzols

Yes, that block is there. All the modifications in the changeset shown in the first comment here are in my test files.

I did the following test. I introduced small errors in the xml, and I get no errors from MantidPlot when I load the files and show the instrument. Mantid will only complain if I introduce really large errors in the xml, or I remove half of it, etc. That makes me think that if my binary is failing to parse some components it may not be warning at all about it.

This looks like either:

  • there's something definitely wrong in my setup
  • other differences between master and develop are screwing the xml parsing and/or the instrument tree building in the instrument view

I find it very strange that the instrument tree is different when I use the commands that you suggested. Is that expected behavior? This looks flaky to me.

comment:11 Changed 6 years ago by Jose Borreguero

Using only Load will show the BASIS instrument at the time when the run was taken, which contained two inelastic banks (bank1, bank2). Now imagine that you are on the master branch and you Load the file, and then overload the instrument file by applying LoadInstrument to the file. This will load the BASIS_Definition.xml file from the master branch and override the instrument definition stored in the file. Then, you will see extra bank3 and bank4, plus an elastic component. These are additions to the BASIS beamline that were implemented after the run was taken. It seems you are loading the latest instrument definition file, but without the modifications I made on this bugfix. My modifications where to include the four inelastic banks into a "silicon" component.

I had a coworker to check the branch out and merge into develop. After Loading the file, he sees only bank1 and bank2. However, after overloading with LoadInstrument, the instrument tree shows the "silicon" component which includes the four inelastic banks. I am puzzled why you don't see the same thing. Just in case, I would do a cleanup of your build directory and try to build again.

comment:12 Changed 6 years ago by Federico M Pouzols

  • Status changed from verifying to closed

Sorry for all the confusion. I was able to get it working in both develop and master, and the tests pass. This is working as expected. With Load I get:

BASIS
 moderator
 sample-position
 monitors...
 bank1...
 bank2...

But when I do LoadInstrument I can see the new components:

BASIS
 moderator
 sample-position
 monitors...
 silicon...
 elastic...

There was a mess up with my testing MantidPlot settings. I was using the right instrument definitions directory but a wrong parameter definitions directory. That explains it. This silent handling of errors and/or inconsistencies in the xml files can be misleading for lousy users like me.

comment:13 Changed 6 years ago by Federico Montesino Pouzols

Merge remote-tracking branch 'origin/bugfix/10466_basis_silicon_component'

Full changeset: dd0a9f33d1bcce9d2c843201b4da3c2d7c8d5070

comment:14 Changed 6 years ago by Jose Borreguero

Thanks Fede, it would also have fouled me (yo tambien soy un "lousy user" jajaja)

comment:15 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 11308

Note: See TracTickets for help on using tickets.