hera_sim.interpolators.FreqInterpolator

class hera_sim.interpolators.FreqInterpolator(datafile, obj_type=None, **interp_kwargs)[source]

Frequency interpolator.

Parameters:
  • datafile (str) – Passed to the superclass constructor.

  • interp_kwargs (unpacked dict, optional) – Extends superclass interp_kwargs parameter by checking for the key ‘interpolator’ in the dictionary. The ‘interpolator’ key should have the value ‘poly1d’ or ‘interp1d’; these correspond to the np.poly1d and scipy.interpolate.interp1d objects, respectively. If the ‘interpolator’ key is not found, then it is assumed that a np.poly1d object is to be used for the interpolator object.

Raises:

AssertionError – This is raised if the choice of interpolator and the required type of the ref_file do not agree (i.e. trying to make a ‘poly1d’ object using a .npz file as a reference). An AssertionError is also raised if the .npz for generating an ‘interp1d’ object does not have the correct arrays in its archive.

Methods

__call__(freqs)

Evaluate the interpolation object at the given frequencies.