pydda.cost_functions.J_function¶
-
pydda.cost_functions.
J_function
(winds, parameters)[source]¶ Calculates the total cost function. This typically does not need to be called directly as get_dd_wind_field is a wrapper around this function and
pydda.cost_functions.grad_J()
. In order to add more terms to the cost function, modify this function andpydda.cost_functions.grad_J()
.- Parameters
- winds: 1-D float array
The wind field, flattened to 1-D for f_min. The total size of the array will be a 1D array of 3*nx*ny*nz elements.
- parameters: DDParameters
The parameters for the cost function evaluation as specified by the
pydda.retrieval.DDParameters()
class.
- Returns
- J: float
The value of the cost function