def run(self, data, memory=None, **kwargs):
"""
Run the adjoint NFFT on a batch of data
Parameters
----------
data: list of tuples
list of [(t, y, w), ...] containing
* ``t``: observation times
* ``y``: observations
* ``nf``: int, size of NFFT
memory:
**kwargs
Returns
-------
powers: list of np.ndarrays
List of adjoint NFFTs
"""
if not hasattr(self, 'prepared_functions') or \
not all([func in self.prepared_functions
for func in self.function_names]):
self._compile_and_prepare_functions(**kwargs)
if memory is None:
memory = self.allocate(data, **kwargs)
nfft_kwargs = dict(block_size=self.block_size)
nfft_kwargs.update(kwargs)
results = [nfft_adjoint_async(mem, self.function_tuple,
**nfft_kwargs)
for mem in memory]
return results
评论列表
文章目录