AddSampleLog allows to change parameters in a workspace, Mantid people call it “logs”… I know to use it to add a single value or change a single (scalar) value. According to the documentation it should also support adding/changing a vector/array value (e.g. temperatures or motor values during the steps of a scan), LogType=‘Number Series’. However, no example for this is given and it does not work for me, as the array has to be given as “LogText” in some specific format (as a string!), a format that is specified nowhere… I need this to concatenate two workspaces (two scans), a “trivial” (as if anything was trivial with Mantid…) function that is curiously missing in Mantid til now…
Thanks for the query Thomas, we will take a look at how to do this and get back to you.
Hello Thomas, are you getting an error when trying to do this? If so, could you paste it in a comment here.
When using LogType=‘Number Series’, LogText should be an integer or double value. You can explicitly state which you are using by setting the NumberType property. So you might do…
AddSampleLog(… LogType=‘Number Series’, LogText=‘32.33’, NumberType=‘Double’,…)
Mantid will be simply converting the LogText string to either an int or double as specified by NumberType.
This is not it, sorry… I do not want to pass a scalar (double or so), but a vector, e.g., a “series” (thus, “number series”…) of motor values… there seems to be nothing foreseen for this…
Ah okay, I understand, I’d agree Number series is a confusing name. From the docs, it describes Number Series the following way
“If you select Number Series, the workspace start time will be used as the time of the log entry, and the number in the text used as the (only) value.”
So not what you are looking for. I will look into if there is a way to use a vector and get back to you.
I’m not part of the Mantid team, but I’m pretty sure what you are looking for isn’t missing it is just: AddSampleLogMultiple('IvsLam_64139',['PolZ1'], [[1,2,3,4]])
which adds the array [1,2,3,4] to the log value ‘PolZ1’. It comes up quite near the top if you type ‘log’ into the mantid algorithm search box…