Example #1
0
storage = system['fibre'].stepper.storage
(x, y, z) = storage.get_plot_data(reduced_range=(40.0, 60.0))

map_plot(x,
         y,
         z,
         labels["t"],
         labels["P_t"],
         labels["z"],
         filename="5-16d_map")

waterfall_plot(x,
               y,
               z,
               labels["t"],
               labels["z"],
               labels["P_t"],
               filename="5-16d_waterfall",
               y_range=(0.0, 1.8))

if (len(sys.argv) > 1) and (sys.argv[1] == 'animate'):
    animated_plot(x,
                  y,
                  z,
                  labels["t"],
                  labels["P_t"],
                  r"$z = {0:7.3f} \, km$", (x[0], x[-1]), (0.0, 1.8),
                  fps=20,
                  frame_prefix="d_",
                  filename="5-16d_animation.avi")
Example #2
0
                 raman_scattering=True, rs_factor=T_R,
                 total_steps=200, traces=200, method='ARK4IP'))
system.run()

storage = system['fibre'].stepper.storage
(x, y, z) = storage.get_plot_data(False, (191.1, 195.1), normalised=True)

map_plot(x, y, z, labels["nu"], labels["P_nu"], labels["z"],
         filename="4-23_map_nu")

waterfall_plot(x, y, z, labels["nu"], labels["z"], labels["P_nu"],
               filename="4-23_waterfall_nu", y_range=(0.0, 1.1))

if (len(sys.argv) > 1) and (sys.argv[1] == 'animate'):
    animated_plot(x, y, z, labels["nu"], labels["P_nu"],
                  r"$z = {0:7.3f} \, km$", (x[0], x[-1]), (0.0, 1.1), fps=20,
                  frame_prefix="nu_", filename="4-23_animation_nu.avi")

(x, y, z) = storage.get_plot_data(reduced_range=(5.0, 45.0))

map_plot(x, y, z, labels["t"], labels["P_t"], labels["z"],
         filename="4-23_map_t")

waterfall_plot(x, y, z, labels["t"], labels["z"], labels["P_t"],
               filename="4-23_waterfall_t", y_range=(0.0, 3.5))

if (len(sys.argv) > 1) and (sys.argv[1] == 'animate'):
    animated_plot(x, y, z, labels["t"], labels["P_t"], r"$z = {0:7.3f} \, km$",
                  (x[0], x[-1]), (0.0, 3.5), fps=20, frame_prefix="t_",
                  filename="4-23_animation_t.avi")
Example #3
0
waterfall_plot(x,
               y,
               z,
               labels["nu"],
               labels["z"],
               labels["P_nu"],
               filename="4-9_waterfall_nu",
               y_range=(0.0, 1.9))

if (len(sys.argv) > 1) and (sys.argv[1] == 'animate'):
    animated_plot(x,
                  y,
                  z,
                  labels["nu"],
                  labels["P_nu"],
                  r"$z = {0:7.3f} \, km$", (x[0], x[-1]), (0.0, 1.9),
                  fps=10,
                  frame_prefix="nu_",
                  filename="4-9_animation_nu.avi")

(x, y, z) = storage.get_plot_data(reduced_range=(90.0, 110.0))

map_plot(x,
         y,
         z,
         labels["t"],
         labels["P_t"],
         labels["z"],
         filename="4-9_map_t")
Example #4
0
import numpy as np
from pyofss import Domain, System, Sech, Fibre
from pyofss import map_plot, waterfall_plot, animated_plot, labels

system = System(Domain(bit_width=100.0, samples_per_bit=2048))

absolute_separation = 3.5
offset = absolute_separation / system.domain.bit_width

system.add(Sech(peak_power=1.0, width=1.0, position=0.5 - offset))
system.add(Sech(peak_power=1.0, width=1.0, position=0.5 + offset,
                initial_phase=np.pi / 4.0))

system.add(Fibre(length=90.0, beta=[0.0, 0.0, -1.0, 0.0], gamma=1.0,
                 total_steps=200, traces=100, method='ARK4IP'))
system.run()

storage = system['fibre'].stepper.storage
(x, y, z) = storage.get_plot_data(reduced_range=(40.0, 60.0))

map_plot(x, y, z, labels["t"], labels["P_t"], labels["z"],
         filename="5-16b_map")

waterfall_plot(x, y, z, labels["t"], labels["z"], labels["P_t"],
               filename="5-16b_waterfall", y_range=(0.0, 1.4))

if (len(sys.argv) > 1) and (sys.argv[1] == 'animate'):
    animated_plot(x, y, z, labels["t"], labels["P_t"], r"$z = {0:7.3f} \, km$",
                  (x[0], x[-1]), (0.0, 1.4), fps=20, frame_prefix="b_",
                  filename="5-16b_animation.avi")
Example #5
0
system.run()

storage = system['fibre'].stepper.storage
(x, y, z_temp) = storage.get_plot_data(channel=0)
z_label = r"Fibre length, $z \, (m)$"
z = z_temp * 1.0e3

