diff --git a/shade_ms/data_mappers.py b/shade_ms/data_mappers.py index cadee9a..d6b6d16 100644 --- a/shade_ms/data_mappers.py +++ b/shade_ms/data_mappers.py @@ -66,15 +66,15 @@ def __init__(self, fullname, unit, mapper, column=None, extras=[], conjugate=Fal CHAN = DataMapper("channel", "", column=False, axis=1, extras=["chans"], mapper=lambda x,chans: chans, const=True), FREQ = DataMapper("frequency", "Hz", column=False, axis=1, extras=["freqs"], mapper=lambda x, freqs: freqs, const=True), WAVEL = DataMapper("wavelength", "m", column=False, axis=1, extras=["wavel"], mapper=lambda x, wavel: wavel, const=True), - UV = DataMapper("uv-distance", "wavelengths", column="UVW", extras=["wavel"], + uv = DataMapper("uv-distance", "wavelengths", column="UVW", extras=["wavel"], mapper=lambda uvw, wavel: da.sqrt((uvw[:,:2]**2).sum(axis=1))/wavel), - U = DataMapper("u", "wavelengths", column="UVW", extras=["wavel"], + u = DataMapper("u", "wavelengths", column="UVW", extras=["wavel"], mapper=lambda uvw, wavel: uvw[:, 0] / wavel, conjugate=True), - V = DataMapper("v", "wavelengths", column="UVW", extras=["wavel"], + v = DataMapper("v", "wavelengths", column="UVW", extras=["wavel"], mapper=lambda uvw, wavel: uvw[:, 1] / wavel, conjugate=True), - W = DataMapper("w", "wavelengths", column="UVW", extras=["wavel"], + w = DataMapper("w", "wavelengths", column="UVW", extras=["wavel"], mapper=lambda uvw, wavel: uvw[:, 2] / wavel, conjugate=True), )