fine-tune agc
This commit is contained in:
parent
b242f09d5d
commit
aeca8265c3
@ -1,17 +1,20 @@
|
||||
from csdr.chain import Chain
|
||||
from csdr.chain.demodulator import Demodulator
|
||||
from pycsdr.modules import AmDemod, DcBlock, Agc, Convert
|
||||
from pycsdr.types import Format
|
||||
from pycsdr.types import Format, AgcProfile
|
||||
|
||||
|
||||
class Am(Demodulator):
|
||||
def __init__(self):
|
||||
agc = Agc(Format.FLOAT)
|
||||
agc.setProfile(AgcProfile.SLOW)
|
||||
agc.setInitialGain(200)
|
||||
workers = [
|
||||
AmDemod(),
|
||||
DcBlock(),
|
||||
# empty chain as placeholder for the "last decimation"
|
||||
Chain(),
|
||||
Agc(Format.FLOAT),
|
||||
agc,
|
||||
Convert(Format.FLOAT, Format.SHORT),
|
||||
]
|
||||
|
||||
|
@ -1,17 +1,20 @@
|
||||
from csdr.chain.demodulator import Demodulator, Chain
|
||||
from pycsdr.modules import FmDemod, Limit, NfmDeemphasis, Agc, Convert
|
||||
from pycsdr.types import Format
|
||||
from pycsdr.types import Format, AgcProfile
|
||||
|
||||
|
||||
class Fm(Demodulator):
|
||||
def __init__(self, sampleRate: int):
|
||||
agc = Agc(Format.FLOAT)
|
||||
agc.setProfile(AgcProfile.SLOW)
|
||||
agc.setMaxGain(3)
|
||||
workers = [
|
||||
FmDemod(),
|
||||
Limit(),
|
||||
# empty chain as placeholder for the "last decimation"
|
||||
Chain(),
|
||||
NfmDeemphasis(sampleRate),
|
||||
Agc(Format.FLOAT),
|
||||
agc,
|
||||
Convert(Format.FLOAT, Format.SHORT),
|
||||
]
|
||||
super().__init__(*workers)
|
||||
|
Loading…
Reference in New Issue
Block a user