As you mentioned, you have a lot of possibilities. Here are some options to get rid of the triangle:
- Use Fourier filtering. To do this, subtract the average of the waveform, then take the Fourier transform. Now remove the peaks which correspond to a triangle wave. You can interpolate under them or just zero them, whatever works best for you. Do an inverse transform on the result, then add back the offset you subtracted and you should have your absorption waveform. Note that this works best when you have an integer number of periods of the triangle wave.
- If you know that the triangle is a very good triangle, fit the data to a triangle wave using the Levenberg-Marquardt fit VIs, then subtract your fit from the data.
- Find the peaks and valleys of the triangle using the peak finder, then piecewise fit lines to each triangle wave segment and subtract them. This can have problems with offsets if your absorption valleys never go back to baseline.
- If the absorption peaks are constant and the triangle wave phase keeps shifting, just average a bunch of waveforms. The triangles will mostly average out. You can get rid of the last bit by one of the above three techniques.
Try these in the order listed, as they get harder to implement and less chance of success as you go down.
It was unclear whether or not your absorption peaks are drifting in time or just the triangle wave. If the absorption peaks are shifting, you will need to use the resample VIs. Start with the
Align and Resample express VI and convert it to a normal VI if you need to tweak it.
Spline or
FIR Filter are probably your best methods. Use
Spline if you have a large shift (it is very slow, use
Linear if you need speed). Note that
FIR Filter can leave artifacts at the end of your waveform.