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
 NLFit - sheet name

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
dominik.mierzwa Posted - 03/04/2021 : 09:07:25 AM
Origin Ver. and Service Release (Select Help-->About Origin): Origin 2021
Operating System: W10 Pro

Hi,
Is it possible to automatically name the NLFit sheets (reports and curves) with the function name?

Is it possible to collect particular sheets' names and put them into for example col A as a string?

Kind regards,
Dominik
8   L A T E S T    R E P L I E S    (Newest First)
dominik.mierzwa Posted - 03/05/2021 : 09:18:39 AM
quote:
Originally posted by easwar
So you are fitting one dataset with multiple functions and want to summarize, correct?



Correct.

quote:
Originally posted by easwar
The built-in Rank Models App lets you start from scratch and select functions and create a summary table.



Yes. And this is a good tool for fast fitting. Unfortunately, it fails when the fit fails. Usually, I prefer to fit data on my own and control the fitting options (weighting, tolerance etc.).

quote:
Originally posted by easwar
But we also have another App we published recently:
https://www.originlab.com/fileExchange/details.aspx?fid=584
This App starts with fit sheets that already exists and then summarizes and ranks the results.



I did not know about this app.

quote:
Originally posted by easwar
Can you provide details on what should be improved?

Easwar
OriginLab



Yes, I will try this app and report possible improvements.

Kind regards,
Dominik
easwar Posted - 03/05/2021 : 09:07:18 AM
Hi Dominik,

So you are fitting one dataset with multiple functions and want to summarize, correct?
The built-in Rank Models App lets you start from scratch and select functions and create a summary table.

But we also have another App we published recently:
https://www.originlab.com/fileExchange/details.aspx?fid=584
This App starts with fit sheets that already exists and then summarizes and ranks the results.

Seems to me, one of these Apps should work for you? And if either App needs improvements, we can consider that of course. Can you provide details on what should be improved?

Easwar
OriginLab
dominik.mierzwa Posted - 03/05/2021 : 07:40:13 AM
In my opinion, it could be useful to have a possibility to control the name of NLFit report sheet. It Could be also useful to generate a summary from multiple NLFit reports: parameters, SE, red. chi-sqr., adj. r-sqr, fit status. I usually use multiple functions during approximation and Have to collect all data in one table (for publishing purpose).
BTW if I use the Rank model app it changes the sheet name to a model name...

Kind regards,
Dominik
cpyang Posted - 03/05/2021 : 04:36:49 AM
The code showed a generalized solution for your version of Origin, but you would rather that we make a change for future version to customize the report sheet name, correct?

If that is what you would suggest, then sure, we can look into it how, since other users may want that sheet name to be customized on like some parameter from the data. It is certainly a good idea to have some general way to customize the name of an output, and like everything else, the question is how. Maybe we can use origin.ini?

CP
dominik.mierzwa Posted - 03/05/2021 : 02:39:04 AM
quote:
Originally posted by cpyang

If you don't rename these result sheets, their names are NLFit1, NLFit2 etc, and all the details of the fitting can be obtained using X-Function getresults.
...



Before I check the code, I'd like to ask it is possible to improve it with a part that will change the generic name "NLFitX" with a function name after pass?

Kind regards,
Dominik
cpyang Posted - 03/04/2021 : 12:47:41 PM
If you don't rename these result sheets, their names are NLFit1, NLFit2 etc, and all the details of the fitting can be obtained using X-Function getresults.

I put together the following LT code as a starting point

StringArray aa;
//loop all sheets in project
doc -e LB {
	if(exist(%H,2)==0) //not a workbook, must be a matrix
		continue;
	string str=wks.Name$;
	//"FitNL1", "FitNL2" etc
	if(str.GetLength() == 6) {
		string strN=str.Left(5)$;
		if(strN.compareNoCase("FitNL")==0) {
			//type "[%H]%(str$)";
			getresults tr:=Tr1 iw:=[%H]%(str$)!;
			string strFunc$=Tr1.Notes.Model$;
			//strFunc$=;
			aa.Add(strFunc$);
		}
	}
}
newbook;
aa.CopyTo(Col(A));



CP
dominik.mierzwa Posted - 03/04/2021 : 11:28:51 AM
quote:
Originally posted by 一击爆裂陈子豪
What kind of info you want to collect in 2), btw?



I would like to get a list of sheets from the current workbook. It is a kind of report sheet. I usually use several functions with NLFit and finally I need to collect all data (eg. model parameters wit SE, adj. R-sqr., red. chi-sqr. fit status etc.) in one sheet. Currently, I manually write down the function name used in Col(A) and paste requested data as a link from NLFit report sheets. I also use the lookup function to get some data from NLFit sheets, thus I need the sheet name in col(A). I thought that it could be convenient to automatically rename the sheet with the function name and collect info about used functions in one column.


Kind regards,
Dominik
一击爆裂陈子豪 Posted - 03/04/2021 : 09:37:11 AM
Mm.... for now, no & no. You'll need a customized script to do those.
What kind of info you want to collect in 2), btw?

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