linien-org / linien

Spectroscopy lock application using RedPitaya
GNU General Public License v3.0
69 stars 18 forks source link

Normalizing the AC spectroscopy signal with the DC spectroscopy signal #412

Open martinssonh opened 3 months ago

martinssonh commented 3 months ago

Is your feature request related to a problem? Please describe. I am using Linien to lock a laser halfway on the side of a resonant transmission peak of an etalon (side of fringe locking). Since I'm modulating the laser current to control the wavelength, the laser output power will also vary. To compensate for the varying laser power, I also have a detector before the etalon, connected to FAST IN 2 (the detector after the etalon is connected to FAST IN 1).

On the Modulation, Sweep & Spectroscopy tab, I invert channel 2 and apply a negative offset bias so the resulting signal (channel 1 + channel 2) has a zero crossing at half of the signal maximum. Then I lock to that zero crossing.

This is working fine, but I believe a better way to compensate for the varying signal level would be to normalize (divide) channel 1 with channel 2. In that way any variation in the laser power from the modulation will be completely compensated. A subtraction of channel 1 and 2, with or without offsets, will only completely compensate for the laser power variation if the signal levels from both detectors are exactly the same.

Describe the solution you'd like I think it would be a good idea to be able to choose between either adding the two channels, with offsets, or dividing them. Of course, division by zero is never a good idea but I'm sure that can be handled.