<casaxml xsi:schemaLocation="http://casa.nrao.edu/schema/casa.xsd file:///opt/casa/code/xmlcasa/xml/casa.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://casa.nrao.edu/schema/psetTypes.html">
<task category="import/export" name="importasdm2" type="function">
<shortdescription>Convert an ALMA Science Data Model observation into a CASA visibility file (MS)</shortdescription>
Convert an ALMA Science Data Model observation into a CASA visibility
file using the SDM tool(MS)
<param mustexist="true" kind="asdm" name="asdm" type="path">
<shortdescription>Name of input asdm directory (on disk)</shortdescription>
<description>Name of input ASDM file (directory)
Example: asdm='ExecBlock3'
<param kind="ms" name="vis" type="string">
<shortdescription>Root name of the ms to be created. Note the .ms is NOT added</shortdescription>
<description>Root ms name.
Note that a prefix (.ms) is NOT appended to this
<param name="createmms" type="bool">
<shortdescription>Create a Multi-MS output</shortdescription>
<description>Create a Multi-MS partitioned according to the given
For more detailed documentation on partition,
Multi-MS and the MPI use in CASA, please see CASA
Docs (https://casa.nrao.edu/casadocs/).
<param subparam="true" ignorecase="true" name="separationaxis" type="string">
<shortdescription>Axis to do parallelization across (scan, spw, baseline, auto)</shortdescription>
<description>Axis to do parallelization across
Options: 'scan', 'spw', 'baseline', 'auto'
* auto: will partition per scan/spw to obtain
optimal load balancing with the following
1 - Maximize the scan/spw/field distribution
2 - Generate sub-MSs with similar size
* 'scan' or 'spw': will partition the MS into
scan or spw. The individual sub-MSs may not be
balanced with respect to the number of rows.
* 'baseline': mostly useful for Single-Dish
data. This axis will partition the MS based on
the available baselines. If the user wants only
auto-correlations, use the
ocorr_mode='ao'. Note that if numsubms='auto',
partition will try to create as many subMSs as
the number of available servers in the
cluster. If the user wants to have one subMS
for each baseline, set the numsubms parameter
to a number higher than the number of baselines
<allowed ignorecase="true" kind="enum">
<param subparam="true" name="numsubms" type="any">
<shortdescription>The number of SubMSs to create (auto or any number)</shortdescription>
<description>The number of sub-MSs to create in the Multi-Ms.
Options: any integer number (example: numsubms=4)
The default 'auto' is to partition using the
number of available servers given when launching
CASA. If the task is unable to determine the
number of running servers, or the user did not
start CASA using mpicasa, numsubms will use 8 as
Example: Launch CASA with 5 engines, where 4
of them will be used to create the MMS (the
first engine is used as the MPIClient):
mpicasa -n 5 casa --nogui --log2term
CASA> importasdm2('uid__A1', createmms=True)
<type>string</type><type>int</type>
<value type="string">auto</value>
<param name="corr_mode" type="string">
<shortdescription>Specifies the correlation mode to be considered on input. A quoted string containing a sequence of ao, co, ac,or all separated by whitespaces is expected</shortdescription>
<description>Correlation mode to be considered on input.
Options: ao, co, ac, or all
<param name="srt" type="string">
<shortdescription>Specifies the spectral resolution type to be considered on input. A quoted string containing a sequence of fr, ca, bw, or all separated by whitespaces is expected</shortdescription>
<description>Spectral resolution type.
Options: fr, ca, bw, or all
<param name="time_sampling" type="string">
<shortdescription>Specifies the time sampling (INTEGRATION and/or SUBINTEGRATION) to be considered on input. A quoted string containing a sequence of i, si, or all separated by whitespaces is expected</shortdescription>
<description>Specifies the time sampling (INTEGRATION and/or
SUBINTEGRATION) to be considered on input.
A quoted string containing a sequence of i, si,
or all separated by whitespaces is expected
<param name="ocorr_mode" type="string">
<shortdescription>Output data for correlation mode AUTO_ONLY (ao) or CROSS_ONLY (co) or CROSS_AND_AUTO (ca)</shortdescription>
<description>Output data for correlation mode AUTO_ONLY (ao) or
CROSS_ONLY (co) or CROSS_AND_AUTO (ca)
<param name="compression" type="bool">
<shortdescription>Flag for turning on data compression</shortdescription>
<description>Produce compressed columns in the resulting measurement
<param name="lazy" type="bool">
<shortdescription>Make the MS DATA column read the ASDM Binary data directly (faster import, smaller MS)</shortdescription>
<description>Make the MS DATA column read the ASDM Binary data
directly (faster import, smaller MS).
Instead of writing a copy of the visibilities
into a standard DATA column, lazy=True will make
importasdm2 only write a lookup-table such that
later access to the DATA column will read the
ASDM binary visibility data directly. This
requires that the ASDM not be removed from its
location as long the the DATA column is
needed. Use method ms.asdmref() to query and
manipulate the reference to the ASDM.
lazy=True will save ca. 50% disk space and
accelerate the DATA column access by
ca. 10%. lazy=True will only work when there is
visibility data in the ASDM, not with pure
<param name="asis" type="string">
<shortdescription>Creates verbatim copies of the ASDMtables in the ouput measurement set. Value given must be a string of table names separated by spaces; A * wildcard is allowed.</shortdescription>
<description>Creates verbatim copies of the ASDM tables in the output
The value given to this option must be a list of
table names separated by space characters; the
wildcard character '*' is allowed in table
<param name="wvr_corrected_data" type="string">
<shortdescription>Specifies which values are considerd in the SDM binary data to fill the DATA column in the MAIN table of the MS; yes for corrected, no for uncorrected, both for corrected and uncorrected (resulting in two MSs)</shortdescription>
<description>Specifies which values are considerd in the ASDM binary
data to fill the DATA column in the MAIN table of the MS.
* both: for corrected and uncorrected data. Note
if both is selected, two measurement sets are
created, one with uncorrected data and the
other with corrected data (which name is
suffixed by '-wvr-corrected')
<param name="scans" type="string">
<shortdescription>Processes only the specified scans. A scan specification consists in an exec bock index followed by the : character, followed by a comma separated list of scan indexes or scan index ranges. (e.g. 0:1;1:2~6,8;2:,3:24~30)</shortdescription>
<description>Processes only the scans specified in the option's value.
Default: none (all scans)
This value is a semicolon separated list of scan
specifications. A scan specification consists in
an exec bock index followed by the character ':'
followed by a comma separated list of scan
indexes or scan index ranges. A scan index is
relative to the exec block it belongs to. Scan
indexes are 1-based while exec blocks's are
'3:' alone will be interpreted as 'all the
scans of the exec block#3'. An scan index or a
scan index range not preceded by an exec block
index will be interpreted as 'all the scans
with such indexes in all the exec blocks'.
<param name="ignore_time" type="bool">
<shortdescription>All the rows of the tables Feed, History, Pointing, Source, SysCal, CalDevice, SysPower, and Weather are processed independently of the time range of the selected exec block / scan.</shortdescription>
<description>All the rows of the tables Feed, History, Pointing,
Source, SysCal, CalDevice, SysPower, and Weather are processed
independently of the time range of the selected exec block / scan.
<param name="process_syspower" type="bool">
<shortdescription>Process the SysPower table?</shortdescription>
<description> The SysPower table is processed if and only if this
parameter is set to true.
<param name="process_caldevice" type="bool">
<shortdescription>Process the CalDevice table?</shortdescription>
<description>The CalDevice table is processed if and only if this
parameter is set to true.
<param name="process_pointing" type="bool">
<shortdescription>Process the Pointing table?</shortdescription>
<description>The Pointing table is processed if and only if this
parameter is set to true.
If set to False, the POINTING table is empty in
<param name="process_flags" type="bool">
<shortdescription>Create online flags in the FLAG_CMD sub-table?</shortdescription>
<description>Create online flags based on the Flag.xml, Antenna.xml
and SpectralWindow.xml files and copy them to the FLAG_CMD sub-table
The flags will NOT be applied unless the
parameter applyflags is set to True. Optionally,
the flags can also be saved to an external ASCII
file if savecmds is set to True.
<param subparam="true" name="tbuff" type="double">
<shortdescription>Time padding buffer (seconds)</shortdescription>
<description>Time padding buffer (seconds)
Subparameter of process_flags=True
NOTE: this time is in seconds. You should
currently set the value of tbuff to be 1.5x the
correlator integration time if greater than 1
second. For example, if the SDM has integrations
of 3 seconds, set tbuff=4.5. Likewise, set
tbuff=15.0 for 10-sec integrations.
<param subparam="true" name="applyflags" type="bool">
<shortdescription>Apply the flags to the MS.</shortdescription>
<description>Apply the online flags to the MS.
Subparameter of process_flags=True
<param subparam="true" name="savecmds" type="bool">
<shortdescription>Save flag commands to an ASCII file</shortdescription>
<description>Save the flag commands to an ASCII file given by the
Subparameter of process_flags=True
<param subparam="true" name="outfile" type="any">
<shortdescription>Name of ASCII file to save flag commands</shortdescription>
<description>Filename or list of filenames where to save the online
Subparameter of process_flags=True
Default: '' (it will save on a filename composed
from the MS name(s).) E.g., for vis='uid_A02.ms',
the outfile will be 'uid_A02_cmd.txt'.
<type>string</type><type>stringVec</type>
<param name="flagbackup" type="bool">
<shortdescription>Back up flag column before applying flags.</shortdescription>
<description>Back up flag column before applying flags.
<param name="verbose" type="bool">
<shortdescription>Output lots of information while the filler is working</shortdescription>
<description>Produce log output as importasdm2 is being run
<param name="overwrite" type="bool">
<shortdescription>Over write an existing MS(s)</shortdescription>
<description>Over write an existing MS(s) or MS(s), if the option
wvr_corrected_data='both'
Default: False (do not overwrite)
NOTE: the overwrite parameter affects all the
output of the task. If any of the following
exist, it will not overwrite them. MS(s),
.flagversions, online flag files. When set to
True, it will overwrite the MS, .flagversions and
<param name="showversion" type="bool">
<shortdescription>Report the version of importasdm2 being used</shortdescription>
<description>Report the version of importasdm2 being used
<equals value="False" type="bool"/>
<equals value="True" type="bool">
<default param="separationaxis"><value type="string">auto</value></default>
<default param="numsubms"><value type="string">auto</value></default>
<when param="process_flags">
<equals value="True" type="bool">
<default param="tbuff"><value type="float">0.0</value></default>
<default param="applyflags"><value type="bool">False</value></default>
<default param="savecmds"><value type="bool">False</value></default>
<default param="outfile"><value type="string"/></default>
<equals value="False" type="bool"/>
<param name="useversion" type="string">
<shortdescription>Version of importasdm to be used (v3 default, should work for all data)</shortdescription>
<description>Version of importasdm to be used
Default: 'v3' (should work for all data)
<param name="bdfflags" type="bool">
<shortdescription>Set the MS FLAG column according to the ASDM _binary_ flags</shortdescription>
<description>Set the MS FLAG column according to the ASDM _binary_
<param name="with_pointing_correction" type="bool">
<shortdescription>Add (ASDM::Pointing::encoder - ASDM::Pointing::pointingDirection) to the value to be written in MS::Pointing::direction</shortdescription>
<description>Add (ASDM::Pointing::encoder -
ASDM::Pointing::pointingDirection) to the value to be written in
<param name="convert_ephem2geo" type="bool">
<shortdescription>if True, convert any attached ephemerides to the GEO reference frame (time-spacing not changed)</shortdescription>
<description>if True, convert any attached ephemerides to the GEO
reference frame (time-spacing not changed)
ALMA uses ephemerides with observer location
equal to the ALMA site. For later processing of
the radial velocity information in, e.g. cvel, a
geocentric ephemeris is needed. Setting this
option to True will perform the conversion of
positions and velocities on all attached
ephemerides in the imported MS. This will neither
change the time-spacing nor the duration of the
ephemeris. No interpolation in time is done.
<param name="polyephem_tabtimestep" type="double">
<shortdescription>Timestep (days) for the tabulation of polynomial ephemerides. A value <= 0 disables tabulation.</shortdescription>
<description>Timestep (days) for the tabulation of polynomial
ephemerides. A value less than or equal to 0 disables tabulation.
Presently, VLA data can contain polynomial
ephemerides. ALMA data uses tabulated values.
FOR MORE INFORMATION, SEE THE TASK PAGES OF IMPORTASDM IN CASA DOCS:
https://casa.nrao.edu/casadocs/