How to appropriately configure and read gain spectrum
mlmalesic opened this issue · 0 comments
mlmalesic commented
Hi,
I am having a hard time to find out how to use a gain spectrum in the simulation. I use
fiber_specs = {
"name": "A2901M2F1C020R02",
"dispersion_format": "D",
"nonlinear_parameter": Gamma,
"dispersion_x_units": "nm",
"dispersion_y_units": "ps/nm/km",
"dispersion_data": Disp_Data,
"is_gain": True,
"gain_spectrum": ErGeSi,
"gain_x_units": "nm"
}
with some read np.arrays Disp_Data and ErGeSi.
followed lateron by
fiber1 = pynlo.media.fibers.fiber.FiberInstance()
fiber1.fiberspecs = fiber_specs
This leads to KeyError: 'gain_x_data'
Not clear how to proceed. An example would help.
What units should the gain spectrum have?