Help with programming

I am an Igor noob, so please bear with me. I work with lithium ion batteries and my electrochemical test equipment spits out a huge excel sheet containing 40 - 60 steps of a battery test file (cycling, impedance, etc.). How can I go about using Igor to sort through the data and divide it up? Thanks in advance for any help!

If you haven't done so already, you should first go through the Guided Tour. Select the Help->Getting Started menu item in Igor to get started. Alternately, you can watch the tour in video form at https://www.wavemetrics.com/products/igorpro/videotutorials.htm.

Next, as to your question, you haven't provided enough information for anyone who isn't extremely familiar with your exact situation to provide a useful answer. http://stackoverflow.com/help/how-to-ask is a good guide that will help you formulate your question in a way that it can have an answer that is useful to you.

If you know someone that uses Igor with data similar to yours, you may wish to talk with them about how to get started analyzing your data.
Sorry about not providing enough information. When I import my data to Igor, many cycles of data are sequentially listed in one wave. For example, Wave0 = step number, wave1 = voltage, wave2 = capacity, etc. Basically what I want to know is if there is a way for me to tell Igor to segment the data as the number in wave0 changes? So as the value in wave0 increments from 1, 1, 1, 1, 2, 2, 2, 2, ... the data will break between 1 and 2?
aclight wrote:
If you know someone that uses Igor with data similar to yours, you may wish to talk with them about how to get started analyzing your data.


I've used Igor quite a bit for analyzing electrochemical data, usually for CV sweeps or chronopotentiometry but also a little EIS. My approach was usually to export the potentiostat data to a text file then use an Igor procedure to parse that text file into the appropriate waves with meaningful names. Let me know if you'd like to see an example procedure. The best way to process the data depends highly on the potentiostat software (I used Gamry, Modulab, and Jaissle models).

However, it would be worth your time to look into the Excel file loading capabilities. In the GUI that's under Data - Load Waves - Load Excel File, or you can get more detail in the help browser command help for "XLLoadWave".
heatherbarkholtz wrote:
Sorry about not providing enough information. When I import my data to Igor, many cycles of data are sequentially listed in one wave. For example, Wave0 = step number, wave1 = voltage, wave2 = capacity, etc. Basically what I want to know is if there is a way for me to tell Igor to segment the data as the number in wave0 changes? So as the value in wave0 increments from 1, 1, 1, 1, 2, 2, 2, 2, ... the data will break between 1 and 2?


No simple way to do this without a bit of coding. Here's an example procedure that can create a bunch of subsets of "wave1" based on a step index held in "wave0." You can extend it to your other waves (capacity, time, etc.). Beware however that this can quickly lead to a proliferation of waves in the root folder, so if you want to keep organized, you might want to learn about data folders.

Function splitSteps()
    wave wave0
    wave wave1
   
    variable i=1 //Use to increment step count
    variable numSteps=WaveMax(wave0) //Figure out the total number of steps
    string steppedWaveName //Use for the name of the new wave to create
    do
        Extract/INDX wave0,stepIndices,wave0==i //Figure out the index values where step is "i" in wave0
        steppedWaveName="wave1_step"+num2str(i) //Name the new wave
        Duplicate/O/R=(stepIndices[0],stepIndices[numpnts(StepIndices)-1]) wave1 $steppedWaveName //Duplicate wave1 into the new wave, using the index values found in "Extract"
        i+=1
    while(i<=numSteps)
End
If I'm understanding your question correctly, a fairly simple procedure can do the segmenting for you.

When I import my data to Igor, many cycles of data are sequentially listed in one wave. For example, Wave0 = step number, wave1 = voltage, wave2 = capacity, etc. Basically what I want to know is if there is a way for me to tell Igor to segment the data as the number in wave0 changes? So as the value in wave0 increments from 1, 1, 1, 1, 2, 2, 2, 2, ... the data will break between 1 and 2?

You can duplicate the original waves, and then perform conditional assignment to copy over only certain values.

For instance, you could write:
duplicate voltage voltage_1 // this creates a duplicate of the full voltage wave called 'voltage_1'
voltage_1[] = (wave0[p]==1) ? voltage[p] : NaN //this goes through point by point and assigns values to voltage_1
//this conditional assignment retains the value of the voltage at that point if wave0 has a value of 1 at that point, and NaN (not a number) otherwise.

You can get more complicated by writing a function that navigates the entire list of waves and creates subsets for each step number if you want to, but this logic should help.