-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot plot arbitrarily-named data columns #64
Comments
Possible workaround is to flip this check on its head, and check for non-data and non-spectrum columns ( |
...but then again, I couldn't think of many use cases where a user would add a visibility column not ending with DATA! No, that just feels like pushing the lump in the carpet around... gotta be a better way... |
Come to think of it, how does dask-ms decide that arbitrarily-named column is of shape nrow,nfreq,ncorr, @sjperkins? Does it just assume every 3D column has that shape? Shadems should be copacetic. |
It shouldn't. You have to specify the dimension schema for non-standard columns otherwise it sets up the schema based on the column name. The appropriate point in the docs is the table_schema kwargs https://dask-ms.readthedocs.io/en/latest/api.html#daskms.xds_from_table. Without this, I'd expect the dimension schema for MYCOL to be something like |
Right, so non-standard columns need to be specified in the schema up front, or things will fall down anyway. Is there some way to look up the default schema via the API? I'm just trying to nail down what logic shadems should use to answer the question "is this a data-style column". Something like
|
In fact, there's a fair amount of this lurking in undocumented internal APIs At a more high level what might be more appropriate is the (undocumented) Table Descriptor Builder API in this directory: https://github.com/ska-sa/dask-ms/tree/master/daskms/descriptors Could do a zoom tomorrow to discuss? |
If you've got a code snippet for renaming a column I'm all eyes. |
I think this could simply be done in shadems as follows: for dataset in datasets:
user_data_cols = {}
for column, variable in dataset.data_vars.items():
if column.endswidth("DATA") and len(variable.dims) == 3:
user_data_cols[column] = (("row", "chan", "corr"), variable.data, variable.attrs)
dataset = dataset.assign(user_data_cols) The above from memory, but should work. |
python-casacore has a renamecol function.
…On Sun, 28 Jun 2020, 16:14 IanHeywood, ***@***.***> wrote:
...but then again, I couldn't think of many use cases where a user would
add a visibility column not ending with DATA!
If you've got a code snippet for renaming a column I'm all eyes.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#64 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA253ZCAG32OTYUZWJVZA2TRY5F3JANCNFSM4OKPOVSQ>
.
|
As simple at that! Cheers. |
Seems to have failed in a different way when I fall into line with my column names:
The
|
I've added a
DIR1
column for DD-cal purposes. I think this check is preventing me from plotting it:https://github.com/ratt-ru/shadeMS/blob/master/shade_ms/data_mappers.py#L135
I could call it
DIR1_DATA
as a workaround I guess, but I think it's friendlier to change the plotting tool rather than the plotting tool asking everyone to change their behaviour.The text was updated successfully, but these errors were encountered: