Ticket #2090 (closed: fixed)

Opened 10 years ago

Last modified 5 years ago

Input string for the Fit algorithm get rejected when presented with a unix-style path

Reported by: Martyn Gigg Owned by: Martyn Gigg
Priority: major Milestone: Iteration 26
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Michael Whitty

Description


Attachments

irs21360_graphite002_red.nxs (403.3 KB) - added by Martyn Gigg 10 years ago.
irs26173_graphite002_res.nxs (114.2 KB) - added by Martyn Gigg 10 years ago.
convfit.py (808 bytes) - added by Martyn Gigg 10 years ago.

Change History

Changed 10 years ago by Martyn Gigg

Changed 10 years ago by Martyn Gigg

comment:1 Changed 10 years ago by Martyn Gigg

The attached script and nexus files should allow replication of the problem.

The debugger shows that an exception is thrown in API::Expression::tokenize. I think it is to do with "/" being treated as an operator(divide) so the string parsing falls over.

Note: This is a unix-style path issue so only occurs on Linux/Mac

comment:2 Changed 10 years ago by Martyn Gigg

  • Status changed from new to accepted
  • Owner set to Martyn Gigg
  • Milestone changed from Iteration 27 to Iteration 26

comment:3 Changed 10 years ago by Martyn Gigg

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

(In [8181]) Fix a problem with unix-style paths in building a string representation of the resolution function. Fixes #2090

comment:4 Changed 10 years ago by Martyn Gigg

  • Status changed from verify to reopened
  • Resolution fixed deleted

comment:5 Changed 10 years ago by Martyn Gigg

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

(In [8182]) Clear some warnings with the IDA interface. Fixes #2090

comment:6 Changed 10 years ago by Michael Reuter

  • Status changed from verify to verifying
  • Tester set to Michael Reuter

comment:7 Changed 10 years ago by Michael Reuter

  • Status changed from verifying to reopened
  • Resolution fixed deleted

I tried running the attached script from within MantidPlot (adjusting the paths for where I downloaded the data) and it doesn't work. Here's the error I see:

Fit-[Error] Error in execution of algorithm Fit:
Fit-[Error] Error in input string to FunctionFactory
name=LinearBackground,A0=0,A1=0,ties=(A0=0.00,A1=0.0);(composite=Convolution;name=Resolution,FileName=/home/2zr/Downloads/irs26173_graphite002_res.nxs;name=Lorentzian,Height=29.1171,PeakCentre=-0.00181586,HWHM=0.000406624)

It looks like the same problem, but could be something new.

Changed 10 years ago by Martyn Gigg

comment:8 Changed 10 years ago by Martyn Gigg

  • Status changed from reopened to accepted

So

comment:9 Changed 10 years ago by Martyn Gigg

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

So the problem here was with the script generated by the algorithm history and not with the fitting within the IDA interface.

The issue is of having strings inside strings and quoting them correctly. If they are backslashed appropriately they will work. I've update the attachment to a working copy and raised a separate ticket about the more general issue of script generation in these cases. See #2101

comment:10 Changed 10 years ago by Michael Whitty

  • Status changed from verify to verifying
  • Tester changed from Michael Reuter to Michael Whitty

comment:11 Changed 10 years ago by Michael Whitty

  • Status changed from verifying to closed

with correctly escaped input script, this works in [8190] (latest version with rpm build available). also tested on the IDA interface.

comment:12 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 2937

Note: See TracTickets for help on using tickets.