You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just noticed that xds_from_ms silently fails to add the WEIGHT column to the dataset if the provided schema does not contain a tuple for 'dims'. Strangely, it also overwrites the dimension names of known columns like FLAG and DATA, regardless of whether 'dims' is a tuple or not. Seems to work as expected if not providing a schema.
What I Did
Running
from daskms import xds_from_ms
schema = {}
schema['WEIGHT'] = {'dims': ('corr')} # note the mistake here, 'dims' should be a tuple
xds = xds_from_ms('path/to/data.ms', columns=('DATA','WEIGHT','FLAG'), chunks={'row':-1, 'chan':8}, table_schema=schema)
which has everything as expected. This is fairly low priority but I thought I would report it anyway. dask-ms should either throw an error if 'dims' is not a tuple or just convert it to a tuple. Either way, the dimension names of known columns should not be altered.
The text was updated successfully, but these errors were encountered:
which has everything as expected. This is fairly low priority but I thought I would report it anyway. dask-ms should either throw an error if 'dims' is not a tuple or just convert it to a tuple. Either way, the dimension names of known columns should not be altered.
Without digging into the code in too much detail, I'd speculate that ("corr") translates to "corr" which is then treated as an Iterable so the the dims end up being evaluated as ("c", "o", "r", "r"). I'd need to dig more to understand why FLAG and DATA aren't getting assigned the default dimension names in this case.
Description
I just noticed that xds_from_ms silently fails to add the WEIGHT column to the dataset if the provided schema does not contain a tuple for 'dims'. Strangely, it also overwrites the dimension names of known columns like FLAG and DATA, regardless of whether 'dims' is a tuple or not. Seems to work as expected if not providing a schema.
What I Did
Running
will produce
Note the dimension names of DATA and FLAG. When giving schema a tuple for 'dims' i.e.
we get
Now WEIGHT is there but DATA and FLAG still have the wrong dimension names. If no schema is given, we get
which has everything as expected. This is fairly low priority but I thought I would report it anyway. dask-ms should either throw an error if 'dims' is not a tuple or just convert it to a tuple. Either way, the dimension names of known columns should not be altered.
The text was updated successfully, but these errors were encountered: