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 for Programming
 Forum for Origin C
 Deleting rows containing masked data
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

anthonynky

Netherlands
Posts

Posted - 03/01/2006 :  07:00:33 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version: 7.5
Operating System: Windows XP

In an (x,y)-graph I have several series of consecutive bad points which I would like to delete. These points can only be identified manually.

What I have done in the past, is:
  • Mask consecutive bad data points in graph

  • Go to the worksheet

  • Delete all the rows that are masked/red


It would save me a lot of work, if I could automate this last step. Does anyone know if there is a OriginC-function for identifying masked data points? Or is there a simpler solution to my problem?

Mike Buess

USA
3037 Posts

Posted - 03/01/2006 :  08:02:02 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
There are a couple of File Exchange tools that delete multiple data points...

http://www.originlab.com/fileexchange/details.aspx?fid=116
http://www.originlab.com/fileexchange/details.aspx?fid=102

Mike Buess
Origin WebRing Member
Go to Top of Page

anthonynky

Netherlands
Posts

Posted - 03/01/2006 :  08:13:15 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Mike,

Thanks for the links. I already installed both the tools and they do help for some points. However, I normally have to remove several 100 consecutive points and deleting them one by one is undoable. Because these bad points can overlap with good points, I can also not select them by using a rectangle.

quote:

There are a couple of File Exchange tools that delete multiple data points...

http://www.originlab.com/fileexchange/details.aspx?fid=116
http://www.originlab.com/fileexchange/details.aspx?fid=102

Mike Buess
Origin WebRing Member

Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 03/01/2006 :  09:26:06 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
This script will remove all masked points by deleting the corresponding rows in the wks. You can run it while the graph is active. It's a LabTalk script so copy/paste to script window, select all lines and press Enter. Alternatively, you can run it from the Custom Routine button as described here.

get %C -e npt;
for(ii=npt;ii>0;ii--) {
mm=%C<ii>; // is point masked (mm=1) or not (mm=0)?
if(mm) mark -d %C -b ii -e ii;
};

...Here's a more efficient method that uses LabTalk's FindMasks function.

tmp=FindMasks(%C);
get tmp -e npt;
for(ii=npt;ii>0;ii--) {
mark -d %C -b tmp[ii] -e tmp[ii];
};
del tmp;

...A final comment about masking and the Cluster tool. That tool will not remove masked points. If you have a few "good" points mixed in with the bad you can mask the good points and remove the rest with the Cluster tool. (I'm not sure how you differentiate between good and bad under those circumstances.)

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 03/01/2006 09:28:38 AM

Edited by - Mike Buess on 03/01/2006 09:56:42 AM

Edited by - Mike Buess on 03/01/2006 6:29:11 PM
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