Skip to content

User issue: multifit/spinw #1893

@cmarooney-stfc

Description

@cmarooney-stfc

David Tam, instrument scientist at ILL has emailed:

Hello,

I am an instrument scientist at ILL. I have previously used Horace quite a lot and it is wonderful. But this is my first time trying to implement multifit and I am running into some problems.

My goal: I want to do (1) a simultaneous fit of several d2d objects, (2) after masking them, using (3) my SpinW model, and (4) with parallelization locally on a Mac Studio desktop. I am using:
Matlab R2025a
Herbert 4.1.0.2a820f49a
Horace 4.1.0.2a820f49a

At the moment I can get multifit to run, it takes some time running but in the end it is not fitting anything and returns the original parameters. I wonder if it is related to using d2d objects, since at the moment I am using

kk.set_fun(@spinwobj.horace_sqw)
Whereas I think it should be
kk.set_fun(@spinwobj.horace)
But this is generating errors.

Another question is about the masking of the d2d objects, I want to control the masking a bit more rigidly than is done automatically, but although this command works fine:

[y,var,msk] = sigvar_get(w11)
This one throws an error:
sigvar_getx(w11)
Incorrect number or types of inputs or outputs for function sigvar_getx.

I am attaching my files for reference. The SpinW one works fine and generates the model. The trouble is in the trymultifit script. Thanks a lot in advance for your feedback.

Thanks,
David Tam

Attached files. .m files converted to .m.txt as Github does not take .m raw
respaghetti.zip
Spinw_h4_lite.m.txt
trymultifit_lite.m.txt

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions