Ticket #6603 (closed: fixed)
Python WorkspaceProperty for WorkspaceGroups
Reported by: | Vickie Lynch | Owned by: | Martyn Gigg |
---|---|---|---|
Priority: | major | Milestone: | Release 2.5 |
Component: | Mantid | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Roman Tolchenov |
Description
When I used WorkspaceProperty in the declareProperty line of a python algorithm with the new api, the input workspace was changed from the WorkspaceGroup to a workspace inside the group. See algorithm, SortByQvectors with attached input.
Attachments
Change History
comment:2 Changed 8 years ago by Martyn Gigg
So this is the expected behaviour. The default behaviour when given a group is to simply call the algorithm sequentially for each member of the group in turn, so that is what is being seen here.
I will accept though that an algorithm may want to mandate the input as a group, which is possible in C++ using WorkspaceProperty<WorkspaceGroup>. This is not possible in Python so a WorkspaceGroupProperty should be added to keep in step with C++.
comment:3 Changed 8 years ago by Martyn Gigg
Don't unroll groups if property is WorkspaceProperty<WorkspaceGroup>
as this type indicates that the request is for the input to be the whole group. Refs #6603
Changeset: 9b7998e6a36006b939d7707a22ab82dc0df9ed14
comment:4 Changed 8 years ago by Martyn Gigg
Add a WorkspaceGroupProperty to Python. Refs #6603
Changeset: ec6a8bae4b6e409a808abf047fd97cffd044a49e
comment:5 Changed 8 years ago by Martyn Gigg
- Status changed from accepted to verify
- Resolution set to fixed
Tester: Use the attached example algorithm and script below to confirm that you can pass a group into a Python algorithm as a whole, rather than it being unrolled. The algorithm simple logs the types of each workspace.
Branch: feature/6603_workspacegroup_property_python
not_group = Load("LOQ49886.nxs") agroup = Load("CSP78173.raw") TestWorkspaceGroupProperty(agroup,not_group)
comment:6 Changed 8 years ago by Roman Tolchenov
- Status changed from verify to verifying
- Tester set to Roman Tolchenov
comment:7 Changed 8 years ago by Roman Tolchenov
- Status changed from verifying to closed
The script reports the correct types for the workspaces.
comment:8 Changed 8 years ago by Martyn Gigg
Don't unroll groups if property is WorkspaceProperty<WorkspaceGroup>
as this type indicates that the request is for the input to be the whole group. Refs #6603
Changeset: 9b7998e6a36006b939d7707a22ab82dc0df9ed14
comment:9 Changed 8 years ago by Martyn Gigg
Add a WorkspaceGroupProperty to Python. Refs #6603
Changeset: ec6a8bae4b6e409a808abf047fd97cffd044a49e
comment:10 Changed 8 years ago by Martyn Gigg
Don't unroll groups if property is WorkspaceProperty<WorkspaceGroup>
as this type indicates that the request is for the input to be the whole group. Refs #6603
Changeset: 9b7998e6a36006b939d7707a22ab82dc0df9ed14
comment:11 Changed 8 years ago by Martyn Gigg
Add a WorkspaceGroupProperty to Python. Refs #6603
Changeset: ec6a8bae4b6e409a808abf047fd97cffd044a49e
comment:12 Changed 8 years ago by Martyn Gigg
Don't unroll groups if property is WorkspaceProperty<WorkspaceGroup>
as this type indicates that the request is for the input to be the whole group. Refs #6603
Changeset: 9b7998e6a36006b939d7707a22ab82dc0df9ed14
comment:13 Changed 8 years ago by Martyn Gigg
Add a WorkspaceGroupProperty to Python. Refs #6603
Changeset: ec6a8bae4b6e409a808abf047fd97cffd044a49e
comment:14 Changed 8 years ago by Martyn Gigg
Don't unroll groups if property is WorkspaceProperty<WorkspaceGroup>
as this type indicates that the request is for the input to be the whole group. Refs #6603
Changeset: 9b7998e6a36006b939d7707a22ab82dc0df9ed14
comment:15 Changed 8 years ago by Martyn Gigg
Add a WorkspaceGroupProperty to Python. Refs #6603
Changeset: ec6a8bae4b6e409a808abf047fd97cffd044a49e
comment:16 Changed 8 years ago by Martyn Gigg
Don't unroll groups if property is WorkspaceProperty<WorkspaceGroup>
as this type indicates that the request is for the input to be the whole group. Refs #6603
Changeset: 9b7998e6a36006b939d7707a22ab82dc0df9ed14
comment:17 Changed 8 years ago by Martyn Gigg
Add a WorkspaceGroupProperty to Python. Refs #6603
Changeset: ec6a8bae4b6e409a808abf047fd97cffd044a49e
comment:18 Changed 7 years ago by Martyn Gigg
Don't unroll groups if property is WorkspaceProperty<WorkspaceGroup>
as this type indicates that the request is for the input to be the whole group. Refs #6603
Changeset: 9b7998e6a36006b939d7707a22ab82dc0df9ed14
comment:19 Changed 7 years ago by Martyn Gigg
Add a WorkspaceGroupProperty to Python. Refs #6603
Changeset: ec6a8bae4b6e409a808abf047fd97cffd044a49e
comment:20 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 7449