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 for Programming
 LabTalk Forum
 baselines with script

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
alex_eagle Posted - 02/22/2002 : 06:50:59 AM
I am working on a script, which loads several spectra into a worksheet and fits the peaks with a gaussian/lorentzian function. But first I need to do a baseline correction for all of my spectra in the worksheet ! How is this done best with script ?
1   L A T E S T    R E P L I E S    (Newest First)
rtoomey Posted - 02/26/2002 : 11:18:22 AM
Origin's Baseline Tool (Tools:Baseline) allows one to create a baseline and then subtract it from the original data. I think the easiest way to accomplish your task would be to utilize the script which runs behind the scenes when these actions are being performed in the tool.

To explain, there are three baseline creation methods on the Baseline tab of the Baseline Tool. They are "Automatic", "User Defined Equation", and "Use Existing Dataset". When the Create Baseline** button is clicked, corresponding sections in Baseline.OGS are called. The sections are: [AutoBaseline], [UserDefined], and [ExistingDataset]. All three sections in turn call the [Create] section, which then calls the [Initialize] section.

There is also a button called "Subtract". When this button is clicked, the [Tab.BaseLn.Subtract.OnClick] section is run. This section in turn calls the [Initialize] and [CheckI] sections.

To customize these sections for your own use, here's what you might want to do:

  1. Decide which baseline creation method you would like to use.

  2. Open a new document in any text editor (e.g. Notepad).

  3. Copy the desired baseline creation method section to the text editor along with the Create, Initialize, Tab.BaseLn.Subtract.OnClick, and CheckI sections.

  4. Modify each section so that it works for you. This would include replacing all string and numeric variable initializations with your own. It might also involve renaming the sections to simpler names.

  5. Create a [Main] section which calls the baseline creation section and then the subtract section.

  6. Save the document as an OGS file in the Origin directory. You can then run the OGS file by executing the run.section(filename,sectionname) method, where the section name is MAIN.



If you have specific questions about this, it might be best to contact your local technical support representative in Austria. For contact information, go to:

http://www.originlab.com/www/services/europe.asp

I hope this information proves helpful.

- rtoomey




**Note: My response assumes you have Origin 6.1 or higher.



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