The function signature for Wavefront.insert() indicates there is a choice to work with intensity or not, but this is not the case.
Both the docstring and the call to Field.insert are correct. Only the function definition needs to change here.
def insert(self, out, intensity=False, weight=1):
"""Directly insert wavefront intensity data into an output array.
This method can avoid repeatedly allocating large arrays of zeros
when accumulating :attr:`intensity`.
Parameters
----------
out : ndarray
Array to insert wavefront data into
weight : float
Scale factor applied to wavefront data
Returns
-------
out : ndarray
Array with wavefront data inserted into it at the appropriate location
"""
for field in lentil.field.reduce(*self.data):
out = lentil.field.insert(field, out, intensity=True, weight=weight)
return out
The function signature for
Wavefront.insert()
indicates there is a choice to work with intensity or not, but this is not the case.Both the docstring and the call to
Field.insert
are correct. Only the function definition needs to change here.