galpynostatic.base (dev module)

Classes common to different modules.

class galpynostatic.base.MapSpline(dataset)

Bases: object

Spline of a discrete map dataset.

Parameters:

dataset (pandas.DataFrame) – Dataset with the discrete map data points of the maximum State-of-Charge (SOC) values as a function of the internal parameters \(\log(\ell)\) and \(\log(\Xi)\), this can be loaded using the functions of the galpynostatic.datasets submodule. See the Notes in the galpynostatic.model module to know the restrictions of these dataframe.

logells_

Unique \(\ell\) values defined in the dataset.

Type:

numpy.ndarray

logxis_

Unique \(\Xi\) values defined in the dataset.

Type:

numpy.ndarray

spline_

Bivariate spline approximation over the discrete dataset.

Type:

scipy.interpolate.RectBivariateSpline

soc(logell, logxi, grid=False)

Predicts the maximum SOC values using the map spline.

This is a linear function of the spline bounded in [0, 1], values outside this range are taken to the corresponding endpoint.

Parameters:
  • logell (numpy.ndarray) – Log 10 value of \(\ell\) parameter.

  • logxi (numpy.ndarray) – Log 10 value of \(\Xi\) parameter.

  • grid (bool, default=False) – Whether to evaluate the results on a grid spanned by the input arrays, or at points specified by the input arrays, i.e. True is a grid and False only the ordered pairs.

Returns:

soc – The corresponding maximum SOC values in the map spline.

Return type:

numpy.ndarray