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?
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...
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.)