Re: [BangPypers] array in python
Harshal, I don't think anybody in this mailing list has experience with GNU Radio. Have you tried asking in GNU Radio mailing lists? http://gnuradio.org/trac/wiki/MailingLists Anand On Thu, Oct 8, 2009 at 6:15 AM, harshal jadhav jadhav.hars...@gmail.com wrote: Hi Everybody, I am Harshal Jadhav, student at San Jose State University. I am using Python for my Master's project and i am a beginner. I am using python language for GNU Radio. For this i have a sampled signal. The signal is a sine wave. I have to trap each sample of this sine wave in an array. Is it possible to capture the samples of the sine wave in an array in python? Regards, Harshal Jadhav ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] array in python
On Thu, Oct 8, 2009 at 6:15 AM, harshal jadhav jadhav.hars...@gmail.comwrote: Hi Everybody, I am Harshal Jadhav, student at San Jose State University. I am using Python for my Master's project and i am a beginner. I am using python language for GNU Radio. For this i have a sampled signal. The signal is a sine wave. I have to trap each sample of this sine wave in an array. Is it possible to capture the samples of the sine wave in an array in python? Regards, Harshal Jadhav Please register at the site for further postings. I approved the posting even though you are a non-member. ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- --Anand ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] array in python
On Thu, Oct 8, 2009 at 6:15 AM, harshal jadhav jadhav.hars...@gmail.com wrote: Hi Everybody, I am Harshal Jadhav, student at San Jose State University. I am using Python for my Master's project and i am a beginner. I am using python language for GNU Radio. For this i have a sampled signal. The signal is a sine wave. I have to trap each sample of this sine wave in an array. Is it possible to capture the samples of the sine wave in an array in python? Python has list, tuples and dictionaries.. choose the most suitable datatype :) regards Vivek -- The hidden harmony is better than the obvious!! ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] array in python
If you want to actually capture and demodulate signals, you will need some sort of a RF frontend to get the data into the computer, and then process it using GNURadio. Otherwise, if you are just using simulated signals, it should be a fairly simple simple matter to store a sine wave in an array in Python. -Mandar ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] array in python
Vivek Khurana wrote: On Thu, Oct 8, 2009 at 6:15 AM, harshal jadhav jadhav.hars...@gmail.com wrote: Hi Everybody, I am Harshal Jadhav, student at San Jose State University. I am using Python for my Master's project and i am a beginner. I am using python language for GNU Radio. For this i have a sampled signal. The signal is a sine wave. I have to trap each sample of this sine wave in an array. Is it possible to capture the samples of the sine wave in an array in python? Python has list, tuples and dictionaries.. choose the most suitable datatype :) None of the above is suitable for signal processing in Python, for (1) speed of loading data into memory, (2) operating on it and (3) storing it efficiently in memory (since you tend to have a lot of it). I would use the 'array' type in the stdlib or better still, the array type in the NumPy package. The NumPy array has a much richer set of operators you can apply efficiently to a signal sample stream. Years ago I used it on a contract for on-the-fly 2-D image processing from a batch currency scanner (counterfeit detection) and it was able to do pretty complicated calculations and keep up. -Jeff ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] array in python
On Thu, Oct 8, 2009 at 6:15 AM, harshal jadhav jadhav.hars...@gmail.com wrote: I am using python language for GNU Radio. For this i have a sampled signal. The signal is a sine wave. I have to trap each sample of this sine wave in an array. Is it possible to capture the samples of the sine wave in an array in python? You can use lists, and there is an array module too. import array help(array) Help on built-in module array: NAME array FILE (built-in) DESCRIPTION This module defines an object type which can efficiently represent an array of basic values: characters, integers, floating point numbers. Arrays are sequence types and behave very much like lists, except that the type of objects stored in them is constrained. The type is specified at object creation time by using a type code, which is a single character. The following type codes are defined: Type code C Type Minimum size in bytes 'c' character 1 'b' signed integer 1 'B' unsigned integer 1 'u' Unicode character 2 'h' signed integer 2 'H' unsigned integer 2 'i' signed integer 2 'I' unsigned integer 2 'l' signed integer 4 'L' unsigned integer 4 'f' floating point 4 'd' floating point 8 The constructor is: array(typecode [, initializer]) -- create a new array ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] array in python
Jeff Rush wrote: None of the above is suitable for signal processing in Python, for (1) speed of loading data into memory, (2) operating on it and (3) storing it efficiently in memory (since you tend to have a lot of it). I would use the 'array' type in the stdlib or better still, the array type in the NumPy package. The NumPy array has a much richer set of operators you can apply efficiently to a signal sample stream. Years ago I used it on a contract for on-the-fly 2-D image processing from a batch currency scanner (counterfeit detection) and it was able to do pretty complicated calculations and keep up. -Jeff True, numpy rocks :), I've used it for speech processing myself with audiolab that Asokan mentioned and now i'm using it for 2d biomedical image processing ... Although I know nothing about GNUradio, I can tell you numpy rocks... :D ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers
Re: [BangPypers] array in python
Jeff Rush wrote: Vivek Khurana wrote: On Thu, Oct 8, 2009 at 6:15 AM, harshal jadhav jadhav.hars...@gmail.com wrote: Hi Everybody, I am Harshal Jadhav, student at San Jose State University. I am using Python for my Master's project and i am a beginner. I am using python language for GNU Radio. For this i have a sampled signal. The signal is a sine wave. I have to trap each sample of this sine wave in an array. Is it possible to capture the samples of the sine wave in an array in python? Python has list, tuples and dictionaries.. choose the most suitable datatype :) None of the above is suitable for signal processing in Python, for (1) speed of loading data into memory, (2) operating on it and (3) storing it efficiently in memory (since you tend to have a lot of it). I would use the 'array' type in the stdlib or better still, the array type in the NumPy package. The NumPy array has a much richer set of operators you can apply efficiently to a signal sample stream. Years ago I used it on a contract for on-the-fly 2-D image processing from a batch currency scanner (counterfeit detection) and it was able to do pretty complicated calculations and keep up. -Jeff ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers