Note
Click here to download the full example code
1.4.3. NLPM750 fiber model with loss¶
import numpy as np
def define_beta_fun_NLPM750():
r"""Propagation constant for NLPM750 PCF.
Enclosing function returning a closure implementing a rational
Pade-approximant of order [4/4] for the refractive index of a NL-PM-750
nonlinear photonic crystal fiber (PCF), see [NLPM750]_.
Returns:
:obj:`callable`: Propagation constant for NL-PM-750 PCF.
.. [NLPM750] NL-PM-750 Nonlinear Photonic Crystal Fiber,
www.nktphotonics.com.
"""
p = np.poly1d((1.49902, -2.48088, 2.41969, 0.530198, -0.0346925)[::-1])
q = np.poly1d((1.00000, -1.56995, 1.59604, 0.381012, -0.0270357)[::-1])
n_idx = lambda w: p(w) / q(w) # (-)
c0 = 0.29979 # (micron/fs)
return lambda w: n_idx(w) * w / c0 # (1/micron)
def define_alpha_fun_NLPM750():
_dat = [
(1.190, 1867.8),
(1.191, 1866.4),
(1.192, 1854.7),
(1.193, 1860.9),
(1.194, 1862.1),
(1.195, 1725.1),
(1.196, 1656.2),
(1.197, 1658.1),
(1.198, 1646.3),
(1.199, 1574.4),
(1.200, 1432.4),
(1.201, 1295.9),
(1.202, 1223.7),
(1.203, 1155.4),
(1.204, 1081.2),
(1.205, 937.1),
(1.206, 862.4),
(1.207, 870.6),
(1.208, 865.9),
(1.209, 722.0),
(1.210, 644.1),
(1.211, 567.5),
(1.212, 555.9),
(1.213, 543.7),
(1.214, 531.9),
(1.215, 519.3),
(1.216, 505.8),
(1.217, 490.9),
(1.218, 473.7),
(1.219, 449.9),
(1.220, 433.0),
(1.221, 418.0),
(1.222, 404.0),
(1.223, 390.6),
(1.224, 377.9),
(1.225, 365.6),
(1.226, 354.1),
(1.227, 343.1),
(1.229, 332.2),
(1.229, 321.4),
(1.231, 311.1),
(1.232, 301.2),
(1.233, 291.7),
(1.233, 282.5),
(1.235, 273.4),
(1.236, 264.4),
(1.237, 255.7),
(1.238, 247.2),
(1.239, 239.2),
(1.240, 231.4),
(1.241, 223.7),
(1.242, 216.3),
(1.243, 209.0),
(1.245, 202.0),
(1.245, 195.2),
(1.247, 188.5),
(1.248, 182.1),
(1.249, 175.9),
(1.250, 169.9),
(1.251, 164.1),
(1.252, 158.6),
(1.253, 153.3),
(1.254, 148.1),
(1.255, 143.2),
(1.256, 138.5),
(1.257, 133.9),
(1.258, 129.6),
(1.260, 125.4),
(1.260, 121.4),
(1.262, 117.5),
(1.263, 113.9),
(1.264, 110.3),
(1.265, 107.0),
(1.266, 103.8),
(1.267, 100.8),
(1.268, 98.0),
(1.269, 95.1),
(1.270, 92.4),
(1.272, 89.8),
(1.273, 87.4),
(1.274, 85.2),
(1.276, 83.1),
(1.277, 81.1),
(1.279, 79.2),
(1.280, 77.4),
(1.281, 75.8),
(1.282, 74.2),
(1.283, 72.7),
(1.284, 71.5),
(1.285, 70.4),
(1.286, 69.3),
(1.288, 68.2),
(1.289, 67.2),
(1.290, 66.3),
(1.291, 65.5),
(1.293, 64.7),
(1.294, 64.0),
(1.296, 63.3),
(1.297, 62.7),
(1.298, 62.2),
(1.299, 61.8),
(1.300, 61.5),
(1.302, 61.3),
(1.303, 61.1),
(1.308, 61.1),
(1.308, 61.2),
(1.310, 61.3),
(1.311, 61.6),
(1.312, 62.0),
(1.313, 62.5),
(1.315, 63.1),
(1.315, 63.8),
(1.318, 64.5),
(1.319, 65.4),
(1.320, 66.5),
(1.322, 67.7),
(1.323, 68.9),
(1.324, 70.3),
(1.325, 71.9),
(1.326, 73.8),
(1.328, 75.9),
(1.329, 78.3),
(1.330, 80.8),
(1.332, 83.6),
(1.334, 86.6),
(1.335, 89.8),
(1.336, 93.3),
(1.338, 97.0),
(1.339, 101.0),
(1.340, 105.3),
(1.341, 109.9),
(1.343, 114.6),
(1.344, 119.5),
(1.345, 124.6),
(1.346, 129.8),
(1.348, 135.3),
(1.348, 140.9),
(1.350, 146.4),
(1.351, 151.9),
(1.353, 157.1),
(1.354, 161.9),
(1.355, 166.0),
(1.356, 169.2),
(1.358, 171.1),
(1.359, 171.8),
(1.360, 171.0),
(1.362, 168.8),
(1.363, 165.3),
(1.364, 160.4),
(1.365, 154.6),
(1.367, 147.9),
(1.368, 141.0),
(1.369, 133.8),
(1.371, 126.4),
(1.372, 118.9),
(1.373, 111.7),
(1.375, 104.9),
(1.376, 98.5),
(1.377, 92.5),
(1.378, 87.0),
(1.380, 82.0),
(1.381, 77.4),
(1.382, 73.3),
(1.384, 69.2),
(1.385, 65.3),
(1.386, 61.8),
(1.388, 58.7),
(1.389, 56.0),
(1.390, 53.6),
(1.392, 51.8),
(1.393, 50.4),
(1.394, 49.3),
(1.396, 48.5),
(1.397, 47.8),
(1.399, 47.1),
(1.400, 46.5),
(1.401, 45.9),
(1.403, 45.2),
(1.404, 44.6),
(1.406, 44.0),
(1.406, 43.3),
(1.408, 42.6),
(1.409, 41.9),
(1.411, 41.2),
(1.412, 40.6),
(1.418, 40.0),
(1.419, 39.4),
(1.420, 38.9),
(1.422, 38.4),
(1.423, 38.0),
(1.425, 37.6),
(1.426, 37.2),
(1.429, 37.0),
(1.430, 36.8),
(1.432, 36.6),
(1.433, 36.4),
(1.435, 36.3),
(1.436, 36.2),
(1.438, 36.1),
(1.439, 36.0),
(1.442, 35.9),
(1.443, 35.9),
(1.449, 35.8),
(1.450, 35.8),
(1.456, 35.9),
(1.458, 35.9),
(1.459, 35.9),
(1.460, 35.9),
(1.462, 35.9),
(1.464, 36.0),
(1.465, 36.1),
(1.467, 36.2),
(1.469, 36.3),
(1.469, 36.3),
(1.471, 36.4),
(1.474, 36.5),
(1.475, 36.6),
(1.477, 36.7),
(1.478, 36.9),
(1.480, 37.0),
(1.481, 37.2),
(1.483, 37.4),
(1.484, 37.6),
(1.486, 37.8),
(1.488, 38.1),
(1.492, 38.3),
(1.494, 38.6),
(1.496, 38.9),
(1.497, 39.3),
(1.498, 39.6),
(1.500, 39.9),
(1.502, 40.3),
(1.504, 40.6),
(1.505, 40.8),
(1.506, 41.0),
(1.508, 41.1),
(1.510, 41.3),
(1.511, 41.3),
(1.513, 41.3),
(1.514, 41.2),
(1.516, 41.1),
(1.517, 40.8),
(1.519, 40.6),
(1.520, 40.2),
(1.522, 39.9),
(1.524, 39.5),
(1.526, 39.1),
(1.527, 38.6),
(1.529, 38.2),
(1.530, 37.8),
(1.532, 37.4),
(1.536, 37.0),
(1.538, 36.7),
(1.540, 36.4),
(1.542, 36.2),
(1.544, 36.0),
(1.547, 35.8),
(1.550, 35.7),
(1.551, 35.6),
(1.553, 35.5),
(1.555, 35.5),
(1.557, 35.4),
(1.558, 35.4),
(1.560, 35.3),
(1.561, 35.3),
(1.564, 35.3),
(1.565, 35.3),
(1.567, 35.2),
(1.570, 35.2),
(1.572, 35.3),
(1.574, 35.3),
(1.577, 35.3),
(1.578, 35.3),
(1.581, 35.3),
(1.584, 35.3),
(1.590, 35.3),
(1.591, 35.3),
(1.593, 35.3),
(1.594, 35.3),
(1.596, 35.3),
(1.598, 35.3),
(1.600, 35.3),
(1.601, 35.3),
(1.603, 35.3),
(1.605, 35.3),
(1.607, 35.3),
(1.608, 35.4),
(1.610, 35.4),
(1.614, 35.5),
(1.616, 35.5),
(1.619, 35.5),
(1.621, 35.6),
(1.623, 35.7),
(1.626, 35.7),
(1.628, 35.8),
(1.630, 35.8),
(1.632, 35.9),
(1.635, 35.9),
(1.636, 35.9),
(1.638, 36.0),
(1.640, 36.0),
(1.642, 36.0),
(1.643, 36.1),
(1.645, 36.1),
(1.647, 36.0),
(1.649, 36.0),
(1.651, 36.0),
(1.653, 36.0),
(1.654, 36.0),
(1.657, 36.0),
(1.662, 35.9),
(1.664, 35.9),
(1.666, 35.8),
(1.668, 35.8),
(1.669, 35.7),
(1.672, 35.7),
(1.673, 35.7),
(1.676, 35.8),
(1.678, 35.7),
(1.680, 35.7),
(1.683, 35.8),
(1.686, 35.8),
(1.688, 35.8),
(1.690, 35.8),
(1.691, 35.8),
(1.706, 35.8),
(1.707, 35.9),
(1.709, 36.0),
(1.711, 36.0),
(1.714, 36.0),
(1.715, 36.0),
(1.718, 36.0),
(1.719, 36.0),
(1.722, 36.0),
(1.723, 36.1),
(1.727, 36.1),
(1.730, 36.2),
(1.732, 36.2),
(1.734, 36.2),
(1.737, 36.2),
(1.738, 36.2),
(1.740, 36.2),
(1.742, 36.2),
(1.745, 36.2),
(1.747, 36.2),
(1.749, 36.3),
(1.751, 36.2),
(1.753, 36.2),
(1.755, 36.1),
(1.758, 36.1),
(1.762, 36.1),
(1.764, 36.1),
(1.766, 36.1),
(1.767, 36.1),
(1.770, 36.1),
(1.775, 36.1),
(1.777, 36.1),
(1.779, 36.0),
(1.781, 36.1),
(1.783, 36.1),
(1.786, 36.1),
(1.788, 36.1),
(1.791, 36.1),
(1.792, 36.0),
(1.795, 36.0),
(1.797, 35.9),
(1.799, 35.9),
(1.801, 35.9),
(1.803, 35.9),
(1.805, 35.9),
(1.808, 35.9),
(1.812, 35.9),
(1.814, 35.9),
(1.817, 35.9),
(1.819, 35.9),
(1.822, 35.9),
(1.826, 36.0),
(1.828, 36.0),
(1.831, 36.0),
(1.832, 35.9),
(1.835, 35.9),
(1.837, 35.9),
(1.840, 35.9),
(1.843, 35.9),
(1.844, 35.9),
(1.847, 35.9),
(1.849, 35.9),
(1.852, 35.9),
(1.859, 35.9),
(1.862, 35.8),
(1.864, 35.8),
(1.867, 35.9),
(1.868, 35.9),
(1.871, 35.9),
(1.873, 35.9),
(1.876, 35.8),
(1.878, 35.8),
(1.883, 35.9),
(1.886, 35.9),
(1.888, 35.9),
(1.891, 35.9),
(1.893, 36.0),
(1.896, 36.0),
(1.898, 36.0),
(1.905, 36.0),
(1.908, 36.1),
(1.911, 36.1),
(1.914, 36.1),
(1.915, 36.2),
(1.918, 36.2),
(1.921, 36.2),
(1.924, 36.3),
(1.926, 36.3),
(1.928, 36.3),
(1.934, 36.4),
(1.936, 36.5),
(1.939, 36.6),
(1.941, 36.6),
(1.944, 36.7),
(1.946, 36.8),
(1.950, 36.9),
(1.951, 37.0),
(1.954, 37.1),
(1.957, 37.2),
(1.960, 37.4),
(1.962, 37.5),
(1.968, 37.6),
(1.971, 37.7),
(1.974, 37.9),
(1.976, 38.0),
(1.979, 38.2),
(1.981, 38.3),
(1.984, 38.4),
(1.990, 38.5),
(1.992, 38.5),
(1.995, 38.5),
(1.998, 38.5),
(2.003, 38.4),
(2.006, 38.3),
(2.009, 38.2),
(2.012, 38.0),
(2.015, 37.9),
(2.018, 37.7),
(2.020, 37.5),
(2.023, 37.3),
(2.026, 37.2),
(2.029, 37.1),
(2.031, 36.9),
(2.034, 36.8),
(2.038, 36.8),
(2.040, 36.7),
(2.044, 36.7),
(2.046, 36.7),
(2.049, 36.7),
(2.052, 36.7),
(2.055, 36.7),
(2.058, 36.7),
(2.063, 36.7),
(2.067, 36.8),
(2.069, 36.8),
(2.073, 36.8),
(2.075, 36.8),
(2.078, 36.9),
(2.081, 36.9),
(2.085, 36.9),
(2.087, 37.0),
(2.090, 37.0),
(2.093, 37.1),
(2.097, 37.2),
(2.102, 37.2),
(2.105, 37.3),
(2.109, 37.3),
(2.112, 37.4),
(2.115, 37.4),
(2.119, 37.4),
(2.121, 37.5),
(2.125, 37.5),
(2.127, 37.5),
(2.131, 37.5),
(2.133, 37.5),
(2.137, 37.6),
(2.140, 37.6),
(2.144, 37.7),
(2.145, 37.7),
(2.152, 37.8),
(2.156, 37.8),
(2.159, 37.8),
(2.163, 37.9),
(2.172, 37.9),
(2.176, 38.0),
(2.178, 38.0),
(2.182, 38.1),
(2.185, 38.1),
(2.189, 38.1),
(2.191, 38.2),
(2.195, 38.2),
(2.202, 38.3),
(2.206, 38.4),
(2.212, 38.5),
(2.215, 38.5),
(2.219, 38.6),
(2.222, 38.7),
(2.226, 38.7),
(2.228, 38.7),
(2.233, 38.8),
(2.236, 38.9),
(2.240, 39.0),
(2.242, 39.1),
(2.249, 39.2),
(2.256, 39.2),
(2.260, 39.4),
(2.263, 39.4),
(2.268, 39.5),
(2.271, 39.6),
(2.277, 39.7),
(2.282, 39.8),
(2.286, 39.9),
(2.289, 40.0),
(2.304, 40.2),
(2.308, 40.3),
(2.310, 40.5),
(2.315, 40.6),
(2.330, 40.7),
(2.333, 40.8),
(2.337, 40.9),
(2.341, 41.1),
(2.345, 41.2),
(2.348, 41.2),
(2.352, 41.3),
(2.356, 41.5),
(2.360, 41.6),
(2.363, 41.6),
(2.367, 41.7),
(2.371, 41.7),
(2.376, 41.8),
(2.380, 41.9),
(2.383, 42.1),
(2.387, 42.1),
(2.391, 42.2),
(2.396, 42.3),
(2.399, 42.4),
(2.404, 42.4),
(2.407, 42.4),
(2.412, 42.5),
(2.415, 42.7),
(2.420, 42.8),
(2.422, 42.9),
(2.427, 42.9),
(2.431, 43.0),
(2.436, 43.2),
(2.439, 43.3),
(2.444, 43.4),
(2.456, 43.6),
(2.464, 43.7),
(2.469, 43.9),
(2.473, 44.1),
(2.483, 44.2),
(2.485, 44.4),
(2.491, 44.6),
(2.494, 44.7),
(2.500, 44.9),
(2.502, 45.1),
(2.508, 45.2),
(2.512, 45.3),
(2.517, 45.4),
(2.521, 45.6),
(2.525, 45.8),
(2.529, 45.9),
(2.534, 46.0),
(2.538, 46.1),
(2.544, 46.3),
(2.552, 46.5),
(2.556, 46.7),
(2.561, 46.9),
(2.564, 47.1),
(2.570, 47.3),
(2.574, 47.5),
(2.579, 47.7),
(2.588, 47.9),
(2.593, 48.1),
(2.597, 48.4),
(2.603, 48.6),
(2.607, 48.8),
(2.613, 49.0),
(2.622, 49.1),
(2.626, 49.3),
(2.632, 49.5),
(2.635, 49.7),
(2.640, 49.9),
(2.645, 50.1),
(2.651, 50.2),
(2.654, 50.3),
(2.659, 50.5),
(2.664, 50.6),
(2.670, 50.7),
(2.674, 50.9),
(2.680, 51.1),
(2.683, 51.3),
(2.689, 51.5),
(2.694, 51.8),
(2.700, 52.0),
(2.703, 52.3),
(2.715, 52.6),
(2.720, 53.0),
(2.726, 53.3),
(2.736, 53.6),
(2.740, 53.9),
(2.747, 54.2),
(2.751, 54.4),
(2.756, 54.6),
(2.761, 54.8),
(2.767, 55.0),
(2.772, 55.1),
(2.778, 55.3),
(2.782, 55.5),
(2.788, 55.7),
(2.793, 55.8),
(2.800, 56.0),
(2.803, 56.1),
(2.809, 56.3),
(2.814, 56.5),
(2.821, 56.7),
(2.826, 57.0),
(2.831, 57.2),
(2.843, 57.4),
(2.850, 57.7),
(2.855, 57.9),
(2.862, 58.2),
(2.865, 58.6),
(2.872, 58.8),
(2.877, 59.1),
(2.884, 59.3),
(2.887, 59.6),
(2.894, 59.8),
(2.900, 60.0),
(2.907, 60.3),
(2.910, 60.6),
(2.917, 60.8),
(2.923, 61.0),
(2.930, 61.3),
(2.935, 61.5),
(2.942, 61.8),
(2.946, 62.1),
(2.953, 62.4),
(2.959, 62.8),
(2.966, 63.1),
(2.977, 63.4),
(2.983, 63.6),
(2.998, 64.0),
(3.002, 64.4),
(3.009, 64.7),
(3.022, 65.0),
(3.047, 65.3),
(3.061, 65.6),
(3.065, 65.9),
(3.073, 66.1),
(3.079, 66.4),
(3.087, 66.8),
(3.091, 67.1),
(3.099, 67.5),
(3.105, 67.7),
(3.113, 68.1),
(3.125, 68.5),
(3.131, 68.7),
(3.139, 68.9),
(3.146, 69.1),
(3.154, 69.4),
(3.162, 69.6),
(3.166, 69.9),
(3.175, 70.1),
(3.181, 70.2),
(3.190, 70.4),
(3.194, 70.5),
(3.202, 70.6),
(3.209, 70.8),
(3.218, 70.9),
(3.222, 71.1),
(3.231, 71.4),
(3.237, 71.5),
(3.246, 71.6),
(3.253, 71.7),
(3.261, 71.8),
(3.266, 72.0),
(3.275, 72.2),
(3.282, 72.4),
(3.291, 72.6),
(3.295, 72.9),
(3.304, 73.4),
(3.311, 73.8),
(3.320, 74.1),
(3.325, 74.6),
(3.343, 75.3),
(3.350, 76.0),
(3.360, 76.6),
(3.367, 77.2),
(3.374, 77.7),
(3.381, 78.3),
(3.391, 78.8),
(3.398, 79.2),
(3.408, 79.6),
(3.413, 79.8),
(3.422, 80.1),
(3.430, 80.5),
(3.440, 80.8),
(3.445, 81.0),
(3.454, 81.4),
(3.462, 81.9),
(3.472, 82.3),
(3.480, 82.6),
(3.487, 83.0),
(3.495, 83.4),
(3.505, 83.8),
(3.513, 84.2),
(3.523, 84.6),
(3.528, 85.0),
(3.539, 85.3),
(3.547, 85.7),
(3.557, 86.1),
(3.568, 86.5),
(3.573, 87.0),
(3.584, 87.5),
(3.592, 87.9),
(3.603, 88.3),
(3.608, 88.8),
(3.619, 89.5),
(3.627, 90.1),
(3.638, 90.7),
(3.647, 91.3),
(3.658, 91.8),
(3.663, 92.2),
(3.675, 92.5),
(3.683, 92.9),
(3.695, 93.4),
(3.700, 94.1),
(3.712, 94.9),
(3.720, 95.4),
(3.732, 95.7),
(3.738, 96.1),
(3.750, 96.5),
(3.758, 97.1),
(3.770, 97.9),
(3.779, 98.7),
(3.791, 99.5),
(3.800, 100.2),
(3.809, 100.9),
(3.821, 101.6),
(3.831, 102.2),
(3.843, 102.9),
(3.849, 103.7),
(3.862, 104.2),
(3.871, 104.5),
(3.884, 104.8),
(3.890, 105.1),
(3.902, 105.3),
(3.912, 105.3),
(3.925, 105.4),
(3.935, 105.4),
(3.944, 105.5),
(3.954, 105.6),
(3.967, 106.1),
(3.977, 106.9),
(3.990, 107.6),
(3.997, 108.1),
(4.010, 108.5),
(4.021, 109.0),
(4.034, 109.6),
(4.041, 110.3),
(4.055, 111.2),
(4.068, 112.2),
(4.079, 113.1),
(4.093, 113.9),
(4.100, 114.5),
(4.114, 114.8),
(4.125, 115.4),
(4.139, 116.2),
(4.150, 116.8),
(4.164, 117.3),
(4.171, 117.8),
(4.186, 118.3),
(4.197, 118.9),
(4.212, 119.5),
(4.219, 120.1),
(4.234, 120.6),
(4.245, 121.3),
(4.260, 122.1),
(4.268, 122.9),
(4.283, 123.7),
(4.295, 124.9),
(4.310, 126.5),
(4.322, 127.5),
(4.338, 127.9),
(4.346, 128.3),
(4.361, 128.6),
(4.377, 129.7),
(4.389, 130.2),
(4.406, 130.0),
(4.414, 130.3),
(4.430, 131.6),
(4.459, 132.2),
(4.467, 132.8),
(4.484, 133.3),
(4.497, 134.6),
(4.514, 136.5),
(4.539, 138.3),
(4.552, 140.1),
(4.570, 141.0),
(4.583, 142.2),
(4.600, 143.3),
(4.609, 143.2),
(4.627, 142.3),
]
X, Y = zip(*_dat)
a_func_ = lambda x: np.interp(x, np.asarray(X), np.asarray(Y) * 1e-9 / (20*0.43))
return a_func_
if __name__ == "__main__":
w = np.linspace(0.6, 5.0, 1000)
a_ = define_alpha_fun_NLPM750()
b_ = define_beta_fun_NLPM750()
for wi in w:
print(wi, a_(wi), b_(wi))
Total running time of the script: ( 0 minutes 0.000 seconds)