I would like to confirm the following series of statements do what I think they should do…If I define a tube as a collection of locations, as below:
<type name=“tube” outline=“yes”>
<component type=“pixel”>
<locations n-elements=“512” x="-10.00" x-end=“9.9609” axis-z=“1.6”/>
<component/>
<type/>
And then define the individual tube as one of several in an instrument, as below:
<type name=“instrument”>
<component type=“tube”>
<location name=“tube1” y="-0.1"/>
<location name=“tube1” y=“0.0”/>
<location name=“tube1” y="+0.1"/>
<component/>
<type/>
It is my expectation that the pixel elements will be appropriately translated into the y-axis based on the location call in the individual tube definitions, despite having no y-axis declaration in in the locations call.
Or, put a different way, does the locations call require one to input definitions for each axis? Can axes be independently defined for a given ‘tube’ using separate location/locations calls?
I do not have a working version of Mantid installed at this time, otherwise I would be inclined to see what I can come up with on my own. A review of numerous IDF files in the Mantid/instrument directory did not yield much satisfaction, either.
Peter
Hi Peter,
Firstly I can recommend that you try the steps in the section “Find a Similar existing IDF” of http://docs.mantidproject.org/nightly/concepts/CreateanIDF.html#create-an-idf to quickly create and visualise instruments.
As for your question: “It is my expectation that the pixel elements will be appropriately translated into the y-axis based on the location call in the individual tube definitions, despite having no y-axis declaration in in the locations call” this is correct, see also http://docs.mantidproject.org/nightly/concepts/InstrumentDefinitionFile.html#using-location.
As for your question: “Can axes be independently defined for a given ‘tube’ using separate location/locations calls?”. Yes, again please see http://docs.mantidproject.org/nightly/concepts/InstrumentDefinitionFile.html#using-location. With reference to this URL - in your code example:
<type name="tube" outline="yes">
<component type="pixel">
<locations n-elements="512" x="-10.00" x-end="9.9609" axis-z="1.6"/>
<component/>
<type/>
the attribute axis-z is redundant. You would only use the axis-x, axis-y and axis-z attributes when specifying a non-zero rotation (and a rotation about an axis different from the default).
You may also find it useful to read http://docs.mantidproject.org/nightly/concepts/InstrumentDefinitionFile.html#using-locations
Thanks for your questions,
Anders