interpolate_amp

nrv.optim.optim_utils.interpolate_amp(position: <MagicMock name='mock.ndarray' id='139958332223088'>, t_sim: float = 100, t_end: float = None, dt: float = 0.005, intertype: str = 'Spline', bounds: tuple[float] = (0, 0), save: bool = False, filename: str = 'interpolate_part.dat', save_scale: bool = False) <MagicMock name='mock.ndarray' id='139958332223088'>[source]

genarte a waveform from a particle position using interpolate where the position values are the output waveform amplitudes at constant sample rate

Parameters:
  • position (array) – particle position in n dimension output waveform amplitudes at regular times

  • t_sim (float) – simulation time (ms), by default 100

  • dt (float) – time step of the simulation (ms), by default 0.005

  • intertype (str) –

    type of interpolation perform, by default ‘Spline’ type possibly:

    • ’Spline’ : Cubic spline interpolation

  • bounds (tupple) – limit range of the interpolation, if both equal no limit,by default (0,0)

  • save (bool) – save or not the output in a .dat file, by default False

  • filename (str) – name of the file on wich the output should be saved, by default ‘interpolate_part.dat’

Returns:

waveform – result of the interpolation

Return type:

np.ndarray