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
 Removing/moving a data point from Pick Peaks listi

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
kpongani Posted - 03/26/2012 : 10:02:44 AM
Origin Ver.8 and Service Release 6(Select Help-->About Origin):
Operating System: Win 7

Peak Analyzer is quite different from the Pick Peaks dialog. For one, the generated list of peaks found is locked when generated by Peak Analyzer. I have a command in my script to call the old Pick Peaks dialog -- dialog.start(otools,pickpeak)

Even so, there are some added changes.

1. In Version 7.0, when I used "Remove Bad Data Points" in a script, the the row containing the bad data point was eliminated. In Version 8, only the Y value is replaced with a "-". Is there a command that will remove the entire row as before? I know I can hunt for that "-", but I can't find a command that removes a single row in a worksheet.

2.Similarly, when I used "Move Data Points" I used to be able to re-sort the found peaks worksheet. I can't do that any longer. Is there a workaround for this, as well?

3. Since Peak Analyzer is a better dialog, is there a way to use it instead and still be able to move or delete the peaks found? I can live with Pick Peaks, but would prefer to use the newer version.

Many thanks.
7   L A T E S T    R E P L I E S    (Newest First)
Sam Fang Posted - 03/30/2012 : 03:32:26 AM
You can run the script
@YPR=0;
in the Command Window or Script Window.

If you want to set it by default. You can copy the file MACROS.cnf in the installation folder to the User Files folder. And add the script to the beginning of the file. When you start Origin, it will work.

To sort a worksheet, you can also select Worksheet: Sort Worksheet from Origin menu.

Yes, wdelrows is not supported in 8.0. You can use mark -d to remove continuous rows in 8.0 though it is not as powerful as wdelrows.

Sam
OriginLab Technical Services
Kathy_Wang Posted - 03/30/2012 : 03:02:06 AM
For the first question, I am sorry that was my fault, it should be
sort -c 1 5 Peaks1_Pky
; it is "Peaks1_Pky" instead of "Peaks1_Pkx" because we are going to sort the worksheet based on Pky column value.
If the command doesn't work, as an alternative option, you may try to do the sorting manually. First highlight column Pky, right click, then choose "Sort Worksheet:Ascending" and you will get the same result as the command.

For the second one, you may use the following script (assuming you have 5 columns):

range aa = 1[3]:5[3];
del aa;

The number 3 indicates the row number you want to delete.


Kathy
Originlab
kpongani Posted - 03/29/2012 : 08:30:36 AM
Thanks for the suggestions.

1. I'm a little confused about the sort command. Shouldn't the command be:

sort -c 1 5 Peaks1_Pkx;
instead of
sort -c 1 41 Peaks1_Pky;

since there are 5 columns? Unfortunately, as I have mentioned, this command seems to work only about half the time. I am at a loss to explain why.

2. I've tried:
wdelrows m:=1 r:=col(4);

but this command only seems to work on versions 8.1 or newer. Is there an older command that works for Origin 8.0? I thought that there used to be a DeleteRows or delrows command, but that doesn't seem to be a valid command any longer.

3. Also, I'm not clear on how to use @YPR=0. I assume that this needs to be declared before I use the Remove Bad Data Points module. Can I make this the default action whenever I start Origin, even if I'm not using a script? There are times that I just want to use the built-in Remove Bad Data Points. How can I have this built-in module remove the entire row as it did in Origin 7 as the default action without resorting to running a script?
Sam Fang Posted - 03/29/2012 : 05:32:06 AM
You can run the script to change the system variable:

@YPR=0;


which will force to remove a row.

Sam
OriginLab Technical Services
Kathy_Wang Posted - 03/29/2012 : 04:06:15 AM
Hi, I do reproduce your problem with both 8.0 SR6 and 8.6 SR2. Here I could give you a workaround, that after you removing the bad data points, run the following script
sort -c  1 5 Peaks1_Pky;

,and the data points with deleting Pky value will be sorted at the bottom of the worksheet, so you could delete them easier at one time.


Kathy
Originlab
kpongani Posted - 03/28/2012 : 10:29:58 AM
Unfortunately, the problem is quite reproducible. I have even downloaded an evaluation copy of Origin 8.6 to see if it was a flaw in my older version (8.0).

And, the command to sort this list sort -c 1 5 Peaks1_Pkx; works sometimes, and then, sometimes doesn't.

Please note that none of this was ever a problem in Origin 7.0 or in 7.5.

Using Origin 8.6, here is my graph after running PickPeaks.



I am going to remove the 2nd found peak point.


Here is the list of found peaks before removal.


Removing the point


Here is the list after. Please note that the 2nd row is not removed. Only the y-value is deleted.
Sam Fang Posted - 03/28/2012 : 03:49:37 AM
I can't reproduce your problem. In fact Origin8.0's Move Data Points and Remove Bad Data Points in Data menu almost work in the same way as 7.0.

Sam
OriginLab Technical Services

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