Skip to content

Commit

Permalink
Finished toml figuration files for all pyphot components
Browse files Browse the repository at this point in the history
  • Loading branch information
chunyu-li committed Feb 16, 2023
1 parent 9cecd56 commit dc8481b
Show file tree
Hide file tree
Showing 19 changed files with 372 additions and 94 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ python3 example.py

## TOML 配置文件

目前已给出发射端的 TOML 配置文件,以供计算引擎调用,都位于该 [目录](toml/dev)。发射端的调用顺序为:
目前已给出发射端的 TOML 配置文件,以供计算引擎调用,都位于 [toml](toml/) 目录下。发射端的调用顺序为:

```
gen_bits() -> qam_modulate() -> PulseShaper() -> PulseShaper.tx_shape() -> dac_noise() -> phase_noise() -> gaussian_noise()
Expand Down
1 change: 1 addition & 0 deletions phot/components/frame_syncer.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def sync_frame(signal_x, signal_y, prev_signal_x, prev_signal_y, up_sampling_fac
start_index_x_1 = fine_synchronize(
signal_x[0 : 10000 * up_sampling_factor : up_sampling_factor].T, prev_signal_x[0:4000].T
)

start_index_y_1 = fine_synchronize(
signal_y[0 : 10000 * up_sampling_factor : up_sampling_factor].T, prev_signal_y[0:4000].T
)
Expand Down
File renamed without changes.
72 changes: 72 additions & 0 deletions toml/adaptive_equalize.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
[adaptive_equalize]

is_class = false
frontend_name = "Adaptive equalize"
description = "自适应均衡"
is_analyzer = false

[adaptive_equalize.parameters]

[adaptive_equalize.parameters.num_tap]
frontend_name = "Number of tap"
data_type = "int"
value = "25"
unit = ""
unit_type = ""

[adaptive_equalize.parameters.cma_convergence]
frontend_name = "CMA convergence"
data_type = "int"
value = "30000"
unit = ""
unit_type = ""

[adaptive_equalize.parameters.ref_power_cma]
frontend_name = "reference power of CMA"
data_type = "int"
value = "2"
unit = ""
unit_type = ""

[adaptive_equalize.parameters.step_size_cma]
frontend_name = "step size of CMA"
data_type = "float"
value = "0.000000001"
unit = ""
unit_type = ""

[adaptive_equalize.parameters.step_size_rde]
frontend_name = "step size of RDE"
data_type = "float"
value = "0.000000001"
unit = ""
unit_type = ""

[adaptive_equalize.parameters.up_sampling_factor]
frontend_name = "up sampling factor"
data_type = "int"
value = "2"
unit = ""
unit_type = ""

[adaptive_equalize.parameters.bits_per_symbol]
frontend_name = "bits per symbol"
data_type = "int"
value = "6"
unit = ""
unit_type = ""

[adaptive_equalize.parameters.total_baud]
frontend_name = "total baud rate"
data_type = "int"
value = "20000000000"
unit = ""
unit_type = ""

[adaptive_equalize.input]
signal_x = "Input signal x"
signal_y = "Input signal y"

[adaptive_equalize.output]
signal_x = "Output signal x"
signal_y = "Output signal y"
37 changes: 37 additions & 0 deletions toml/add_dac_noise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[add_adc_noise]

is_class = false
frontend_name = "Add ADC noise"
description = "Add ADC noise to signal"
is_analyzer = false

[add_adc_noise.parameters]

[add_adc_noise.parameters.sampling_rate]
frontend_name = "Sampling rate"
data_type = "int"
value = "1024000000000"
unit = "hz"
unit_type = "frequency"

[add_adc_noise.parameters.adc_sample_rate]
frontend_name = "Frequency offset"
data_type = "int"
value = "160000000000"
unit = "hz"
unit_type = "frequency"

[add_adc_noise.parameters.adc_resolution_bits]
frontend_name = "Frequency offset"
data_type = "int"
value = "8"
unit = ""
unit_type = ""

[add_adc_noise.input]
signal_x = "Input signal x"
signal_y = "Input signal y"

[add_adc_noise.output]
signal_x = "Output signal x"
signal_y = "Output signal y"
30 changes: 30 additions & 0 deletions toml/add_freq_offset.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[add_freq_offset]

is_class = false
frontend_name = "Add frequency offset"
description = "Add frequency offset to signal"
is_analyzer = false

[add_freq_offset.parameters]

[add_freq_offset.parameters.frequency_offset]
frontend_name = "Frequency offset"
data_type = "float"
value = "2000000000"
unit = ""
unit_type = ""

[add_freq_offset.parameters.sampling_rate]
frontend_name = "Sampling rate"
data_type = "float"
value = "1024000000000"
unit = "hz"
unit_type = "frequency"

[add_freq_offset.input]
signal_x = "Input signal x"
signal_y = "Input signal y"

[add_freq_offset.output]
signal_x = "Output signal x"
signal_y = "Output signal y"
15 changes: 15 additions & 0 deletions toml/add_iq_imbalance.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[add_iq_imbalance]

is_class = false
frontend_name = "Add frequency IQ imbalance"
description = "Add frequency IQ imbalance to signal"
is_analyzer = false


[add_iq_imbalance.input]
signal_x = "Input signal x"
signal_y = "Input signal y"

[add_iq_imbalance.output]
signal_x = "Output signal x"
signal_y = "Output signal y"
29 changes: 29 additions & 0 deletions toml/bits_error_count.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[bits_error_count]

is_class = false
frontend_name = "Bits error counter"
description = "Count bits error for signal"
is_analyzer = true

[bits_error_count.parameters]

[bits_error_count.parameters.bits_per_symbol]
frontend_name = "bits per symbol"
data_type = "int"
value = "6"
unit = ""
unit_type = ""

[bits_error_count.input]
signal_x = "Input signal x"
signal_y = "Input signal y"

prev_symbols_x = "Previous input symbols x"
prev_symbols_y = "Previous input symbols y"

[bits_error_count.output]
signal_x = "Output signal x"
signal_y = "Output signal y"

prev_symbols_x = "Previous output symbols x"
prev_symbols_y = "Previous output symbols y"
37 changes: 37 additions & 0 deletions toml/bps_restore.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[bps_restore]

is_class = false
frontend_name = "BPS restore"
description = "BPS restore"
is_analyzer = false

[bps_restore.parameters]

[bps_restore.parameters.num_test_angle]
frontend_name = "number of test angles"
data_type = "int"
value = "64"
unit = ""
unit_type = ""

[bps_restore.parameters.block_size]
frontend_name = "block size"
data_type = "int"
value = "100"
unit = ""
unit_type = ""

[bps_restore.parameters.bits_per_symbol]
frontend_name = "bits per symbol"
data_type = "int"
value = "6"
unit = ""
unit_type = ""

[bps_restore.input]
signal_x = "Input signal x"
signal_y = "Input signal y"

[bps_restore.output]
signal_x = "Output signal x"
signal_y = "Output signal y"
File renamed without changes.
File renamed without changes.
File renamed without changes.
47 changes: 47 additions & 0 deletions toml/iq_freq_offset_and_compensation.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[iq_freq_offset_and_compensation]

is_class = false
frontend_name = "IQ frequency offset and compensation"
description = "IQ frequency offset and compensation for signal"
is_analyzer = false

[iq_freq_offset_and_compensation.parameters]

[iq_freq_offset_and_compensation.parameters.sampling_rate]
frontend_name = "Sampling rate"
data_type = "float"
value = "1024000000000"
unit = "hz"
unit_type = "frequency"

[iq_freq_offset_and_compensation.parameters.beta2]
frontend_name = "beta2"
data_type = "float"
value = "0.0000000000000000000000216676"
unit = ""
unit_type = ""

[iq_freq_offset_and_compensation.parameters.span]
frontend_name = "Simulation span"
data_type = "int"
value = "5"
unit = ""
unit_type = ""

[iq_freq_offset_and_compensation.parameters.L]
frontend_name = "Length"
data_type = "int"
value = "75"
unit = "km"
unit_type = "length"

[iq_freq_offset_and_compensation.input]
signal_x = "Input signal x"
signal_y = "Input signal y"

power_x = "Input power x"
power_y = "Input power y"

[iq_freq_offset_and_compensation.output]
signal_x = "Output signal x"
signal_y = "Output signal y"
74 changes: 74 additions & 0 deletions toml/optical_fiber_channel.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
[optical_fiber_channel]

is_class = false
frontend_name = "Optical fiber"
description = "Single core single mode dual polarization fiber"
is_analyzer = false

[optical_fiber_channel.parameters]

[optical_fiber_channel.parameters.sampling_rate]
frontend_name = "Sampling rate"
data_type = "float"
value = "1024000000000"
unit = "hz"
unit_type = "frequency"

[optical_fiber_channel.parameters.span]
frontend_name = "Simulation span"
data_type = "int"
value = "5"
unit = ""
unit_type = ""

[optical_fiber_channel.parameters.num_steps]
frontend_name = "Number of step per length"
data_type = "int"
value = "75"
unit = ""
unit_type = ""

[optical_fiber_channel.parameters.beta2]
frontend_name = "beta2"
data_type = "float"
value = "0.0000000000000000000000216676"
unit = ""
unit_type = ""

[optical_fiber_channel.parameters.delta_z]
frontend_name = "Length per step"
data_type = "float"
value = "1"
unit = ""
unit_type = ""

[optical_fiber_channel.parameters.gamma]
frontend_name = "gamma"
data_type = "float"
value = "1.3"
unit = ""
unit_type = ""

[optical_fiber_channel.parameters.alpha]
frontend_name = "alpha"
data_type = "float"
value = "0.2"
unit = ""
unit_type = ""

[optical_fiber_channel.parameters.L]
frontend_name = "Length"
data_type = "int"
value = "75"
unit = "km"
unit_type = "length"

[optical_fiber_channel.input]
tx_signal_x = "Transmitting terminal(TX modules) signal x"
tx_signal_y = "Transmitting terminal(TX modules) signal y"

[optical_fiber_channel.output]
signal_x = "Output signal x"
signal_y = "Output signal y"
power_x = "Output power x"
power_y = "Output power y"
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit dc8481b

Please sign in to comment.