Skip to content

Commit

Permalink
Criação do projeto.
Browse files Browse the repository at this point in the history
  • Loading branch information
acwoss committed Jan 10, 2014
0 parents commit 432c8d1
Show file tree
Hide file tree
Showing 9 changed files with 879 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
215 changes: 215 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
#################
## Eclipse
#################

*.pydevproject
.project
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# CDT-specific
.cproject

# PDT-specific
.buildpath


#################
## Visual Studio
#################

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.sln.docstates

# Build results

[Dd]ebug/
[Rr]elease/
x64/
build/
[Bb]in/
[Oo]bj/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.log
*.scc

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
*.ncrunch*
.*crunch*.local.xml

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.Publish.xml
*.pubxml

# NuGet Packages Directory
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
#packages/

# Windows Azure Build Output
csx
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.[Pp]ublish.xml
*.pfx
*.publishsettings

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
App_Data/*.mdf
App_Data/*.ldf

#############
## Windows detritus
#############

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Mac crap
.DS_Store


#############
## Python
#############

*.py[co]

# Packages
*.egg
*.egg-info
dist/
build/
eggs/
parts/
var/
sdist/
develop-eggs/
.installed.cfg

# Installer logs
pip-log.txt

# Unit test / coverage reports
.coverage
.tox

#Translations
*.mo

#Mr Developer
.mr.developer.cfg
43 changes: 43 additions & 0 deletions 16qam.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import sys
from qam import Qam
from matplotlib import pyplot as plt

if len(sys.argv) != 3:
print "Usage: %s <data-bits> <data-bits>" % sys.argv[0]
exit(1)

modulation = {
'0000' : (1.4142, 135.0000),
'0001' : (1.1180, 116.5650),
'0010' : (1.4142, 45.0000),
'0011' : (1.1180, 63.4350),
'0100' : (1.4142, 225.0000),
'0101' : (1.1180, 243.4350),
'0110' : (1.4142, 315.0000),
'0111' : (1.1180, 296.5650),
'1000' : (1.1180, 153.4350),
'1001' : (0.7071, 135.0000),
'1010' : (1.1180, 26.5650),
'1011' : (0.7071, 45.0000),
'1100' : (1.1180, 206.5650),
'1101' : (0.7071, 225.0000),
'1110' : (1.1180, 333.4350),
'1111' : (0.7071, 315.0000),
}

q1 = Qam(baud_rate = 10,
bits_per_baud = 4,
carrier_freq = 10e3,
modulation = modulation)

q2 = Qam(baud_rate = 10,
bits_per_baud = 4,
carrier_freq = 9.9e3,
modulation = modulation)

s = q1.generate_signal(sys.argv[1]) + q2.generate_signal(sys.argv[2])

plt.figure(1)
#q.plot_constellation()
plt.figure(2)
s.plot(dB=False, phase=False, stem=False, frange=(0,12e3))
23 changes: 23 additions & 0 deletions 2psk.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import sys
from qam import Qam
from matplotlib import pyplot as plt

if len(sys.argv) != 2:
print "Usage: %s <data-bits>" % sys.argv[0]
exit(1)

modulation = {
'0' : (1,0),
'1' : (1,180),
}

q = Qam(baud_rate = 10,
bits_per_baud = 1,
carrier_freq = 50,
modulation = modulation)
s = q.generate_signal(sys.argv[1])

plt.figure(1)
q.plot_constellation()
plt.figure(2)
s.plot(dB=False, phase=False, stem=False, frange=(0,500))
26 changes: 26 additions & 0 deletions 4psk.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import sys
from qam import Qam
from matplotlib import pyplot as plt

if len(sys.argv) != 2:
print "Usage: %s <data-bits>" % sys.argv[0]
exit(1)

modulation = {
'00' : (1, 0),
'01' : (1, 90),
'10' : (1, 180),
'11' : (1, 270),
}

q = Qam(baud_rate = 10,
bits_per_baud = 2,
carrier_freq = 50,
modulation = modulation)

s = q.generate_signal(sys.argv[1])

plt.figure(1)
q.plot_constellation()
plt.figure(2)
s.plot(dB=False, phase=False, stem=False, frange=(0,500))
30 changes: 30 additions & 0 deletions 8qam.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import sys
from qam import Qam
from matplotlib import pyplot as plt

if len(sys.argv) != 2:
print "Usage: %s <data-bits>" % sys.argv[0]
exit(1)

modulation = {
'000' : (0.5, 0),
'001' : (0.5, 90),
'010' : (0.5, 180),
'011' : (0.5, 270),
'100' : (1.0, 0),
'101' : (1.0, 90),
'110' : (1.0, 180),
'111' : (1.0, 270),
}

q = Qam(baud_rate = 10,
bits_per_baud = 3,
carrier_freq = 50,
modulation = modulation)

s = q.generate_signal(sys.argv[1])

plt.figure(1)
q.plot_constellation()
plt.figure(2)
s.plot(dB=False, phase=False, stem=False, frange=(0,500))
23 changes: 23 additions & 0 deletions ook.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import sys
from qam import Qam
from matplotlib import pyplot as plt

if len(sys.argv) != 2:
print "Usage: %s <data-bits>" % sys.argv[0]
exit(1)

modulation = {
'0' : (0,0),
'1' : (1,0),
}
q = Qam(baud_rate = 10,
bits_per_baud = 1,
carrier_freq = 50,
modulation = modulation)

s = q.generate_signal(sys.argv[1])

plt.figure(1)
q.plot_constellation()
plt.figure(2)
s.plot(dB=False, phase=False, stem=False, frange=(0,500))
Loading

0 comments on commit 432c8d1

Please sign in to comment.