Пример #1
0
    def setUpClass(cls):
        yb_number_density = 3e25
        core_r = 5e-6
        background_loss = 0
        length = 3
        pump_cladding_r = 50e-6
        core_to_cladding_ratio = core_r / pump_cladding_r
        core_na = 0.12
        tolerance = 1e-5
        cls.input_signal_power = 0.4
        cls.input_pump_power = 47.2

        fiber = YbDopedDoubleCladFiber(length, core_r, yb_number_density,
                                       background_loss, core_na,
                                       core_to_cladding_ratio)
        pump_wavelengths = np.linspace(910, 950, 11) * 1e-9
        cls.gains = []
        init_guess_array = None
        for pump_wl in pump_wavelengths:
            simulation = SteadyStateSimulation(fiber)
            simulation.add_forward_signal(wl=1030e-9,
                                          input_power=cls.input_signal_power,
                                          mode=GaussianMode(
                                              mfd=2 * 4.8e-6,
                                              core_radius=fiber.core_radius),
                                          channel_id='signal')
            simulation.add_backward_pump(wl=pump_wl,
                                         input_power=cls.input_pump_power)
            if init_guess_array is not None:
                simulation.set_guess_array(init_guess_array)
            result = simulation.run(tol=tolerance)
            init_guess_array = result.powers
            result_dict = result.make_result_dict()
            signal_gain = result_dict['signal']['gain']
            cls.gains.append(signal_gain)
    def setUpClass(cls):
        Yb_number_density = 3e25
        core_r = 5e-6
        background_loss = 0
        length = 3
        pump_cladding_r = 50e-6
        core_to_cladding_ratio = core_r / pump_cladding_r
        core_NA = 0.12
        tolerance = 1e-5
        cls.input_signal_power = 0.4
        cls.input_pump_power = 47.2

        fiber = YbDopedDoubleCladFiber(length, core_r, Yb_number_density,
                                       background_loss, core_NA,
                                       core_to_cladding_ratio)
        pump_wavelengths = np.linspace(910, 950, 11) * 1e-9
        cls.gains = []
        init_guess_array = None
        for pump_wl in pump_wavelengths:
            simulation = SteadyStateSimulation()
            simulation.fiber = fiber
            simulation.add_cw_signal(wl=1030e-9,
                                     power=cls.input_signal_power,
                                     mode_shape_parameters={
                                         'functional_form': 'gaussian',
                                         'mode_diameter': 2 * 4.8e-6
                                     })
            simulation.add_backward_pump(wl=pump_wl,
                                         power=cls.input_pump_power)
            if init_guess_array is not None:
                simulation.set_guess_array(init_guess_array)
            result = simulation.run(tol=tolerance)
            init_guess_array = result.powers
            result_dict = result.make_result_dict()
            signal_gain = result_dict['forward_signal']['gain'][0]
            cls.gains.append(signal_gain)