Even though extractPhotometry is supposed to compute synthetic photometry for a single spectrum (the dostring specifies that spec is a 1d array), the code expects a 2d array.
Photometry:|------------------------------------------------------------------------------------------| 0/271 0% [time: 00:00, eta: ?, ? iters/sec]Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.9/site-packages/pyphot/helpers.py", line 62, in extractPhotometry
s0 = spec[:, xl]
File "/usr/local/lib/python3.9/site-packages/pyphot/ezunits/pint.py", line 1143, in __getitem__
value = self._magnitude[key]
IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed
Line 62 in helpers.py could be changed from
s0 = spec[:, xl]
to either
s0 = spec[xl]
or
s0 = np.atleast_2d(spec)[:, xl]
Even though extractPhotometry is supposed to compute synthetic photometry for a single spectrum (the dostring specifies that
spec
is a 1d array), the code expects a 2d array.For example,
results in the following message:
Line 62 in helpers.py could be changed from
s0 = spec[:, xl]
to eithers0 = spec[xl]
ors0 = np.atleast_2d(spec)[:, xl]
@pscicluna