add training data, y-pol phase shifted by 90 deg
This commit is contained in:
3
data/20241211-100154-128-16384-1-0-0-0-0-PAM4-0-0.ini
Normal file
3
data/20241211-100154-128-16384-1-0-0-0-0-PAM4-0-0.ini
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f86feab7455c42e0234090b5b3461341b2a3637414356863b92443e8970692a4
|
||||
size 599
|
||||
3
data/npys/5d775c0087b5389f79ff09112a5da948.npy
Normal file
3
data/npys/5d775c0087b5389f79ff09112a5da948.npy
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4c39a10ad5ff46d977afbf84c5c6ecce4c7c0f8e37faf00c1a3b7a264f01b1cd
|
||||
size 134217856
|
||||
@@ -148,11 +148,16 @@ class pam_generator:
|
||||
|
||||
E_y = E_y[self.glova.sps // 2 + len(wavelet) // 2 - 1 : -len(wavelet) // 2]
|
||||
|
||||
|
||||
E[0]["E"][1] = np.sqrt(np.multiply(np.square(E[0]["E"][1]), E_y))
|
||||
|
||||
# rotate the signal on the y-polarisation by 90°
|
||||
E[0]["E"][1] *= 1j
|
||||
else:
|
||||
E[0]["E"][1] = np.zeros_like(E[0]["E"][0], dtype=E[0]["E"][0].dtype)
|
||||
return E
|
||||
|
||||
|
||||
def generate_digital_signal(self, symbols, max_jitter=0):
|
||||
rs = np.random.RandomState(self.seed)
|
||||
signal = np.zeros(self.glova.nos * self.glova.sps)
|
||||
@@ -427,9 +432,9 @@ def single_run_with_plot(config, save=True):
|
||||
if save:
|
||||
save_data(cdata, config)
|
||||
|
||||
in_out_eyes(cfiber, cdata)
|
||||
in_out_eyes(cfiber, cdata, show_pols=False)
|
||||
|
||||
def in_out_eyes(cfiber, cdata):
|
||||
def in_out_eyes(cfiber, cdata, show_pols=False):
|
||||
fig, axs = plt.subplots(2, 2, sharex=True, sharey=True)
|
||||
eye_head = min(cfiber.glova.nos, 2000)
|
||||
symbolrate_scale = 1e12
|
||||
@@ -442,7 +447,29 @@ def in_out_eyes(cfiber, cdata):
|
||||
head=eye_head,
|
||||
ax=axs[0][0],
|
||||
show=False,
|
||||
color="C0",
|
||||
)
|
||||
if show_pols:
|
||||
plot_eye_diagram(
|
||||
amplitude_scale * np.abs(cdata.E_in[0].real) ** 2,
|
||||
2 * cfiber.glova.sps,
|
||||
normalize=False,
|
||||
samplerate=cfiber.glova.symbolrate * cfiber.glova.sps / symbolrate_scale,
|
||||
head=eye_head,
|
||||
ax=axs[0][0],
|
||||
color="C2",
|
||||
show=False,
|
||||
)
|
||||
plot_eye_diagram(
|
||||
amplitude_scale * np.abs(cdata.E_in[0].imag) ** 2,
|
||||
2 * cfiber.glova.sps,
|
||||
normalize=False,
|
||||
samplerate=cfiber.glova.symbolrate * cfiber.glova.sps / symbolrate_scale,
|
||||
head=eye_head,
|
||||
ax=axs[0][0],
|
||||
color="C3",
|
||||
show=False,
|
||||
)
|
||||
plot_eye_diagram(
|
||||
amplitude_scale * np.abs(cdata.E_out[0]) ** 2,
|
||||
2 * cfiber.glova.sps,
|
||||
@@ -453,6 +480,27 @@ def in_out_eyes(cfiber, cdata):
|
||||
color="C1",
|
||||
show=False,
|
||||
)
|
||||
if show_pols:
|
||||
plot_eye_diagram(
|
||||
amplitude_scale * np.abs(cdata.E_out[0].real) ** 2,
|
||||
2 * cfiber.glova.sps,
|
||||
normalize=False,
|
||||
samplerate=cfiber.glova.symbolrate * cfiber.glova.sps / symbolrate_scale,
|
||||
head=eye_head,
|
||||
ax=axs[0][1],
|
||||
color="C4",
|
||||
show=False,
|
||||
)
|
||||
plot_eye_diagram(
|
||||
amplitude_scale * np.abs(cdata.E_out[0].imag) ** 2,
|
||||
2 * cfiber.glova.sps,
|
||||
normalize=False,
|
||||
samplerate=cfiber.glova.symbolrate * cfiber.glova.sps / symbolrate_scale,
|
||||
head=eye_head,
|
||||
ax=axs[0][1],
|
||||
color="C5",
|
||||
show=False,
|
||||
)
|
||||
plot_eye_diagram(
|
||||
amplitude_scale * np.abs(cdata.E_in[1]) ** 2,
|
||||
2 * cfiber.glova.sps,
|
||||
@@ -460,8 +508,30 @@ def in_out_eyes(cfiber, cdata):
|
||||
samplerate=cfiber.glova.symbolrate * cfiber.glova.sps / symbolrate_scale,
|
||||
head=eye_head,
|
||||
ax=axs[1][0],
|
||||
color="C0",
|
||||
show=False,
|
||||
)
|
||||
if show_pols:
|
||||
plot_eye_diagram(
|
||||
amplitude_scale * np.abs(cdata.E_in[1].real) ** 2,
|
||||
2 * cfiber.glova.sps,
|
||||
normalize=False,
|
||||
samplerate=cfiber.glova.symbolrate * cfiber.glova.sps / symbolrate_scale,
|
||||
head=eye_head,
|
||||
ax=axs[1][0],
|
||||
color="C2",
|
||||
show=False,
|
||||
)
|
||||
plot_eye_diagram(
|
||||
amplitude_scale * np.abs(cdata.E_in[1].imag) ** 2,
|
||||
2 * cfiber.glova.sps,
|
||||
normalize=False,
|
||||
samplerate=cfiber.glova.symbolrate * cfiber.glova.sps / symbolrate_scale,
|
||||
head=eye_head,
|
||||
ax=axs[1][0],
|
||||
color="C3",
|
||||
show=False,
|
||||
)
|
||||
plot_eye_diagram(
|
||||
amplitude_scale * np.abs(cdata.E_out[1]) ** 2,
|
||||
2 * cfiber.glova.sps,
|
||||
@@ -472,6 +542,27 @@ def in_out_eyes(cfiber, cdata):
|
||||
color="C1",
|
||||
show=False,
|
||||
)
|
||||
if show_pols:
|
||||
plot_eye_diagram(
|
||||
amplitude_scale * np.abs(cdata.E_out[1].real) ** 2,
|
||||
2 * cfiber.glova.sps,
|
||||
normalize=False,
|
||||
samplerate=cfiber.glova.symbolrate * cfiber.glova.sps / symbolrate_scale,
|
||||
head=eye_head,
|
||||
ax=axs[0][1],
|
||||
color="C4",
|
||||
show=False,
|
||||
)
|
||||
plot_eye_diagram(
|
||||
amplitude_scale * np.abs(cdata.E_out[1].imag) ** 2,
|
||||
2 * cfiber.glova.sps,
|
||||
normalize=False,
|
||||
samplerate=cfiber.glova.symbolrate * cfiber.glova.sps / symbolrate_scale,
|
||||
head=eye_head,
|
||||
ax=axs[0][1],
|
||||
color="C5",
|
||||
show=False,
|
||||
)
|
||||
|
||||
title_map = [
|
||||
["Input x", "Output x"],
|
||||
@@ -528,8 +619,8 @@ if __name__ == "__main__":
|
||||
lengths = [*lengths, *lengths]
|
||||
lengths = sorted(lengths)
|
||||
|
||||
length_loop(config, lengths, incremental=False, bireflength=None, save=True)
|
||||
# length_loop(config, lengths, incremental=False, bireflength=None, save=True)
|
||||
# birefringence is constant over coupling length -> several 100m -> bireflength=1000 (m)
|
||||
|
||||
# single_run_with_plot(config, save=False)
|
||||
single_run_with_plot(config, save=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user