Ticket #9959 (closed: fixed)
Extend component-link to accept id attribute
Reported by: | Anders Markvardsen | Owned by: | Harry Jeffery |
---|---|---|---|
Priority: | major | Milestone: | Release 3.3 |
Component: | Framework | Keywords: | |
Cc: | Student | Blocked By: | |
Blocking: | Tester: | Anders Markvardsen |
Description (last modified by Anders Markvardsen) (diff)
At present we cannot assign parameters uniquely to detector components that have exactly the same name (including path).
See http://www.mantidproject.org/IDF#Using_.3Ccomponent-link.3E for currently allowed syntax.
At present the syntax allows:
<component-link name="HRPD/leftside/bank_90degnew" >
<parameter name="test"> <value val="50.0" /> </parameter>
</component-link>
However if you have two detector components both with the name="HRPD/leftside/bank_90degnew" then you cannot assign parameters uniquely when any of these using component-link.
Here extend <component-link> to accept attribute 'id' and allow the notation:
<component-link id="682714" >
<parameter name="test"> <value val="50.0" /> </parameter>
</component-link>
which associate a parameter with detector component with (detector) id 682714.
The initial use case for this is to allow a tube calibration to be saved with SaveParameterFile for the case where the detector component have not been given unique names.
Note if a user specifies a component-link with a detector id that does not exist then provide warning to user about this
Also update IDF wiki documentation and update xml schema: IDFSchema.xsd in instrument/Schema folder
Change History
comment:1 Changed 6 years ago by Anders Markvardsen
- Description modified (diff)
- Summary changed from Extend component-link to accept det-id attribute to Extend component-link to accept id attribute
comment:2 Changed 6 years ago by Harry Jeffery
- Status changed from new to assigned
- Owner set to Harry Jeffery
comment:4 Changed 6 years ago by Harry Jeffery
Add id attribute to <component-link> schema.
This new attribute is used to identify components by detector id, for when their name is not unique.
Refs #9959
Changeset: 05bda9ce947812270cbd244e4f4bc21c6055727f
comment:5 Changed 6 years ago by Harry Jeffery
Implement loading with <component-link>'s id attribute.
Refs #9959
Changeset: db682434f6b79a477f82f2fade719e08a96449a9
comment:6 Changed 6 years ago by Harry Jeffery
Fix id-name conistency check in Inst.Def.Parser
Refs #9959
Changeset: 7dfe28c0125d6e1afb9085de058c3b8ece0fdf76
comment:7 Changed 6 years ago by Harry Jeffery
Save detector ids when available in SaveParamFile
Refs #9959
Changeset: 93b706692a812d55b811e3e6bd3145232366bb15
comment:8 Changed 6 years ago by Harry Jeffery
Tweak error handling in InstrumentDefinitionParser
Refs #9959
Changeset: 4a4fbfa7811c8f4e57b5cf89c876410d59f05362
comment:9 Changed 6 years ago by Harry Jeffery
Update SaveParameterFileTest to test detector ids.
Refs #9959
Changeset: 42381a64e1b379434d9d194b7b70c2cc8eab07f5
comment:10 Changed 6 years ago by Harry Jeffery
Make SaveParameterFileTest use ASSERT_DELTA for doubles
Refs #9959
Changeset: 83c622c897475f2e94c0a0c74e50c8f0b1b6cee8
comment:11 Changed 6 years ago by Harry Jeffery
Removed some old commented out code in Instrument.
Found this while updating the unit test for this ticket.
This code was commented out over two years ago. If it needed to be kept, it would have been missed by now. Given the exception that immediately follows gives the exact same information, we can afford to clean this up.
Refs #9959
Changeset: a96ac7295fed75590445f8b5c6079563012fd389
comment:12 Changed 6 years ago by Harry Jeffery
Update LoadParameterFileTest.
We now test setting parameters by detector id.
Refs #9959
Changeset: cd4ab887b1ff501c18e62293c295f8aaa2ee3237
comment:13 Changed 6 years ago by Harry Jeffery
- Status changed from inprogress to verify
- Resolution set to fixed
comment:14 Changed 6 years ago by Anders Markvardsen
- Status changed from verify to verifying
- Tester set to Anders Markvardsen
comment:15 Changed 6 years ago by Anders Markvardsen
- Status changed from verifying to closed
Merge remote-tracking branch 'origin/feature/9959_extent_componentlink_to_accept_id_attribute'
Full changeset: 0f67c58fdd974dfddcc131b803d0f2e7ebd1bdb8
comment:16 Changed 6 years ago by Anders Markvardsen
Looks good. Made some (minor) adjustment to the wiki text: http://www.mantidproject.org/InstrumentDefinitionFile#Using_.3Ccomponent-link.3E
comment:17 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 10801