map_plot(x, y, z, labels["t"], labels["P_t"], z_label,
         filename="7-9_map_t_pump")

waterfall_plot(x, y, z, labels["t"], z_label, labels["P_t"],
               filename="7-9_waterfall_t_pump", y_range=(0.0, 1.0e3))

if (len(sys.argv) > 1) and (sys.argv[1] == 'animate'):
    animated_plot(x, y, z, labels["t"], labels["P_t"], r"$z = {0:7.3f} \, m$",
                  (x[0], x[-1]), (0.0, 1.0e3), fps=20, frame_prefix="pump_",
                  filename="7-9_animation_t_pump.avi")

(x, y, z_temp) = storage.get_plot_data(True, (-4.0, 4.0), False, channel=1)
z = z_temp * 1.0e3

map_plot(x, y, z, labels["t"], labels["P_t"], z_label,
         filename="7-9_map_t_probe")

waterfall_plot(x, y, z, labels["t"], z_label, labels["P_t"],
               filename="7-9_waterfall_t_probe", y_range=(0.0, 1.2))

if (len(sys.argv) > 1) and (sys.argv[1] == 'animate'):
    animated_plot(x, y, z, labels["t"], labels["P_t"], r"$z = {0:7.3f} \, m$",
                  (x[0], x[-1]), (0.0, 1.2), fps=20, frame_prefix="probe_",
                  filename="7-9_animation_t_probe.avi")
Example #6
0
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
"""

import sys
from pyofss import Domain, System, Sech, Fibre
from pyofss import map_plot, waterfall_plot, animated_plot, labels

system = System(Domain(bit_width=100.0, samples_per_bit=2048))
system.add(Sech(peak_power=1.0, width=1.0))
system.add(Fibre(length=10.0, beta=[0.0, 0.0, -1.0, 0.0],
                 gamma=1.44, traces=50, method='ARK4IP'))
system.run()

storage = system['fibre'].stepper.storage
(x, y, z) = storage.get_plot_data(reduced_range=(-6.0, 6.0))

map_plot(x, y, z, labels["t"], labels["P_t"], labels["z"],
         filename="5-8_map_t")

waterfall_plot(x, y, z, labels["t"], labels["z"], labels["P_t"],
               filename="5-8_waterfall_t", y_range=(0.0, 1.64))

if (len(sys.argv) > 1) and (sys.argv[1] == 'animate'):
    animated_plot(x, y, z, labels["t"], labels["P_t"], r"$z = {0:7.3f} \, km$",
                  (x[0], x[-1]), (0.0, 1.64), fps=10, frame_prefix="t_",
                  filename="5-8_animation_t.avi")
Example #7
0
    storage = system['fibre'].stepper.storage
    (x, y, z) = storage.get_plot_data(is_temporal=False, normalised=True)

    map_plot(x,
             y,
             z,
             labels["nu"],
             labels["P_nu"],
             labels["z"],
             filename="4-4_map_m-{0:d}".format(m))

    waterfall_plot(x,
                   y,
                   z,
                   labels["nu"],
                   labels["z"],
                   labels["P_nu"],
                   filename="4-4_waterfall_m-{0:d}".format(m))

    if (len(sys.argv) > 1) and (sys.argv[1] == 'animate'):
        animated_plot(x,
                      y,
                      z,
                      labels["nu"],
                      labels["P_nu"],
                      r"$z = {0:7.3f} \, km$", (x[0], x[-1]), (0.0, 1.1),
                      fps=10,
                      frame_prefix="m{0:d}_".format(m),
                      filename="4-4_animation_m-{0:d}.avi".format(m))
Example #8
0
          traces=100,
          total_steps=200,
          method='RK4IP'))
system.run()

storage = system['fibre'].stepper.storage
(x, y, z) = storage.get_plot_data(reduced_range=(-10.0, 40.0))

map_plot(x, y, z, labels["t"], labels["P_t"], labels["z"], filename="3-7_map")

waterfall_plot(x,
               y,
               z,
               labels["t"],
               labels["z"],
               labels["P_t"],
               filename="3-7_waterfall")

if (len(sys.argv) > 1) and (sys.argv[1] == 'animate'):
    animated_plot(x,
                  y,
                  z,
                  labels["t"],
                  labels["P_t"],
                  r"$z = {0:7.3f} \, km$",
                  x_range=(-10.0, 20.0),
                  y_range=(0.0, 1.6),
                  fps=10,
                  frame_prefix="t_",
                  filename="3-7_animation.avi")
Example #9
0
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
"""

import sys
from pyofss import Domain, System, Sech, Fibre
from pyofss import map_plot, waterfall_plot, animated_plot, labels

system = System(Domain(bit_width=100.0, samples_per_bit=2048))
system.add(Sech(peak_power=1.0, width=1.0))
system.add(Fibre(length=10.0, beta=[0.0, 0.0, -1.0, 0.0],
                 gamma=1.44, traces=50, method='ARK4IP'))
