Skip to content

Transmission fitting not using appropriate range in ISIS Command Interface #41181

@adriazalvarez

Description

@adriazalvarez

Describe the bug

Found while working on #41168

The ISIS SANS Command Interface has a command to do a pre-reduction transmission fitting(TransFit) with the sample , the can or both. When fitting BOTH the sample and the can, there is a bug in the command interface state director that only adds the fitting instructions for the can, so the sample is not fitted to the selected range. This may not affect too much the final reduction as the final fitted transmission is cropped to the specified range.

To Reproduce

Using LOQ-demo from Training Data Set:

# import mantid algorithms, numpy and matplotlib
from mantid.simpleapi import *
import matplotlib.pyplot as plt
import numpy as np

#import Command Interface from sans library
from sans.command_interface.ISISCommandInterface import *

LOQ()
MaskFile('MaskFile.toml')

AssignSample('LOQ74044.nxs')
TransmissionSample('LOQ74024.nxs', 'LOQ74014.nxs')
AssignCan('LOQ74019.nxs')
TransmissionCan('LOQ74020.nxs', 'LOQ74014.nxs')
LimitsWav(3, 4, 0.2, "LIN")
TransFit("LOG", 6.0, 8.0, "BOTH")
#Performs reduction and saves data to path using SaveRKH and SaveNexus algorithms
WavRangeReduction(3,4,False,'_test')

Resulting fitted transmission workspaces (the workspace name should end in _6.0_8.0:

Image

Can ( in selected range 6-8):

Image

Sample (not in selected range):

Image

Expected behavior

The fix is simple and quick (at first glance), but may be better to communicate with SANS ISIS Scientist first.

Screenshots

Comparison with the system test (SANSLOQTransFitWorkspace2D) test Data for the range 3.0-8.0:

Image

Platform/Version (please complete the following information):

  • OS: All
  • OS Version:
  • Mantid Version 6.15, nightly

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIssues and pull requests that are regressions or would be considered a bug by users (e.g. crashing)ISIS: LSSIssue and pull requests relating to SANS and Reflectometry (Large Scale Structures) at ISIS

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions