Big upgrade

This commit is contained in:
Benoît Sierro
2021-05-27 11:05:11 +02:00
parent b94d8ed3fb
commit 9aabcbe1d4
49 changed files with 488 additions and 277 deletions

View File

@@ -9,7 +9,7 @@ pitch_ratio = 0.37
[pulse]
intensity_noise = 0.05e-2
power = 100e3
peak_power = 100e3
quantum_noise = true
shape = "gaussian"
wavelength = 1050e-9

View File

@@ -7,7 +7,7 @@ model = "marcatili"
gas_name = ["air", "helium"]
[pulse]
power = 100e3
peak_power = 100e3
wavelength = 800e-9
[pulse.variable]

View File

@@ -7,7 +7,7 @@ model = "marcatili"
gas_name = "air"
[pulse]
power = 100e3
peak_power = 100e3
wavelength = 800e-9
width = 250e-15

View File

@@ -7,7 +7,7 @@ model = "marcatili"
gas_name = "air"
[pulse]
power = 100e3
peak_power = 100e3
wavelength = 800e-9
[pulse.variable]

View File

@@ -7,7 +7,7 @@ model = "marcatili"
gas_name = "air"
[pulse]
power = 100e3
peak_power = 100e3
wavelength = 800e-9
width = 250e-15

View File

@@ -10,7 +10,7 @@ pitch = 1.5e-6
pitch_ratio = 0.37
[pulse]
power = 100e3
peak_power = 100e3
quantum_noise = true
shape = "gaussian"
wavelength = 1050e-9

View File

@@ -1,4 +1,4 @@
#t0, width, power or energy missing
#t0, width, peak_power or energy missing
name = "test config"

View File

@@ -10,7 +10,7 @@ pitch = 1.5e-6
pitch_ratio = 0.37
[pulse]
power = 100e3
peak_power = 100e3
quantum_noise = true
shape = "gaussian"
wavelength = 1050e-9

View File

@@ -10,7 +10,7 @@ pitch = 1.5e-6
pitch_ratio = 0.37
[pulse]
power = 100e3
peak_power = 100e3
quantum_noise = true
shape = "gaussian"
wavelength = 1050e-9

View File

@@ -12,7 +12,7 @@ length = 1
model = "hasan"
[pulse]
power = 100e3
peak_power = 100e3
quantum_noise = true
shape = "gaussian"
wavelength = 1050e-9

View File

@@ -11,7 +11,7 @@ length = 1
model = "hasan"
[pulse]
power = 100e3
peak_power = 100e3
quantum_noise = true
shape = "gaussian"
wavelength = 1050e-9

View File

@@ -9,7 +9,7 @@ pitch = 1.5e-6
pitch_ratio = 0.37
[pulse]
power = 100e3
peak_power = 100e3
quantum_noise = true
shape = "gaussian"
wavelength = 1050e-9

View File

@@ -10,7 +10,7 @@ pitch = 1.5e-6
pitch_ratio = 0.37
[pulse]
power = 100e3
peak_power = 100e3
quantum_noise = true
shape = "gaussian"
wavelength = 1050e-9

View File

@@ -8,7 +8,7 @@ pitch = 1.5e-6
pitch_ratio = 0.37
[pulse]
power = 100e3
peak_power = 100e3
quantum_noise = true
shape = "gaussian"
wavelength = 1050e-9

View File

@@ -18,7 +18,7 @@ gas_name = "helium"
temperature = [300, 350, 400]
[pulse]
power = 100e3
peak_power = 100e3
quantum_noise = true
shape = "gaussian"
wavelength = 1050e-9

View File

@@ -9,7 +9,7 @@ length = 1
model = "marcatili"
[pulse]
power = 100e3
peak_power = 100e3
quantum_noise = true
shape = "gaussian"
wavelength = 1050e-9

View File

@@ -11,7 +11,7 @@ pitch = 1.5e-6
pitch_ratio = 0.37
[pulse]
power = 100e3
peak_power = 100e3
quantum_noise = true
shape = "gaussian"
wavelength = 1050e-9

View File

@@ -1,32 +1,32 @@
name = "full anomalous"
[fiber]
beta = [ -1.183e-26, 8.1038e-41, -9.5205e-56, 2.0737e-70, -5.3943e-85, 1.3486e-99, -2.5495e-114, 3.0524e-129, -1.714e-144,]
beta = [-1.183e-26, 8.1038e-41, -9.5205e-56, 2.0737e-70, -5.3943e-85, 1.3486e-99, -2.5495e-114, 3.0524e-129, -1.714e-144]
gamma = 0.11
input_transmission = 1.0
length = 0.02
model = "custom"
input_transmission = 1.0
[pulse]
power = 10000
t0 = 2.84e-14
shape = "gaussian"
quantum_noise = false
intensity_noise = 0
peak_power = 10000
quantum_noise = false
shape = "gaussian"
t0 = 2.84e-14
[simulation]
behaviors = ["spm", "ss"]
dt = 1e-15
frep = 80000000.0
ideal_gas = false
lower_wavelength_interp_limit = 3e-7
parallel = true
raman_type = "measured"
repeat = 3
t_num = 16384
tolerated_error = 1e-9
z_num = 64
behaviors = [ "spm", "ss",]
frep = 80000000.0
lower_wavelength_interp_limit = 3e-7
upper_wavelength_interp_limit = 1.9e-6
ideal_gas = false
z_num = 64
[pulse.variable]
wavelength = [ 8.35e-7, 8.3375e-7,]
wavelength = [8.35e-7, 8.3375e-7]

View File

@@ -10,7 +10,7 @@ pitch = 1.5e-6
pitch_ratio = 0.37
[pulse]
power = 100e3
peak_power = 100e3
quantum_noise = true
shape = "gaussian"
wavelength = 1050e-9

View File

@@ -10,7 +10,7 @@ pitch = 1.5e-6
pitch_ratio = 0.37
[pulse]
power = 100e3
peak_power = 100e3
quantum_noise = true
shape = "gaussian"
wavelength = 1050e-9

View File

@@ -11,7 +11,7 @@ pitch_ratio = 0.37
[pulse]
intensity_noise = 0.1e-2
power = 100e3
peak_power = 100e3
quantum_noise = true
shape = "gaussian"
wavelength = 1050e-9

View File

@@ -16,7 +16,7 @@ gamma = 0.11
length = 0.02
[pulse]
power = 10000
peak_power = 10000
t0 = 2.84e-14
[pulse.variable]

View File

@@ -9,8 +9,8 @@ model = "pcf"
pitch_ratio = 0.37
[pulse]
peak_power = 100e3
pitch = 1.5e-6
power = 100e3
quantum_noise = true
shape = "gaussian"
wavelength = 1050e-9

View File

@@ -10,7 +10,7 @@ pitch = 1.5e-6
pitch_ratio = 0.37
[pulse]
power = 100e3
peak_power = 100e3
quantum_noise = true
shape = "gaussian"
wavelength = 1050e-9

View File

@@ -10,7 +10,7 @@ pitch = 1.5e-6
pitch_ratio = 0.37
[pulse]
power = 100e3
peak_power = 100e3
quantum_noise = true
shape = "gaussian"
wavelength = 1050e-9

View File

@@ -10,7 +10,7 @@ pitch = 1.5e-6
pitch_ratio = 0.37
[pulse]
power = 100e3
peak_power = 100e3
quantum_noise = true
shape = "gaussian"
wavelength = 1050e-9

View File

@@ -10,7 +10,7 @@ pitch = 1.5e-6
pitch_ratio = 0.37
[pulse]
power = 100e3
peak_power = 100e3
quantum_noise = true
shape = "gaussian"
wavelength = 1050e-9

View File

@@ -11,7 +11,7 @@ pitch_ratio = 0.37
[pulse]
intensity_noise = 0.05e-2
power = 100e3
peak_power = 100e3
quantum_noise = true
shape = "gaussian"
wavelength = 1050e-9

View File

@@ -8,7 +8,7 @@ gamma = 0.018
length = 1
[pulse]
power = 100e3
peak_power = 100e3
quantum_noise = true
shape = "gaussian"
wavelength = 1050e-9

View File

@@ -8,7 +8,7 @@ pitch = 1.5e-6
pitch_ratio = 0.37
[pulse]
power = 100e3
peak_power = 100e3
quantum_noise = true
shape = "gaussian"
wavelength = 1050e-9

View File

@@ -92,7 +92,7 @@ class TestInitializeMethods(unittest.TestCase):
with self.assertRaisesRegex(
MissingParameterError,
r"1 of '\['power', 'energy', 'width', 't0'\]' is required when 'soliton_num' is specified and no defaults have been set",
r"1 of '\['peak_power', 'energy', 'width', 't0'\]' is required when 'soliton_num' is specified and no defaults have been set",
):
init._ensure_consistency(conf("bad2"))

View File

@@ -6,13 +6,13 @@ class TestPulseMethods(unittest.TestCase):
def test_conform_pulse_params(self):
self.assertNotIn(None, conform_pulse_params("gaussian", t0=5, energy=6))
self.assertNotIn(None, conform_pulse_params("gaussian", width=5, energy=6))
self.assertNotIn(None, conform_pulse_params("gaussian", t0=5, power=6))
self.assertNotIn(None, conform_pulse_params("gaussian", width=5, power=6))
self.assertNotIn(None, conform_pulse_params("gaussian", t0=5, peak_power=6))
self.assertNotIn(None, conform_pulse_params("gaussian", width=5, peak_power=6))
self.assertEqual(4, len(conform_pulse_params("gaussian", t0=5, energy=6)))
self.assertEqual(4, len(conform_pulse_params("gaussian", width=5, energy=6)))
self.assertEqual(4, len(conform_pulse_params("gaussian", t0=5, power=6)))
self.assertEqual(4, len(conform_pulse_params("gaussian", width=5, power=6)))
self.assertEqual(4, len(conform_pulse_params("gaussian", t0=5, peak_power=6)))
self.assertEqual(4, len(conform_pulse_params("gaussian", width=5, peak_power=6)))
with self.assertRaisesRegex(
TypeError, "when soliton number is desired, both gamma and beta2 must be specified"
@@ -30,10 +30,10 @@ class TestPulseMethods(unittest.TestCase):
5, len(conform_pulse_params("gaussian", width=5, energy=6, gamma=0.01, beta2=2e-6))
)
self.assertEqual(
5, len(conform_pulse_params("gaussian", t0=5, power=6, gamma=0.01, beta2=2e-6))
5, len(conform_pulse_params("gaussian", t0=5, peak_power=6, gamma=0.01, beta2=2e-6))
)
self.assertEqual(
5, len(conform_pulse_params("gaussian", width=5, power=6, gamma=0.01, beta2=2e-6))
5, len(conform_pulse_params("gaussian", width=5, peak_power=6, gamma=0.01, beta2=2e-6))
)

View File

@@ -58,7 +58,7 @@ class TestUtilsMethods(unittest.TestCase):
old = conf("initial_config")
new = conf("fiber2")
over = utils.override_config(old, new)
over = utils.override_config(new, old)
self.assertIn("input_transmission", over["fiber"]["variable"])
self.assertNotIn("input_transmission", over["fiber"])