system.run()

storage = system['fibre'].stepper.storage
(x, y, z) = storage.get_plot_data(reduced_range=(44.0, 56.0))

map_plot(x, y, z, labels["t"], labels["P_t"], labels["z"],
         filename="5-8_map_t")

waterfall_plot(x, y, z, labels["t"], labels["z"], labels["P_t"],
               filename="5-8_waterfall_t", y_range=(0.0, 1.64))

if (len(sys.argv) > 1) and (sys.argv[1] == 'animate'):
    animated_plot(x, y, z, labels["t"], labels["P_t"], r"$z = {0:7.3f} \, km$",
                  (x[0], x[-1]), (0.0, 1.64), fps=10, frame_prefix="t_",
                  filename="5-8_animation_t.avi")
Example #10
0
system.run()

storage = system['fibre'].stepper.storage
(x, y, z_temp) = storage.get_plot_data(channel=0)
z_label = r"Fibre length, $z \, (m)$"
z = z_temp * 1.0e3

map_plot(x, y, z, labels["t"], labels["P_t"], z_label,
         filename="7-9_map_t_pump")

waterfall_plot(x, y, z, labels["t"], z_label, labels["P_t"],
               filename="7-9_waterfall_t_pump", y_range=(0.0, 1.0e3))

if (len(sys.argv) > 1) and (sys.argv[1] == 'animate'):
    animated_plot(x, y, z, labels["t"], labels["P_t"], r"$z = {0:7.3f} \, m$",
                  (x[0], x[-1]), (0.0, 1.0e3), fps=20, frame_prefix="pump_",
                  filename="7-9_animation_t_pump.avi")

(x, y, z_temp) = storage.get_plot_data(True, (6.0, 14.0), False, channel=1)
z = z_temp * 1.0e3

map_plot(x, y, z, labels["t"], labels["P_t"], z_label,
         filename="7-9_map_t_probe")

waterfall_plot(x, y, z, labels["t"], z_label, labels["P_t"],
               filename="7-9_waterfall_t_probe", y_range=(0.0, 1.2))

if (len(sys.argv) > 1) and (sys.argv[1] == 'animate'):
    animated_plot(x, y, z, labels["t"], labels["P_t"], r"$z = {0:7.3f} \, m$",
                  (x[0], x[-1]), (0.0, 1.2), fps=20, frame_prefix="probe_",
                  filename="7-9_animation_t_probe.avi")
Example #11
0
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
"""

import sys
from pyofss import Domain, System, Gaussian, Fibre
from pyofss import map_plot, waterfall_plot, animated_plot, labels

for m in [1, 3]:
    system = System(Domain(bit_width=200.0, samples_per_bit=2048))
    system.add(Gaussian(peak_power=1.0, width=1.0, m=m))
    system.add(Fibre(length=10.0, gamma=1.0, traces=50))
    system.run()

    storage = system['fibre'].stepper.storage
    (x, y, z) = storage.get_plot_data(is_temporal=False, normalised=True)

    map_plot(x, y, z, labels["nu"], labels["P_nu"], labels["z"],
             filename="4-4_map_m-{0:d}".format(m))

    waterfall_plot(x, y, z, labels["nu"], labels["z"], labels["P_nu"],
                   filename="4-4_waterfall_m-{0:d}".format(m))

    if (len(sys.argv) > 1) and (sys.argv[1] == 'animate'):
        animated_plot(x, y, z, labels["nu"], labels["P_nu"],
                      r"$z = {0:7.3f} \, km$", (x[0], x[-1]), (0.0, 1.1),
                      fps=10, frame_prefix="m{0:d}_".format(m),
                      filename="4-4_animation_m-{0:d}.avi".format(m))
Example #12
0
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
"""

import sys
from pyofss import Domain, System, Gaussian, Fibre
from pyofss import map_plot, waterfall_plot, animated_plot, labels

system = System(Domain(bit_width=600.0, samples_per_bit=4096))
system.add(Gaussian(peak_power=1.0, width=1.0, m=3))
system.add(Fibre(length=6.0, beta=[0.0, 0.0, 0.0, 1.0], traces=100,
                 total_steps=200, method='RK4IP'))
system.run()

storage = system['fibre'].stepper.storage
(x, y, z) = storage.get_plot_data(reduced_range=(290.0, 340.0))

map_plot(x, y, z, labels["t"], labels["P_t"], labels["z"], filename="3-7_map")

waterfall_plot(x, y, z, labels["t"], labels["z"], labels["P_t"],
               filename="3-7_waterfall")

if (len(sys.argv) > 1) and (sys.argv[1] == 'animate'):
    animated_plot(x, y, z, labels["t"], labels["P_t"], r"$z = {0:7.3f} \, km$",
                  x_range=(290.0, 320.0), y_range=(0.0, 1.6), fps=10,
                  frame_prefix="t_", filename="3-7_animation.avi")