craftutils.wrap.psfex.Fittable2DModel.render(out=None, coords=None)

Evaluate a model at fixed positions, respecting the bounding_box.

The key difference relative to evaluating the model directly is that this method is limited to a bounding box if the Model.bounding_box attribute is set.

Parameters

outnumpy.ndarray, optional

An array that the evaluated model will be added to. If this is not given (or given as None), a new array will be created.

coordsarray-like, optional

An array to be used to translate from the model’s input coordinates to the out array. It should have the property that self(coords) yields the same shape as out. If out is not specified, coords will be used to determine the shape of the returned array. If this is not provided (or None), the model will be evaluated on a grid determined by Model.bounding_box.

Returns

outnumpy.ndarray

The model added to out if out is not None, or else a new array from evaluating the model over coords. If out and coords are both None, the returned array is limited to the Model.bounding_box limits. If Model.bounding_box is None, arr or coords must be passed.

Raises

ValueError

If coords are not given and the the Model.bounding_box of this model is not set.

Examples

Efficient Model Rendering with Bounding Boxes