Create an indicator after the read operation to display the read data. After running, right-click the indicator terminal and "change to constant". Delete all code to the left of it and we have a VI with the data built-in.
Your array to cluster has the output size set to 9 elements (the default), thus it is incompatible with the cluster of 2 elements inside the model. As a first step, you need to set the cluster size to 2 (right-click the array to cluster...cluster size...).
Your data also contains a vertical offset, meaning you need one more parameter. Just add one more parameter defaulting to 0, and inside the model, expand the initial "index array" by one point and add the output to the array at the very end.
I get an offset of 116.043, so for a first try simply subtract that value from your data so you can use the current model. Then implement the offset.
I am about to use your 2-D nonlinear curve fitting code (or some version of it) to analyze some imaging data that I found today. THANK YOU!!! for posting your code. Quick question. Why do you NOT use the mathscript or formula nodes to generate the gaussian model(s)? I am asking because I might need to implement an assymetrical gaussian model.
Sorry about the text base code, but essentially an asymmetrical 2D gaussian, like the following, but with rotation as well. However, keeping graphic, it looks like it should be relatively easy to modify your 2DgaussianRotationModelwithOffset.vi to do the trick, if need be.
Again, Thanks for posting your code.
f1 = exp(-0.5*((x-xc)/sigmax1)^2);
f2 = exp(-0.5*((x-xc)/sigmax2)^2);
f3 = exp(-0.5*((y-yc)/sigmay1)^2);
f4 = exp(-0.5*((y-yc)/sigmay2)^2);
if x < xc
f5 = f1
f5 = f2
if y < yc
f6 = f3
f6 = f4
z = offset + amplitude*f5*f6;