foxes.models.turbine_models.Calculator(in_vars, out_vars, func, **kwargs)[source]

Constructor.

Parameters

in_vars: list of str

The input farm variables

out_vars: list of str

The output variables

func: Function

The function: f(in0, in1, …, algo, mdata, fdata, st_sel) -> (out0, out1, …) where inX and outY are numpy.ndarrays and st_sel is the state-turbine selection slice or array. All arrays have shape (n_states, n_turbines).

Beware that the turbine ordering in fdata is in downwind order, hence external data X of shape (n_states, n_turbines) in farm order needs to be reordered by X[ssel, order] with ssel = fdata[FV.ORDER_SSEL], order = fdata[FV.ORDER] before using it in combination with fdata variables.

kwargs: dict, optional

Additional arguments for TurbineModel