The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum
 Origin Forum
 Fit curves vanishing

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
scwimbush Posted - 06/29/2007 : 10:40:43 AM
Origin Version (Select Help-->About Origin): 7.5885
Operating System: WinXP

Often (but not always) after fitting a curve using the Non-linear Curve Fit Advanced Fitting Tool and finishing in the normal way, using the Done button, my beautiful fit curve will simply vanish from the plot as the results pane appears. If I rescale the graph to show all, it then becomes evident that it hasn't, in fact, vanished, but is simply drawn in the wrong place, far from the data.

Is this a bug? If not, what am I doing wrong?

(Note that, during fitting, the current fit curve is shown over the correct range, covering the data.)

TIA, Stuart.

3   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 06/29/2007 : 2:31:22 PM
quote:
I can't imagine what else I can do other than manually enter this range each time, which from the functional cases is clearly not what's intended.
I have no idea what's going on either. The default X range of the fit curve should be the range of the independent dataset. If you are not using a built-in function with parameter initialization scripts you can use those scripts to initialize the X range...

1. Select Scripts> Before Fit on the fitter's menu bar and enter the following script in the box at the bottom.

double xMin, xMax;
Curve_MinMax(&x_y_curve, &xMin, &xMax);
LabTalk.NLSF.xBegin = xMin;
LabTalk.NLSF.xEnd = xMax;

2. Check the Enable Automatic Parameter Initialization and Use Origin C options. Dialog should look like that at the bottom.

3. Click the Edit in CodeBuilder button.

4. Once in CodeBuilder click the Compile button at the top and Return to NLSF if successful.

5. Select Function> Save on the fitter's menu bar.

Now open the fitter and select the dependent and independent datasets. The Before Fit script will run automatically when you start a fitting session with Action> Fit. If you then go to the After Fit page you should see that the X range is correct.
quote:
I have taken one of my graphs where the process repeatably fails (every time) and switched to Same X As Fitting Data. Then the curve appears fine. So this is a workaround.
I prefer Same X as Fitting Data because it's much easier to keep track of the fit curve if it's in the same worksheet as the data.



Mike Buess
Origin WebRing Member
scwimbush Posted - 06/29/2007 : 12:26:17 PM
Hi Mike,

Thanks for the very rapid response. Hmm, that's a pity. I was rather hoping it would be something obvious.

I've read through your description, and I can confirm that everything is as I said. The Scripts > After Fit options are set such that Generate Fit Curve is activated, and Uniform X (rather than Same X As Fitting Data) is selected. Could this be the source of the problem? I vaguely remember that I may have changed this in the past. Is Uniform X the default option?

Back to the topic, the curve generated is indeed called NLSFN_B, and is red, as the fit curves usually are.

At something of a loss to know what to do now, I have taken one of my graphs where the process repeatably fails (every time) and switched to Same X As Fitting Data. Then the curve appears fine. So this is a workaround. Switching back to Uniform X, it again appears in the wrong place. This now no longer surprises me, since it appears where the values in the range boxes tell it to. So it would appear that these are "wrongly" (or at least sub-optimally) initialised not to correspond with the existing data range in some cases.

I can't imagine what else I can do other than manually enter this range each time, which from the functional cases is clearly not what's intended. Any further advice would be greatly appreciated, otherwise I'll just thank you for talking me through it thus far, and getting me to the stage where I can at least make it work, if with a little extra effort.

Thanks, Stuart.

Mike Buess Posted - 06/29/2007 : 11:35:31 AM
Hi Stuart,

Never heard of that happening. Are you sure that the off-scale curve is the fit curve? The fit curve shown during the fitting operation is not the same as that which is generated when you click Done. In order to create the latter curve you must go to Scripts> After Fit on the fitter's menu and check the Generate Fit Curve option as shown below. If Same X as Fit Data is selected and the data are in wks Data1 the fit curve will be Data1_BN (where N is an integer > 0). If Uniform X is selected the fit curve will be NSLFN_B (where N is once again a positive integer). Right-click on the off-scale curve and note its name at the bottom of the context menu. If it doesn't correspond to either of the names discussed above, or if the Generate Fit Curve option is unchecked, then its not the fit curve.



Mike Buess
Origin WebRing Member

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000