Ejemplo n.º 1
0
P_ts = []
chirps = []
zs = [0.0, 2.0, 4.0]

for z in zs:
    system = System(Domain(bit_width=200.0, samples_per_bit=2048))
    system.add(Gaussian(peak_power=1.0, width=1.0))
    system.add(Fibre(length=z, beta=[0.0, 0.0, -1.0, 0.0]))
    system.run()

    field = system.fields['fibre']
    P_ts.append(temporal_power(field))

    temp = [f if abs(f) >= 5e-12 else 0.0 for f in field]
    chirps.append(chirp(temp, system.domain.window_nu))

multi_plot(system.domain.t,
           P_ts,
           zs,
           labels["t"],
           labels["P_t"], [r"$z = {0:.0f} \, km$"], (-10.0, 10.0),
           filename="3-1")

multi_plot(system.domain.t,
           chirps,
           zs,
           labels["t"],
           labels["chirp"], [r"$z = {0:.0f} \, km$"], (-10.0, 10.0),
           (-6.0, 6.0),
           filename="3-1_chirp")
Ejemplo n.º 2
0
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
"""

from pyofss import Domain, System, Gaussian
from pyofss import phase, chirp, double_plot, labels

system = System(Domain(bit_width=10.0))
t = system.domain.t
nu = system.domain.nu
window_nu = system.domain.window_nu

system.add(Gaussian(initial_phase=3.0, width=1.0))
system.run()

double_plot(t, phase(system.field), t, chirp(system.field, window_nu),
            labels["t"], labels["phi"], labels["t"], labels["chirp"],
            filename="1 - phase_offset")

system.clear(True)
system.add(Gaussian(offset_nu=0.5, width=1.0))
system.run()

double_plot(t, phase(system.field), t, chirp(system.field, window_nu),
            labels["t"], labels["phi"], labels["t"], labels["chirp"],
            filename="2 - frequency_offset")

system.clear(True)
system.add(Gaussian(width=1.0, C=0.5))
system.run()
Ejemplo n.º 3
0
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
"""

from pyofss import Domain, System, Gaussian, Fibre
from pyofss import temporal_power, chirp, multi_plot, labels

P_ts = []
chirps = []
zs = [0.0, 2.0, 4.0]

for z in zs:
    system = System(Domain(bit_width=200.0, samples_per_bit=2048))
    system.add(Gaussian(peak_power=1.0, width=1.0))
    system.add(Fibre(length=z, beta=[0.0, 0.0, -1.0, 0.0]))
    system.run()

    field = system.fields['fibre']
    P_ts.append(temporal_power(field))

    temp = [f if abs(f) >= 5e-12 else 0.0 for f in field]
    chirps.append(chirp(temp, system.domain.window_nu))

multi_plot(system.domain.t, P_ts, zs, labels["t"], labels["P_t"],
           [r"$z = {0:.0f} \, km$"], (90.0, 110.0), filename="3-1")

multi_plot(system.domain.t, chirps, zs,
           labels["t"], labels["chirp"], [r"$z = {0:.0f} \, km$"],
           (90.0, 110.0), (-6.0, 6.0), filename="3-1_chirp")
from pyofss import Domain, System, Gaussian
from pyofss import phase, chirp, double_plot, labels

system = System(Domain(bit_width=10.0))
t = system.domain.t
nu = system.domain.nu
window_nu = system.domain.window_nu

system.add(Gaussian(initial_phase=3.0, width=1.0))
system.run()

double_plot(t,
            phase(system.field),
            t,
            chirp(system.field, window_nu),
            labels["t"],
            labels["phi"],
            labels["t"],
            labels["chirp"],
            filename="1 - phase_offset")

system.clear(True)
system.add(Gaussian(offset_nu=0.5, width=1.0))
system.run()

double_plot(t,
            phase(system.field),
            t,
            chirp(system.field, window_nu),
            labels["t"],