Skip to content

Commit

Permalink
Merge pull request #20 from edsonportosilva/main
Browse files Browse the repository at this point in the history
Merge main update
  • Loading branch information
edsonportosilva authored Feb 20, 2024
2 parents 600af73 + 3442146 commit 4b81733
Show file tree
Hide file tree
Showing 24 changed files with 1,917 additions and 887 deletions.

Large diffs are not rendered by default.

84 changes: 42 additions & 42 deletions examples/.ipynb_checkpoints/basic_OOK_transmission-checkpoint.ipynb

Large diffs are not rendered by default.

111 changes: 75 additions & 36 deletions examples/.ipynb_checkpoints/test_clockRecovery-checkpoint.ipynb

Large diffs are not rendered by default.

386 changes: 285 additions & 101 deletions examples/.ipynb_checkpoints/test_metrics-checkpoint.ipynb

Large diffs are not rendered by default.

105 changes: 75 additions & 30 deletions examples/.ipynb_checkpoints/test_modulation-checkpoint.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/basic_EDFA.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
"version": "3.11.3"
},
"vscode": {
"interpreter": {
Expand Down
8 changes: 4 additions & 4 deletions examples/basic_IMDD_PAM_transmission.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"from commpy.utilities import upsample\n",
"from optic.models.devices import mzm, photodiode, edfa\n",
"from optic.models.channels import linearFiberChannel\n",
"from optic.comm.modulation import GrayMapping, modulateGray, demodulateGray\n",
"from optic.comm.modulation import grayMapping, modulateGray, demodulateGray\n",
"from optic.comm.metrics import theoryBER\n",
"from optic.dsp.core import pulseShape, lowPassFIR, pnorm, signal_power\n",
"\n",
Expand Down Expand Up @@ -432,7 +432,7 @@
"symbRx = pnorm(symbRx)\n",
"\n",
"# demodulate symbols to bits with minimum Euclidean distance \n",
"const = GrayMapping(M,'pam') # get PAM constellation\n",
"const = grayMapping(M,'pam') # get PAM constellation\n",
"Es = signal_power(const) # calculate the average energy per symbol of the PAM constellation\n",
"\n",
"bitsRx = demodulateGray(np.sqrt(Es)*symbRx, M, 'pam')\n",
Expand Down Expand Up @@ -520,7 +520,7 @@
"BER = np.zeros(powerValues.shape)\n",
"Pb = np.zeros(powerValues.shape)\n",
"\n",
"const = GrayMapping(M,'pam') # get PAM constellation\n",
"const = grayMapping(M,'pam') # get PAM constellation\n",
"Es = signal_power(const) # calculate the average energy per symbol of the PAM constellation\n",
" \n",
"discard = 100\n",
Expand Down Expand Up @@ -693,7 +693,7 @@
"BER = np.zeros(distance.shape)\n",
"Pb = np.zeros(distance.shape)\n",
"\n",
"const = GrayMapping(M,'pam') # get PAM constellation\n",
"const = grayMapping(M,'pam') # get PAM constellation\n",
"Es = signal_power(const) # calculate the average energy per symbol of the PAM constellation\n",
" \n",
"discard = 100\n",
Expand Down
8 changes: 4 additions & 4 deletions examples/basic_IMDD_PAM_transmission.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from commpy.utilities import upsample
from optic.models.devices import mzm, photodiode, edfa
from optic.models.channels import linearFiberChannel
from optic.comm.modulation import GrayMapping, modulateGray, demodulateGray
from optic.comm.modulation import grayMapping, modulateGray, demodulateGray
from optic.comm.metrics import theoryBER
from optic.dsp.core import pulseShape, lowPassFIR, pnorm, signal_power

Expand Down Expand Up @@ -199,7 +199,7 @@
symbRx = pnorm(symbRx)

# demodulate symbols to bits with minimum Euclidean distance
const = GrayMapping(M,'pam') # get PAM constellation
const = grayMapping(M,'pam') # get PAM constellation
Es = signal_power(const) # calculate the average energy per symbol of the PAM constellation

bitsRx = demodulateGray(np.sqrt(Es)*symbRx, M, 'pam')
Expand Down Expand Up @@ -255,7 +255,7 @@
BER = np.zeros(powerValues.shape)
Pb = np.zeros(powerValues.shape)

const = GrayMapping(M,'pam') # get PAM constellation
const = grayMapping(M,'pam') # get PAM constellation
Es = signal_power(const) # calculate the average energy per symbol of the PAM constellation

discard = 100
Expand Down Expand Up @@ -362,7 +362,7 @@
BER = np.zeros(distance.shape)
Pb = np.zeros(distance.shape)

const = GrayMapping(M,'pam') # get PAM constellation
const = grayMapping(M,'pam') # get PAM constellation
Es = signal_power(const) # calculate the average energy per symbol of the PAM constellation

discard = 100
Expand Down
4 changes: 2 additions & 2 deletions examples/basic_OOK_transmission.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"from commpy.utilities import upsample\n",
"from optic.models.devices import mzm, photodiode, edfa\n",
"from optic.models.channels import linearFiberChannel\n",
"from optic.comm.modulation import GrayMapping, modulateGray\n",
"from optic.comm.modulation import modulateGray\n",
"from optic.dsp.core import pulseShape, lowPassFIR, pnorm, signal_power\n",
"\n",
"try:\n",
Expand Down Expand Up @@ -638,7 +638,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
"version": "3.11.3"
},
"toc": {
"base_numbering": 1,
Expand Down
4 changes: 2 additions & 2 deletions examples/basic_OOK_transmission.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.15.1
# jupytext_version: 1.14.7
# kernelspec:
# display_name: Python 3 (ipykernel)
# language: python
Expand All @@ -28,7 +28,7 @@
from commpy.utilities import upsample
from optic.models.devices import mzm, photodiode, edfa
from optic.models.channels import linearFiberChannel
from optic.comm.modulation import GrayMapping, modulateGray
from optic.comm.modulation import modulateGray
from optic.dsp.core import pulseShape, lowPassFIR, pnorm, signal_power

try:
Expand Down
Loading

0 comments on commit 4b81733

Please sign in to comment.