discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Gr Complex in Python in Gnu Radio


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] Gr Complex in Python in Gnu Radio
Date: Sat, 30 Apr 2016 08:41:27 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

Hi Przemek,

I must admit I'm not able to reproduce the issue –
>>> from gnuradio import analog
>>> analog.sig_source_c(1,analog.GR_SIN_WAVE, 0.1,1,1)
<gr_block sig_source_c (0)>

works just fine,  and the literal 1 is definitively an int. What does
print type(offset_Value) 
say in your code?

I guess you might want to use a complex offset? Python's built-in complex type works:
analog.sig_source_c(1,analog.GR_SIN_WAVE, 0.1,1, 0.5+0.75j)

Best regards,
Marcus
On 29.04.2016 22:53, Przemek Lewandowski wrote:
Hello :)

I would like to set offset to signal source component in construktor;
BUT I dont know which type is it in Python ??

signal_source = analog.sig_source_c(sampleRate, analog.GR_SAW_WAVE, frequencyCounted, 1/float(rowCounter), offset_Value)

offset_Value - when it is text it is bad
offset_Value - when it is int it is bad

so how to initialize offset in complex signal source in python ??

Greeting :)



_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


reply via email to

[Prev in Thread] Current Thread [Next in Thread]