|NRAO Home > CASA > CASA Toolkit Reference Manual||
1.3.2 Get the IDs of the specified spw names.
Get the IDs of the specified spw(s). Returns a dictionary where the keys are the requested spectral window names that are present in the data set and the values are arrays of the spectral window IDs corresponding to the name. If a specified name is not present, a warning message is logged and that name is not included in the returned dictionary. Specifying no names results in a dictionary containing the name to spw ID mapping for the entire data set.
Names of the spws for which IDs are needed (string or string array). Unspecified will return all spw names.
# get the IDs for spws named "CO" and "HCN"
spw_ids = msmd.spwsfornames(["CO", "HCN"])
# get the complete spw name to ID map
spw_names_to_ids = msmd.spwsfornames()
More information about CASA may be found at the CASA web page
Copyright © 2016 Associated Universities Inc., Washington, D.C.