Refactor MaterialScan*_genericAngle into MaterialScan_2D #84
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current status of things is that we have 3 different services for doing a material scan
MaterialScan, that only allows binning in etaMaterialScan_genericAngle: that allows binning in eta, theta, costheta and uses a random phi (only between 0 and 90 degrees)MaterialScan_2D_genericAngle: same as above, except it allows binning in phiThis is not great as the code does pretty much the same thing in all three cases with some variations. I propose then to have a single service for doing material scanning. For that, we can use
MaterialScan, adding the properties that it doesn't have and deprecatingMaterialScan_genericAngleandMaterialScan_2D_genericAngle, removing them later in the future. One key difference is that now phi will not be random like before (both in the oldMaterialScanandMaterialScan_genericAngle, which in my opinion is better as I believe different results would be obtained when running multiple times.BEGINRELEASENOTES
MaterialScan_2D_genericAngleintoMaterialScan, doing a bit of cleanup and preserving the old properties ofMaterialScan, that now emit a deprecation warning if usedMaterialScan_genericAngleandMaterialScan_2D_genericAngleENDRELEASENOTES