Ticket #5225 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

Rename FlatBackground algorithm to something more appropriate

Reported by: Stuart Campbell Owned by: Karl Palmen
Priority: major Milestone: Release 2.6
Component: Framework Keywords:
Cc: Blocked By:
Blocking: #6977, #7157 Tester: Anders Markvardsen

Description

As we have a function and an algorithm with the same name, it might be confusing for users that might think that the algorithm is for fitting a flat background.

Change History

comment:1 Changed 8 years ago by Nick Draper

  • Owner set to Anyone
  • Status changed from new to assigned

Look into this and discuss the suggseted change on mantid developers before implementing

comment:2 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.2 to Release 2.3

Moved at the end of release 2.2

comment:3 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.3 to Release 2.4

Moved to milestone 2.4

comment:4 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.4 to Release 2.5

Moved at the code freeze for release 2.4

comment:5 Changed 7 years ago by Nick Draper

  • Milestone changed from Release 2.5 to Release 2.6

Moved to r2.6 at the end of r2.5

comment:6 Changed 7 years ago by Karl Palmen

I can't find any documentation of a FlatBackground function, but I do find "FlatBackground" in two namespaces:

Mantid::Algorithms::FlatBackground

Mantid::CurveFitting::FlatBackground

comment:7 Changed 7 years ago by Karl Palmen

I found two CPP files one for the algorithm and one for a fitting function.

comment:8 Changed 7 years ago by Nick Draper

Karl,

Go with changing this to CalculateFlatBackground for the algorithm.

You need to check if this is used, especially in our internal scripts. I think it might be in the direct and SANS data reduction.

Perhaps a good text search of the code base is the best way to check.

comment:9 Changed 7 years ago by Karl Palmen

I'll create a duplicate algorithm called CalculateFlatBackground. In the existing FlatBackground algorithm, I'll place a deprecation warning and in a separate ticket remove it for release 2.7.

comment:10 Changed 7 years ago by Karl Palmen

  • Blocking 6977 added

comment:11 Changed 7 years ago by Karl Palmen

  • Owner changed from Anyone to Karl Palmen

comment:12 Changed 7 years ago by Karl Palmen

I've found a similar ticket #4598. From this, it seems that when CalculateFlatBackground has been created, the FlatBackgound algorithm should be changed to a DerecatedAlgorithm and use CalculateFlatBackground like how ExtractMasking uses ExtractMask, except that a deprecation massage may be added. Also it should have WIKI comments for the wiki description.

comment:13 Changed 7 years ago by Karl Palmen

  • Status changed from assigned to accepted

comment:14 Changed 7 years ago by Karl Palmen

I've found two similar algorithms Gaussian1D and Linear. Both of these are deprecated for replacement by Fit along with the approprate function. This has lead me to wonder whether (for consistency) Flatbackground should be deprecated in the same way rather than replacing in CalculateFlatBackground.

comment:15 Changed 7 years ago by Karl Palmen

After a talk with Nick, I decide to go ahead with renaming it CalculateFlatBackground, keeping the old name available till release 2.7 afterall it is simpler than both Linear and Gaussian1D and the simpler CalculateFlatBackground would be appreciated rather than the more complicated Fit with a FlatBackground function.

comment:16 Changed 7 years ago by Karl Palmen

I've found out that FlatBackground uses the deprecated Linear algorithm as a child algorithm.

comment:17 Changed 7 years ago by Karl Palmen

Duplicate FlatBackground algorithm as CalculateFlatBackground re #5225

Also added comments warning that algorithm Linear is deprecated.

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

Changeset: 22b582346e39047ef821de28be03012fe82b6db3

comment:18 Changed 7 years ago by Karl Palmen

Duplicate unit test too re #5225

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

Changeset: 64b4beec00b47457d0d06b58f93964bd458d3701

comment:19 Changed 7 years ago by Karl Palmen

Merge branch 'feature/5225_flat_background' into develop

comment:20 Changed 7 years ago by Karl Palmen

Correct CMakeLists.txt for CalculateFlatBackground re #5225

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

Changeset: 1dd060f46fa0ff7b3e3352a15ebe68fa43a6fa9f

comment:21 Changed 7 years ago by Karl Palmen

Deprecate FlatBackground re #5225

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

Changeset: 5728668393899244a23b413233c742d78ea18f9c

comment:22 Changed 7 years ago by Karl Palmen

Merge branch 'feature/5225_flat_background' into develop

comment:23 Changed 7 years ago by Karl Palmen

To test, run both FlatBackground and CalculateFlatBackground and verify that they do the same. Also check that FlatBackground is deprecated and CalculatedFlatBackground is its advised replacement. Also check that CalculateFlatBackground itself is not deprecated.

comment:24 Changed 7 years ago by Karl Palmen

  • Blocking 7157 added

comment:25 Changed 7 years ago by Karl Palmen

The issue of making CalculateFlatBackground not use the deprecated Linear algorithm will be dealt by ticket #7157.

comment:26 Changed 7 years ago by Karl Palmen

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

comment:27 Changed 7 years ago by Russell Taylor

Merge branch 'feature/6191_remove_spectradetectormap' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:28 Changed 7 years ago by Russell Taylor

Merge branch 'feature/6191_remove_spectradetectormap' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:29 Changed 7 years ago by Anders Markvardsen

  • Status changed from verify to verifying
  • Tester set to Anders Markvardsen

comment:30 Changed 7 years ago by Anders Markvardsen

  • Status changed from verifying to closed

When running FlatBackground get back message: FlatBackground is deprecated (on 2013-05-21). Use CalculateFlatBackground instead. And for CalculatedFlatBackground no additional deprecation message

comment:31 Changed 7 years ago by Anders Markvardsen

Merge remote-tracking branch 'origin/feature/5225_flat_background' into master

comment:32 Changed 7 years ago by Martyn Gigg

Merge remote-tracking branch 'origin/feature/7104_help_button_repo' into 7090_runpythonscript

comment:33 Changed 7 years ago by Nick Draper

  • Component changed from Mantid to Framework

comment:34 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 6071

Note: See TracTickets for help on using tickets.