Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bengineerd committed Oct 24, 2023
1 parent 75cdf8b commit d25aae9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 30 deletions.
3 changes: 1 addition & 2 deletions firmware/python/warm_tdm/_ColumnModule.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ def __init__(self,

self.add(warm_tdm.SaBiasOffset(
dac = self.SaBiasDac,
# loading = self.Loading,
waveformTrigger = self.DataPath.WaveformCapture.WaveformTrigger))

self.add(warm_tdm.Ad5679R(
Expand Down Expand Up @@ -249,7 +248,7 @@ def __init__(self,
offset = 0xC0200000))

#########################################
# Compute SA Out based on loading options
# Compute SA Out based on amplifier config
#########################################
self.add(pr.LinkVariable(
name = 'SaOutAdc',
Expand Down
28 changes: 0 additions & 28 deletions software/python/warm_tdm_api/_Group.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,34 +126,6 @@ def _get(self, read):
with self.parent.root.updateGroup():
return self._value

class Amplifier(object):
def __init__(self):

self.Rbias = 15e3
self.Roff = 4.22e3
self.Rgain = 100
self.Rfb = 1.1e3
self.Rcable = 200

self.Gbias = 1.0/self.Rbias
self.Goff = 1.0/self.Roff
self.Ggain = 1.0/self.Rgain
self.Gfb = 1.0/self.Rfb
self.Gcable = 1.0/self.Rcable

self.G2 = 11
self.G3 = 1.5

def Vout(self, Vin, Voff):
return self.Rfb * (Vin*(self.Ggain + self.Goff + self.Gfb) - Voff*self.Goff) * self.G2 *self.G3

def Vin(self, Vout, Voffset):
return ((Vout/(self.G2*self.G3)) * self.Gfb + Voffset * self.Goff) / (self.Ggain + self.Goff + self.Gfb)

def SaOut(self, Vout, Vbias, Voffset):
return self.Vin(Vout, Voffset)
#return (self.Vin(Vout, Voffset) * (self.Gbias + self.Gcable) - Vbias * self.Gbias) / self.Gcable


class SaOutVariable(GroupLinkVariable):
def __init__(self, config, disp='{:0.04f}', **kwargs):
Expand Down

0 comments on commit d25aae9

Please sign in to comment.