Skip to content

Commit

Permalink
Merge pull request mantidproject#37019 from robertapplin/0-expose-wor…
Browse files Browse the repository at this point in the history
…kspace-properties-to-python

Expose missing Data Objects Workspace properties to python
  • Loading branch information
rbauststfc authored Mar 21, 2024
2 parents ec93cad + 93f9139 commit fe0113b
Show file tree
Hide file tree
Showing 8 changed files with 133 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Framework/PythonInterface/mantid/dataobjects/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,27 @@ set(EXPORT_FILES
src/Exports/EventWorkspace.cpp
src/Exports/EventWorkspaceProperty.cpp
src/Exports/Workspace2D.cpp
src/Exports/Workspace2DProperty.cpp
src/Exports/RebinnedOutput.cpp
src/Exports/SpecialWorkspace2D.cpp
src/Exports/SpecialWorkspace2DProperty.cpp
src/Exports/GroupingWorkspace.cpp
src/Exports/GroupingWorkspaceProperty.cpp
src/Exports/MaskWorkspace.cpp
src/Exports/MaskWorkspaceProperty.cpp
src/Exports/OffsetsWorkspace.cpp
src/Exports/OffsetsWorkspaceProperty.cpp
src/Exports/MDEventWorkspace.cpp
src/Exports/MDHistoWorkspace.cpp
src/Exports/PeaksWorkspace.cpp
src/Exports/LeanElasticPeaksWorkspace.cpp
src/Exports/PeaksWorkspaceProperty.cpp
src/Exports/TableWorkspace.cpp
src/Exports/TableWorkspaceProperty.cpp
src/Exports/SplittersWorkspace.cpp
src/Exports/SplittersWorkspaceProperty.cpp
src/Exports/WorkspaceSingleValue.cpp
src/Exports/WorkspaceSingleValueProperty.cpp
src/Exports/NoShape.cpp
src/Exports/PeakShapeSpherical.cpp
src/Exports/PeakShapeEllipsoid.cpp
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2024 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source,
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
#include "MantidDataObjects/GroupingWorkspace.h"
#include "MantidPythonInterface/api/WorkspacePropertyExporter.h"
#include "MantidPythonInterface/core/GetPointer.h"

using Mantid::DataObjects::GroupingWorkspace;

GET_POINTER_SPECIALIZATION(Mantid::API::WorkspaceProperty<GroupingWorkspace>)

void export_GroupingWorkspaceProperty() {
using Mantid::PythonInterface::WorkspacePropertyExporter;
WorkspacePropertyExporter<GroupingWorkspace>::define("GroupingWorkspaceProperty");
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright &copy; 2024 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source,
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
#include "MantidDataObjects/OffsetsWorkspace.h"
#include "MantidPythonInterface/api/WorkspacePropertyExporter.h"
#include "MantidPythonInterface/core/GetPointer.h"

using Mantid::DataObjects::OffsetsWorkspace;

GET_POINTER_SPECIALIZATION(Mantid::API::WorkspaceProperty<OffsetsWorkspace>)

void export_OffsetsWorkspaceProperty() {
using Mantid::PythonInterface::WorkspacePropertyExporter;
WorkspacePropertyExporter<OffsetsWorkspace>::define("OffsetsWorkspaceProperty");
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright &copy; 2024 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source,
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
#include "MantidDataObjects/SpecialWorkspace2D.h"
#include "MantidPythonInterface/api/WorkspacePropertyExporter.h"
#include "MantidPythonInterface/core/GetPointer.h"

using Mantid::DataObjects::SpecialWorkspace2D;

GET_POINTER_SPECIALIZATION(Mantid::API::WorkspaceProperty<SpecialWorkspace2D>)

void export_SpecialWorkspace2DProperty() {
using Mantid::PythonInterface::WorkspacePropertyExporter;
WorkspacePropertyExporter<SpecialWorkspace2D>::define("SpecialWorkspace2DProperty");
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright &copy; 2024 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source,
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
#include "MantidDataObjects/SplittersWorkspace.h"
#include "MantidPythonInterface/api/WorkspacePropertyExporter.h"
#include "MantidPythonInterface/core/GetPointer.h"

using Mantid::DataObjects::SplittersWorkspace;

GET_POINTER_SPECIALIZATION(Mantid::API::WorkspaceProperty<SplittersWorkspace>)

void export_SplittersWorkspaceProperty() {
using Mantid::PythonInterface::WorkspacePropertyExporter;
WorkspacePropertyExporter<SplittersWorkspace>::define("SplittersWorkspaceProperty");
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright &copy; 2024 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source,
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
#include "MantidDataObjects/TableWorkspace.h"
#include "MantidPythonInterface/api/WorkspacePropertyExporter.h"
#include "MantidPythonInterface/core/GetPointer.h"

using Mantid::DataObjects::TableWorkspace;

GET_POINTER_SPECIALIZATION(Mantid::API::WorkspaceProperty<TableWorkspace>)

void export_TableWorkspaceProperty() {
using Mantid::PythonInterface::WorkspacePropertyExporter;
WorkspacePropertyExporter<TableWorkspace>::define("TableWorkspaceProperty");
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright &copy; 2024 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source,
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
#include "MantidDataObjects/Workspace2D.h"
#include "MantidPythonInterface/api/WorkspacePropertyExporter.h"
#include "MantidPythonInterface/core/GetPointer.h"

using Mantid::DataObjects::Workspace2D;

GET_POINTER_SPECIALIZATION(Mantid::API::WorkspaceProperty<Workspace2D>)

void export_Workspace2DProperty() {
using Mantid::PythonInterface::WorkspacePropertyExporter;
WorkspacePropertyExporter<Workspace2D>::define("Workspace2DProperty");
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright &copy; 2024 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source,
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
#include "MantidDataObjects/WorkspaceSingleValue.h"
#include "MantidPythonInterface/api/WorkspacePropertyExporter.h"
#include "MantidPythonInterface/core/GetPointer.h"

using Mantid::DataObjects::WorkspaceSingleValue;

GET_POINTER_SPECIALIZATION(Mantid::API::WorkspaceProperty<WorkspaceSingleValue>)

void export_WorkspaceSingleValueProperty() {
using Mantid::PythonInterface::WorkspacePropertyExporter;
WorkspacePropertyExporter<WorkspaceSingleValue>::define("WorkspaceSingleValueProperty");
}

0 comments on commit fe0113b

Please sign in to comment.