Although the documentation states that the header keyword is optional, when loading a pure Numpy 2D array, the code
fails with:
Traceback (most recent call last):
File "", line 1, in
File "/Users/tepper/Library/Python/3.9/lib/python/site-packages/turbustat/statistics/pspec_bispec/pspec.py", line 44, in init
self.input_data_header(img, header, need_copy=False)
File "/Users/tepper/Library/Python/3.9/lib/python/site-packages/turbustat/statistics/base_statistic.py", line 121, in input_data_header
raise ValueError("When data is given as a numpy array, a FITS "
ValueError: When data is given as a numpy array, a FITS header must be given using the header keyword argument.
Error reproducible with the following code snippet:
import numpy as np
from turbustat.statistics import PowerSpectrum
image = np.zeros((1000,1000))
image[::2,::2] = 1.
pspec = PowerSpectrum(image) # fails