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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Fitting constraints - keep original
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

peter.cook

UK
356 Posts

Posted - 09/26/2002 :  07:24:04 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,

I have a fitting function that has predfined constraints that I always want to appear as the default values when a new fitting session is launched eg

nlsf.constr$="lrmax<Rmax<urmax;"

which I would liketo change eg

nlsf.constr$="Rmax=Rmax_2;" as per 2 datasets together.

but I don't want the fitting function (ie fdf file) to be altered. Even if I write protect, then I still get prompted with the dialog box which is a pain.

(Origin 6.1 for this app)

Cheers,

Pete





Laurie

USA
404 Posts

Posted - 09/27/2002 :  09:11:33 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Peter,

You'll need Origin 7 for this. The following feature was implemented from a request you had made awhile back.

There is a flag - property of each category in the nlsf - that can be set. If the flag is set, modifications to any of the functions in this category will not be saved.

In the nlsf.ini file, you can add the following to any or all categories:

SaveOption =


The default value for SaveOption is 0; so if the key is missing for a category or if
SaveOption = 0
modifying and saving changes to functions in the category will work just as before (the user can modify and save everything for a user defined function; for built-in functions the formula can not be modified.)

The SaveOption is a bit oriented property. The following rule apply:
1. If any of the bits is on (i.e SaveOption != 0) for a category, the user can not save permanently (in the fdf file) the changes he makes to a function in this category; the "Save" btns are disabled and when exiting Origin there is no prompt to save
Bit 1 on - can not modify formula and parameter names
Bit 2 on - can not modify constraints (linear and to parameters)
Bit 3 on - can not modify initial values and initialization scripts for parameters
Bit 4 on - can not modify before fit, after fit and on parameter change scripts

If any of the bits is on for a category, the user can not delete functions from or add functions to this category.

Please let me know how this works.

Thanks,
Laurie

OriginLab Technical Support
Go to Top of Page

peter.cook

UK
356 Posts

Posted - 09/27/2002 :  09:58:04 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Laurie,

Thanks - I do remember this request from a while back and wondered if I had missed something with Origin 6.1...what I'm trying to do use global fitting with Origin 6.1 LabTalk where the number of datasets can vary. The example provided (Easwar?) showed how this can be done by using eg nlsf.constr$="Rmax=Rmax_2=Rmax_3.." which of course results in the prompt to save / alter constraints even when this isn't possible eg if the fdf file or fitfunc directory is read-only...what I was trying to avoid.

However, what is the labtalk equivalent of sharing a parameter using the nlsf dialog or, to put it another way, does this differ from the above? Can I for example use nlsf.constr$="lrmax<max<rmax" as the default and somehow select the Rmax parameter to be shared across datasets..

Also, what exactly is the difference between using upper and lower bounds as opposed to the constraints? Somehow I've ended up setting default lower and upper bounds asvery low and high respectively, then setting them to different values prior to nlsf.iterate().

Thanks,

Pete

Go to Top of Page

Laurie

USA
404 Posts

Posted - 09/27/2002 :  12:24:33 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Peter,

There was no LabTalk equivalent of parameter sharing until version 7 (also I believe that you need SR2). The LabTalk command is nlsf.sn=1; where n is the enumerated parameter. For example nlsf.s1=1; would share the first parameter in the fitting function.

Whether or not you use nlsf.constr$="Rmax=Rmax_2=Rmax_3.." or parameter sharing the result will be the same. However, I understand why you would like to use sharing because then you wouldn't be modifying the fitting function. Using constraints then brings up the save prompt message.

Upper and Lower bounds is for individual parameters where as constraints you can set up linear relationships between more than one parameter.


Laurie


OriginLab Technical Support
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000