sax.interpolation module#

Simulation utilitites.

interpolate_xarray(xarr, /, *, f, **kwargs)[source]#
Parameters:
  • xarr (DataArray) –

  • f (Array) –

  • kwargs (Array) –

Return type:

dict[str, jax.Array]

evaluate_general_corner_model(data, params, strings, /, **kwargs)[source]#

Hypercube representation interpolator.

Parameters:
  • data (Array) – the data to interpolate (output of to_hypercube)

  • params (dict[str, jax.Array]) – the parameter sample points (output of to_hypercube)

  • strings (dict[str, dict[str, int]]) – non-interpolatable parameters (like strings) with their values (output of to_hypercube)

  • **kwargs (Array) – the values at which to interpolate the s-parameter. These values should be broadcastable into each other.

Returns:

the interpolated S-matrix at the values of **kwargs

Return type:

tuple[jax.Array, dict[str, int], dict[str, dict[str, int]]]

to_hypercube(stacked_data, wl_key='wl')[source]#

Converts a stacked dataframe into ‘hypercube’ representation.

Parameters:
  • stacked_data (DataFrame) – the data to convert

  • wl_key (str) – the main wavelength key.

Returns:

the data to interpolate (output of to_hypercube) params: the parameter sample points (output of to_hypercube) strings: non-interpolatable parameters (like strings)

with their values (output of to_hypercube)

Return type:

data

Returns:

the interpolated S-matrix at the values of **kwargs