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 for many spectra

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
Phillip T. Posted - 02/16/2021 : 09:25:30 AM
Hello Everyone,

i am trying to create baselines for some spectra but want to review the anchor points before going to the next baseline. I am using the pa command as such (in a loop):

pa iy:=[%H]slectspec!col($(ii)) smode:=1 theme:=2w_IrO2;

If i use smode :=0 it works fine but i cant review the anchorpoints. If i use smode :=1 i can review the first baseline fit and then it brakes the loop and the program stops.

origin verison : b9.5.5.409
OS: win 10

Thank you.
8   L A T E S T    R E P L I E S    (Newest First)
minimax Posted - 02/25/2021 : 02:11:36 AM
Hi Phillip,

PA will create a new graph window to start analysis, so %H will change.

You may modify your script a bit to see if it works? like

string srcbook=%H;

for(int ii=2; ii<= $(speccols); ii++) {

pa iy:=[srcbook$]slectspec!(1,$(ii)) smode:=0 theme:=2w_IrO2;

...
range bl = [srcbook$]slectspec!col($(blcol));
range put = [srcbook$]baselines!col($(ii));
...

minimax Posted - 02/24/2021 : 04:26:40 AM
quote:
Originally posted by Phillip T.

Unfortunately the files are too large to share



Hi Phillip,

Would you mind to upload to FTP instead?
https://www.originlab.com/index.aspx?go=Support/SendFilestoSupport

Or if you have some share link for us to download, it is also welcome.

Max
OriginLab Technical Support
Phillip T. Posted - 02/19/2021 : 02:13:30 AM
Unfortunately the files are too large to share
Phillip T. Posted - 02/19/2021 : 02:07:47 AM
Hello Easwar,

sorry for the late answer, I was quite busy and forgot.

Sure I can share my spectra but they are quite specialized and go through other normalization procedures before substracting the baseline. These normalization procedures create some distortions and I dont think an algorithm will be able to recognize those and i place my baseline anchor points as fixed y values. But you are welcome to try.

Regards,
Phillip
easwar Posted - 02/17/2021 : 09:43:13 AM
Hi Phillip,

We will look into this further, and see if a new X-Function is needed for such operation within a loop. Thank you for sharing your user story. I have created a request to our development team (ORG-23219)

Thank you,

Easwar

P.S. Please share your data if ok, so we can still look at the baseline detection improvements
easwar Posted - 02/17/2021 : 09:29:15 AM
Hi Phillip,

It may just be that the px x-Function cannot be used as it is now, in a loop. Our developers may need to look at this, so I will discuss here.

In the mean time, can you share a few of your spectra? Perhaps we can also improve auto baseline detection so you don't have to adjust one by one in a loop?

You can share the files by starting a ticket here:
https://www.originlab.com/restricted/support/index.aspx?c=3

Please mention this post in your message.

Easwar
OriginLab
Phillip T. Posted - 02/17/2021 : 02:43:59 AM
Hello easwar,

thanks for your reply. I tried using "for" instead of "loop" and changed the column reference. Still the same result

Here is the complete code i use:

//////////////
for(int ii=2; ii<= $(speccols); ii++) {

pa iy:=[%H]slectspec!(1,$(ii)) smode:=0 theme:=2w_IrO2;

blWNcol =$(speccols)+1 ;
blcol = $(speccols)+2 ;

range bl = [%H]slectspec!col($(blcol));

range put = [%H]baselines!col($(ii));

put=bl;

del col($(blcol));
del col($(blWNcol));

};
//////////////////

When I remove the code after the pa command the first spectrum still opens but i also get the error massage "Warning! no data selected" (in german, not sure if its the same in english) however going through the code line by line does not produce that error.
easwar Posted - 02/16/2021 : 12:14:30 PM
Hi Phillip,

I have data arranged as XYYY and I tried the following script

for(int ii=2; ii<=4; ii++)
{
  pa iy:=[book1]1!(1,$(ii)) smode:=0 theme:=mygauss;
}

an it worked for me, although all three PA preview windows opened right away, and I had to click on the next preview to continue to next data etc.

Can you try changing your iy to include the X column, and not just y?

Easwar
OriginLab

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