A library designed to generate and visualize eye diagrams for digital communication signals.
Project description
plot_diagram_eye
plot_diagram_eye is a Python library designed to generate and visualize eye diagrams for digital communication signals. The library provides functions to create various types of filters, generate signals, and plot eye diagrams to analyze the quality of the signal transmission.
It mainly comes with three functions. get_filter() , get_signal(), drawFullEyeDiagram()
get_filter(name,T,rolloff= None):
Generate a filter function.
Parameters:
name (str): The type of filter to generate ('rect', 'rc', 'rrc').
T (float): Symbol period.
rolloff (float, optional): Roll-off factor for 'rc' and 'rrc' filters.
Returns:
function: A function representing the specified filter.
Available Filters:
- 'rect': Rectangular filter.
- 'rc': Raised cosine filter.
- 'rrc': Root raised cosine filter.
get_signal(data,g,T,Fs):
Generate a signal by convolving the data with the provided filter.
Parameters:
data (array-like): Input binary data stream.
g (function): Filter function.
T(int): Symbol period.
Fs(int): Sampling frequency.
Returns:
tuple:
t (numpy.ndarray): Time vector.
x (numpy.ndarray): Generated signal.
def drawFullEyeDiagram(x,T,Fs):
Generate and plot the eye diagram of the signal.
Parameters:
x (numpy.ndarray): Input signal.
T(int): Symbol period.
Fs(int): Sampling frequency.
Returns:
None. The function plots the eye diagram.
Features
- Generate Rectangular, Raised Cosine, and Root Raised Cosine filters.
- Convolve input binary data streams with specified filters to create modulated signals.
- Visualize eye diagrams for analyzing signal integrity and performance.
Sample usage:
import plot_diagram_eye as eye import numpy as np Fs=10 T=1 N=10 b=np.random.randint(0,2,N) data=2b-1 t=np.arange(-3T,3*T,1/Fs) g=eye.get_filter('rc',T,rolloff=0.2) t,x=eye.get_signal(data,g,T,Fs) eye.drawFullEyeDiagram(x,T,Fs)
Installation
You can install plot_diagram_eye via pip:
pip install plot-diagram-eye
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file plot_diagram_eye-0.1.0.tar.gz.
File metadata
- Download URL: plot_diagram_eye-0.1.0.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1ea46757507c11a9b1f5ac097cd8adb9cd141ce9377e9f40f5f221212a3652e
|
|
| MD5 |
f5f3820adbace94d66b6b33f51ccf03a
|
|
| BLAKE2b-256 |
d008de6fbe87c1446302c748b7f67e7cc837b3e830e252250ed518d106f60c18
|
File details
Details for the file plot_diagram_eye-0.1.0-py3-none-any.whl.
File metadata
- Download URL: plot_diagram_eye-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84ef1fc4f6fbc46da959819bf15c2b08b8e7faa1d9ed4ed8b558663bf33293b0
|
|
| MD5 |
83ad96720ed480ec7559e22d9c382a7b
|
|
| BLAKE2b-256 |
b4ad04f413fa82daa43923fa787bacfa6473074bebc0de035dd178bbe878c7e9
|