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
{{ message }}
Repository navigation
TypeError: argument tablename must be a string #25
It seems from __future__ import (unicode_literals)
in my script was producing the error.
from uvplot import export_uvtable export_uvtable('uvtable.txt', tb, vis= 'test.ms')
now runs smoothly.
I note a new error, export_uvtable('uvtable.txt', tb, split=split, split_args = {'vis': 'test.ms', 'outputvis': 'new.ms', 'datacolumn':'DATA', 'spw': '0'})
produces 'datacolumn CORRECTED_DATA is not available.'
This seems strange given that DATA column was asked for explicitly. Also, export_uvtable('uvtable.txt', tb, 'test.ms', datacolumn= 'DATA')
produces no such error.
Note, 'test.ms' only has one spw - spw0
was the responsible for the error about the string. It's fine not to use it.
Re the datacolumn error: datacolumn is not only a keyword in the split_arg dictionary, but is also a parameter of the export_uvtable function itself, which by default is set to CORRECTED_DATA: as a consequence, if you pass only datacolumn in the split_args dict, by default datacolumn will be CORRECTED_DATA anyway.
This is a bug that I should fix in future release.
Activity
mtazzari commentedon Apr 25, 2018
I tried on CASA 4.7.0 and I am not able to reproduce the error.
I run
and I got no error.
Have you tried typing the command manually instead of copy-pasting it?
Which version of CASA are you using?
mtazzari commentedon Apr 26, 2018
I am trying it out with CASA 5.1.
In the meanwhile, try adding a
str()command such asvis=str('test.ms'). Do you still get the error?Could you give more details on how you use the script?
I.e. a minimum working example and how you run it in CASA.
SBrownson commentedon Apr 26, 2018
It seems
from __future__ import (unicode_literals)in my script was producing the error.
from uvplot import export_uvtable export_uvtable('uvtable.txt', tb, vis= 'test.ms')now runs smoothly.
I note a new error,
export_uvtable('uvtable.txt', tb, split=split, split_args = {'vis': 'test.ms', 'outputvis': 'new.ms', 'datacolumn':'DATA', 'spw': '0'})produces
'datacolumn CORRECTED_DATA is not available.'This seems strange given that DATA column was asked for explicitly. Also,
export_uvtable('uvtable.txt', tb, 'test.ms', datacolumn= 'DATA')produces no such error.
Note, 'test.ms' only has one spw - spw0
mtazzari commentedon Apr 26, 2018
Ok, so
was the responsible for the error about the string. It's fine not to use it.
Re the datacolumn error:
datacolumnis not only a keyword in thesplit_argdictionary, but is also a parameter of theexport_uvtablefunction itself, which by default is set toCORRECTED_DATA: as a consequence, if you pass onlydatacolumnin thesplit_argsdict, by defaultdatacolumnwill beCORRECTED_DATAanyway.This is a bug that I should fix in future release.
For the time being, there are two viable options:
split_args=None,datacolumncan be provided,split_args, thendatacolumnoutside thesplit_argsmust be set to the same value as insidesplit_args, e.g.: