Ticket #6335 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

Enable the IDF component-link to use full path name of component

Reported by: Karl Palmen Owned by: Karl Palmen
Priority: major Milestone: Release 2.4
Component: Mantid Keywords: IDF
Cc: anders.markvardsen@… Blocked By:
Blocking: Tester: Owen Arnold

Description (last modified by Karl Palmen) (diff)

At present the usefulness of the IDF component-link item is limited by that the component can only be specified only by its local name, which may not be unique. This could be improved if a full path name could be accepted or better still a partial path name as is the case for instrument#getComponentbyName().

This could be done by moving instrument.getAllComponentsWithName() up to compAssembly and calling repeatedly along the path as is now done by component.getComponentByName().

The unit test DataHandlingTest LoadInstrument test can be modified to test this.

Change History

comment:1 Changed 8 years ago by Karl Palmen

  • Status changed from new to assigned
  • Owner set to Karl Palmen

comment:2 Changed 8 years ago by Karl Palmen

  • Cc anders.markvardsen@… added

comment:3 Changed 8 years ago by Karl Palmen

  • Description modified (diff)

comment:4 Changed 8 years ago by Karl Palmen

One can assume a component with '/' in its name is unique and so use getComponentByName() rather than GetAllComponentsWithName() in this case.

comment:5 Changed 8 years ago by Karl Palmen

  • Status changed from assigned to accepted

comment:6 Changed 8 years ago by Karl Palmen

Placing the unit test in LoadParametersTest rather than LoadInstrumentTest would save creating another copy of an IDF file and could be a lot simpler.

comment:7 Changed 8 years ago by Karl Palmen

Implement a simple solution re #6335

Make InstrumentDefinitionParser use getComponentByName if a '/' is found in the component's name. Component is assumed unique if there is a '/' in its name.

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 4deb13d65e863f8228d7330d5889a96a394d0f7c

comment:8 Changed 8 years ago by Karl Palmen

Modify Test file to test this feature re #6335

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 26d625b164045aab79d2acc059ea0bf3aeb8c8ff

comment:9 Changed 8 years ago by Karl Palmen

To test I suggest executing LoadEmptyInstrument or LoadParameterFile on a parameter file that has a component link to a component that is not the whole instrument and is unique.

Then check that the component has loaded as expected by either viewing the instrument or checking its fitting parameters (depending on content of the component-linked parameter data).

comment:10 Changed 8 years ago by Karl Palmen

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

comment:11 Changed 8 years ago by Karl Palmen

Implement a simple solution re #6335

Make InstrumentDefinitionParser use getComponentByName if a '/' is found in the component's name. Component is assumed unique if there is a '/' in its name.

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 4394e5bfc8379430bca9b62c2d511c8adb44ed09

comment:12 Changed 8 years ago by Karl Palmen

Modify Test file to test this feature re #6335

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 4b90463278b1cc0ec9cf248e9cb58295ffabb3f7

comment:13 Changed 8 years ago by Owen Arnold

  • Status changed from verify to verifying
  • Tester set to Owen Arnold

comment:14 Changed 8 years ago by Owen Arnold

  • Status changed from verifying to closed

comment:15 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 7181

Note: See TracTickets for help on using tickets.