Two quick questions on data processing with Igor

Igor_user
Posts: 47
Joined: 2009-09-14
Location: Australia

Hi guys,

I have two waves, representing x and y datas, each of which has 5000 data points. The datas were taken with a very high resolution recording machine.

Such a large number of points means the file itself is large and it takes longer to process.

My questions are:

1) If I only need the 1000th to 2000th data points in the table to analyse, how do I do it in Igor?

2) If I want to make the file with x4 less data points, that means to just take one in every 4 data points, is it possible to do it with Igor? What commands to execute?

Thanks for any help in advance!


Posts: 497
Joined: 2007-03-01
Location: United States

Igor_user wrote:

1) If I only need the 1000th to 2000th data points in the table to analyse, how do I do it in Igor?

I don't think it's possible to display only a subrange of a wave in a table. However you can make a copy of that portion of the wave and then analyze that subrange in a table like so:
Duplicate/O/R=[1000, 1999] originalWave, subrangeWave
Edit subrangeWave

Keep in mind that if you make any changes to subrangeWave, those changes won't affect originalWave.

Igor_user wrote:

2) If I want to make the file with x4 less data points, that means to just take one in every 4 data points, is it possible to do it with Igor? What commands to execute?

Execute the following command on Igor's command line for information on how to do this:
DisplayHelpTopic "Decimation"


jcor
Posts: 19
Joined: 2009-11-01
Location: Canada

Igor_user wrote:

2) If I want to make the file with x4 less data points, that means to just take one in every 4 data points, is it possible to do it with Igor? What commands to execute?

Thanks for any help in advance!

In extension to aclight's response, you could use Grep if your data file was formatted conveniently. For example, if you had rows like

ROW#,DATA,DATA,DATA

you could use Grep to find every row number that ends with a zero or five with something like

    Grep/Q/LIST/E="^\d.*(0|5)," "C:folder:filename" // put everything in S_value
    Make/N=(itemsInList(S_value)) data =  str2num(stringFromList(p,S_value))
    Edit data

which would put each row into a string list, and then create a wave from that. This would spare you the time it takes to load all the data.


[ last edited March 6, 2010 - 12:14 ]
Igor_user
Posts: 47
Joined: 2009-09-14
Location: Australia

aclight wrote:

1) If I only need the 1000th to 2000th data points in the table to analyse, how do I do it in Igor?

I don't think it's possible to display only a subrange of a wave in a table. However you can make a copy of that portion of the wave and then analyze that subrange in a table like so:

Duplicate/O/R=[1000, 1999] originalWave, subrangeWave
Edit subrangeWave

Keep in mind that if you make any changes to subrangeWave, those changes won't affect originalWave.

Hi aclight

I tried to execute your command,

Duplicate/O/R=[1000, 1999] "MyWave", "EditedWave"

it looks fine, but can please tell me what the "/O" & "/R" stand for and if the comma "," is necessary in this command line?

Thanks!


[ last edited March 6, 2010 - 17:13 ]
Posts: 593
Joined: 2007-06-21
Location: United States

Igor_user wrote:

Duplicate/O/R=[1000, 1999] "MyWave", "EditedWave"
it looks fine, but can please tell me what the "/O" & "/R" stand for and if the comma "," is necessary in this command line?
!

/O means overwrite and /R means range. Comma is required between parameters.

For documentation on the Duplicate operation, choose Help->Command Help and find Duplicate in the lefthand list or right-click Duplicate in the command line or procedure window and choose Help For Duplicate.

For general help on commands, execute this:
DisplayHelpTopic "Working With Commands"

Make sure to do the Guided Tour of Igor (choose Help->Getting Started). It is essential.

Also, 5000 data points is not a very large data set. Some Igor users work with 5 million or 50 million data points.


Back to top