Skip to content

Commit bc57cb2

Browse files
Deprecate IntegratePeaksMD Version=1 (#39276)
### Description of work The [algorithm description](https://docs.mantidproject.org/nightly/algorithms/IntegratePeaksMD-v1.html#description) describes this algorithm as deprecated, this officially marks it as such. #### Summary of work <!-- Please provide a short, high level description of the work that was done. --> <!-- Why has this work been done? If there is no linked issue please provide appropriate context for this work. #### Purpose of work This can be removed if a github issue is referenced below --> Fixes [10035: Deprecate IntegratePeaksMD v1](https://ornlrse.clm.ibmcloud.com/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/10035) <!-- If the original issue was raised by a user they should be named here. Do not leak email addresses **Report to:** [user name] --> #### Further detail of work <!-- Please provide a more detailed description of the work that has been undertaken. --> ### To test: If you build the docs you should see the deprecated message. Also running the algorithm will create the error message "IntegratePeaksMD is deprecated (on 2025-05-05). Use IntegratePeaksMD version 2 instead.". _e.g._ ```pythom LoadEventNexus(Filename=r'TOPAZ_3132_event.nxs',OutputWorkspace='TOPAZ_3132_nxs') ConvertToDiffractionMDWorkspace(InputWorkspace='TOPAZ_3132_nxs',OutputWorkspace='TOPAZ_3132_md',LorentzCorrection='1') FindPeaksMD(InputWorkspace='TOPAZ_3132_md',PeakDistanceThreshold='0.15',MaxPeaks='100',OutputWorkspace='peaks') FindUBUsingFFT(PeaksWorkspace='peaks',MinD='2',MaxD='16') peaks= IntegratePeaksMD(InputWorkspace='TOPAZ_3132_md', PeaksWorkspace='peaks', PeakRadius=0.12, BackgroundOuterRadius=0.2, BackgroundInnerRadius=0.16, OutputWorkspace='peaks', Version=1) ``` <!-- Instructions for testing. There should be sufficient instructions for someone unfamiliar with the application to test - unless a specific reviewer is requested. If instructions for replicating the fault are contained in the linked issue then it is OK to refer back to these. --> <!-- delete this if you added release notes *This does not require release notes* because **fill in an explanation of why** If you add release notes please save them as a separate file using the Issue or PR number as the file name. Check the file is located in the correct directory for your note(s). --> <!-- Ensure the base of this PR is correct (e.g. release-next or main) Finally, don't forget to add the appropriate labels, milestones, etc.! --> --- ### Reviewer Please comment on the points listed below ([full description](http://developer.mantidproject.org/ReviewingAPullRequest.html)). **Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review.** If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed. #### Code Review - Is the code of an acceptable quality? - Does the code conform to the [coding standards](http://developer.mantidproject.org/Standards/)? - Are the unit tests small and test the class in isolation? - If there is GUI work does it follow the [GUI standards](http://developer.mantidproject.org/Standards/GUIStandards.html)? - If there are changes in the release notes then do they describe the changes appropriately? - Do the release notes conform to the [release notes guide](https://developer.mantidproject.org/Standards/ReleaseNotesGuide.html)? #### Functional Tests - Do changes function as described? Add comments below that describe the tests performed? - Do the changes handle unexpected situations, e.g. bad input? - Has the relevant (user and developer) documentation been added/updated? Does everything look good? Mark the review as **Approve**. A member of `@mantidproject/gatekeepers` will take care of it. ### Gatekeeper If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.
1 parent 735ce2b commit bc57cb2

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

Framework/MDAlgorithms/inc/MantidMDAlgorithms/IntegratePeaksMD.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include "MantidAPI/Algorithm.h"
1010
#include "MantidAPI/CompositeFunction.h"
11+
#include "MantidAPI/DeprecatedAlgorithm.h"
1112
#include "MantidAPI/IMDEventWorkspace_fwd.h"
1213
#include "MantidDataObjects/MDEventWorkspace.h"
1314
#include "MantidDataObjects/PeaksWorkspace.h"
@@ -22,8 +23,10 @@ namespace MDAlgorithms {
2223
* @author Janik Zikovsky
2324
* @date 2011-04-13 18:11:53.496539
2425
*/
25-
class MANTID_MDALGORITHMS_DLL IntegratePeaksMD final : public API::Algorithm {
26+
class MANTID_MDALGORITHMS_DLL IntegratePeaksMD final : public API::Algorithm, public API::DeprecatedAlgorithm {
2627
public:
28+
/// Default constructor
29+
IntegratePeaksMD();
2730
/// Algorithm's name for identification
2831
const std::string name() const override { return "IntegratePeaksMD"; };
2932
/// Summary of algorithms purpose

Framework/MDAlgorithms/src/IntegratePeaksMD.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ using namespace Mantid::DataObjects;
4444
using namespace Mantid::Geometry;
4545
using namespace Mantid::HistogramData;
4646

47+
/// Default constructor
48+
IntegratePeaksMD::IntegratePeaksMD() {
49+
useAlgorithm("IntegratePeaksMD", 2);
50+
deprecatedDate("2025-05-05");
51+
}
52+
4753
/** Initialize the algorithm's properties.
4854
*/
4955
void IntegratePeaksMD::init() {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- :ref:`algm-IntegratePeaksMD-v1` has been deprecated, use :ref:`algm-IntegratePeaksMD-v2` instead.

0 commit comments

Comments
 (0)