Skip to content

Software implementation of lockin amplifier, which is a high-Q amplifier and filter for AM-modulated signals. Originally used for physics metrology, optimized here for fiber photometry.

Notifications You must be signed in to change notification settings

agvaughan/lockin_decoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

lockin_decoder

This is a software implementation of lockin amplifier, which estimates the power of a ~sinusoidally modulated signal in the presence of massive noise. [See eg. http://www.thinksrs.com/downloads/PDFs/ApplicationNotes/AboutLIAs.pdf]

One trick here is that we're trying to implement this without the reference signal for the modulation, and thus need to simultaneously estimate the demodulation frequency/phase as well as its amplitude modulation.

One annoyance is that, given our long recordings, 0.001% error in estimating the modulation frequency led to catastrophic phase precession. In the end we gave up trying to estimate the modulation frequency precisely, and simply used a phase demodulator to compensate for that phase precession.

This code is experimental, with a few unused code paths for deprecated approaches. It works well enough, though - probably better than the $4k instrument from SRS for our purposes.

About

Software implementation of lockin amplifier, which is a high-Q amplifier and filter for AM-modulated signals. Originally used for physics metrology, optimized here for fiber photometry.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages