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