Open jdtsmith opened 4 months ago
QTable
doesn't seem to like masking. So possibly better is the new (but experimental) Masked
class:
import numpy as np
import astropy.units as u
from astropy.utils.masked import Masked
PAR_DTYPE = np.dtype([("val", "f"), ("min", "f"), ("max", "f")])
a = np.ma.array([(np.pi, 2, 4.5), (np.pi / 2, 1, np.nan), (4, np.nan, np.nan)], dtype=PAR_DTYPE, mask=[1, 0, 0])
t['power'] = Masked(a) * u.MJy/u.sr
t.pprint()
Perhaps for down the road.
See this note. As-is we can't take say, a power value from the
Features
table and use it directly in a unitful calculation (e.g. multiply by a solid angle and 4pid_L**2).