Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203

204

205

206

207

208

209

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

234

235

236

237

238

239

240

241

242

243

244

245

246

247

248

249

250

251

252

253

254

255

256

257

258

259

260

261

262

263

264

265

266

267

268

269

270

271

272

273

274

275

276

277

278

279

280

281

282

283

284

285

286

287

288

289

290

291

292

293

294

295

296

297

298

299

300

301

302

303

304

305

306

307

308

309

310

311

312

313

314

315

316

317

318

319

320

321

322

323

324

325

326

327

328

329

330

331

332

333

334

335

336

337

338

339

340

341

342

343

344

345

346

347

348

349

350

351

352

353

354

355

356

357

358

359

360

361

362

363

364

365

366

367

368

369

370

371

372

373

374

375

376

377

378

379

380

381

382

383

384

385

386

387

388

389

390

391

392

393

394

395

396

397

398

399

400

401

402

403

404

405

406

407

408

409

410

411

412

413

414

415

416

417

418

419

420

421

422

423

424

425

426

427

428

429

430

431

432

433

434

435

436

437

438

439

440

441

442

443

444

445

446

447

448

449

450

451

452

453

454

455

456

457

458

459

460

461

462

463

464

465

466

467

468

469

470

471

472

473

474

475

476

477

478

479

480

481

482

483

484

485

486

487

488

489

490

491

492

493

494

495

496

497

498

499

500

501

502

503

504

505

506

507

508

509

510

511

512

513

514

515

516

517

518

519

520

521

522

523

524

525

526

527

528

529

530

531

532

533

534

535

536

537

538

539

540

541

542

543

544

545

546

547

548

549

550

551

552

553

554

555

556

557

558

559

560

561

562

563

564

565

566

567

568

569

570

571

572

573

574

575

576

577

578

579

580

581

582

583

584

585

586

587

588

589

590

591

592

593

594

595

596

597

598

599

600

601

602

603

604

605

606

607

608

609

610

611

612

613

614

615

616

617

618

619

620

621

622

623

624

625

626

627

628

629

630

631

632

633

634

635

636

637

638

639

640

641

642

643

644

645

646

647

648

649

650

651

652

653

654

655

656

657

658

659

660

661

662

663

664

665

666

667

668

669

670

671

672

673

674

675

676

677

678

679

680

681

682

683

684

685

686

687

688

689

690

691

692

693

694

695

696

697

698

699

700

701

702

703

704

705

706

707

708

709

710

711

712

713

714

715

716

717

718

719

720

721

722

723

724

725

726

727

728

729

730

731

732

733

734

735

736

737

738

739

740

741

742

743

744

745

746

747

748

749

750

751

752

753

754

755

756

757

758

759

760

761

762

763

764

765

766

767

768

769

770

771

772

773

774

775

776

777

778

779

780

781

782

783

784

785

786

787

788

789

790

791

792

793

794

795

796

797

798

799

800

801

802

803

804

805

806

807

808

809

810

811

812

813

814

815

816

817

818

819

820

821

822

823

824

825

826

827

828

829

830

831

832

833

834

835

836

837

838

839

840

841

842

843

844

845

846

847

848

849

850

851

852

853

854

855

856

857

858

859

860

861

862

863

864

865

866

867

868

869

870

871

872

873

874

875

876

877

878

879

880

881

882

883

884

885

886

887

888

889

890

891

892

893

894

895

896

897

898

899

900

901

902

903

904

905

906

907

908

909

910

911

912

913

914

915

916

917

918

919

920

921

922

923

924

925

926

927

928

929

930

931

932

933

934

935

936

937

938

939

940

941

942

943

944

945

946

947

948

949

950

951

952

953

954

955

956

957

958

959

960

961

962

963

964

965

966

967

968

969

970

971

972

973

974

975

976

977

978

979

980

981

982

983

984

985

986

987

988

989

990

991

992

993

994

995

996

997

998

999

1000

1001

1002

1003

1004

1005

1006

1007

1008

1009

1010

1011

1012

1013

1014

1015

1016

1017

1018

1019

1020

1021

1022

1023

1024

1025

1026

1027

1028

1029

1030

1031

1032

1033

1034

1035

1036

1037

1038

1039

1040

1041

1042

1043

1044

1045

1046

1047

1048

1049

1050

1051

1052

1053

1054

1055

1056

1057

1058

1059

1060

1061

1062

1063

1064

1065

1066

1067

1068

1069

1070

1071

1072

1073

1074

1075

1076

1077

1078

1079

1080

1081

1082

1083

1084

1085

1086

1087

1088

1089

1090

1091

1092

1093

1094

1095

1096

1097

1098

1099

1100

1101

1102

1103

1104

1105

1106

1107

1108

1109

1110

1111

1112

1113

1114

1115

1116

1117

1118

1119

1120

1121

1122

1123

1124

1125

1126

1127

1128

1129

1130

1131

1132

1133

1134

1135

1136

1137

1138

1139

1140

1141

1142

1143

1144

1145

1146

1147

1148

1149

1150

1151

1152

1153

1154

1155

1156

1157

1158

1159

1160

1161

1162

1163

1164

1165

1166

1167

1168

1169

1170

1171

1172

1173

1174

1175

1176

1177

1178

1179

1180

1181

1182

1183

1184

1185

1186

1187

1188

1189

1190

1191

1192

1193

1194

1195

1196

1197

1198

1199

1200

1201

1202

1203

1204

1205

1206

1207

1208

1209

1210

1211

1212

1213

1214

1215

1216

1217

1218

1219

1220

1221

1222

1223

1224

1225

1226

1227

1228

1229

1230

1231

1232

1233

1234

1235

1236

1237

1238

1239

1240

1241

1242

1243

1244

1245

1246

1247

1248

1249

1250

1251

1252

1253

1254

1255

1256

1257

1258

1259

1260

1261

1262

1263

1264

1265

1266

1267

1268

1269

1270

1271

1272

1273

1274

1275

1276

1277

1278

1279

1280

1281

1282

1283

1284

1285

1286

1287

1288

1289

1290

1291

1292

1293

1294

1295

1296

1297

1298

1299

1300

1301

1302

1303

1304

1305

1306

1307

1308

1309

1310

1311

1312

1313

1314

1315

1316

1317

1318

1319

1320

1321

1322

1323

1324

1325

1326

1327

1328

1329

1330

1331

1332

1333

1334

1335

1336

1337

1338

1339

1340

1341

1342

1343

1344

1345

1346

1347

1348

1349

1350

1351

1352

1353

1354

1355

1356

1357

1358

1359

1360

1361

1362

1363

1364

1365

1366

1367

1368

1369

1370

1371

1372

1373

1374

1375

1376

1377

1378

1379

1380

1381

1382

1383

1384

1385

1386

1387

1388

1389

1390

1391

1392

1393

1394

1395

1396

1397

1398

1399

1400

1401

1402

1403

1404

1405

1406

1407

1408

1409

1410

1411

1412

1413

1414

1415

1416

1417

1418

1419

1420

1421

1422

1423

1424

1425

1426

1427

1428

1429

1430

1431

1432

1433

1434

1435

1436

1437

1438

1439

1440

1441

1442

1443

1444

1445

1446

1447

1448

1449

1450

1451

1452

1453

1454

1455

1456

1457

1458

1459

1460

1461

1462

1463

1464

1465

1466

1467

1468

1469

1470

1471

1472

1473

1474

1475

1476

1477

1478

1479

1480

1481

1482

1483

1484

1485

1486

1487

1488

1489

1490

1491

1492

1493

1494

1495

1496

1497

1498

1499

1500

1501

1502

1503

1504

1505

1506

1507

1508

1509

1510

1511

1512

1513

1514

1515

1516

1517

1518

1519

1520

1521

1522

1523

1524

1525

1526

1527

1528

1529

1530

1531

1532

1533

1534

1535

1536

1537

1538

1539

1540

1541

1542

1543

1544

1545

1546

1547

1548

1549

1550

1551

1552

1553

1554

1555

1556

1557

1558

1559

1560

1561

1562

1563

1564

1565

1566

1567

1568

1569

1570

1571

1572

1573

1574

1575

1576

1577

1578

1579

1580

1581

1582

1583

1584

1585

1586

1587

1588

1589

1590

1591

1592

1593

1594

1595

1596

1597

1598

1599

1600

1601

1602

1603

1604

1605

1606

1607

1608

1609

1610

1611

1612

1613

1614

1615

1616

1617

1618

1619

1620

1621

1622

1623

1624

1625

1626

1627

1628

1629

1630

1631

1632

1633

1634

1635

1636

1637

1638

1639

1640

1641

1642

1643

1644

1645

1646

1647

1648

1649

1650

1651

1652

1653

1654

1655

1656

1657

1658

1659

1660

1661

1662

1663

1664

1665

1666

1667

1668

1669

1670

1671

1672

1673

1674

1675

1676

1677

1678

1679

1680

1681

1682

1683

1684

1685

1686

1687

1688

1689

1690

1691

1692

1693

1694

1695

1696

1697

1698

1699

1700

1701

1702

1703

1704

1705

1706

1707

1708

1709

1710

1711

1712

1713

1714

1715

1716

1717

1718

1719

1720

1721

1722

1723

1724

1725

1726

1727

1728

1729

1730

1731

1732

1733

1734

1735

1736

1737

1738

1739

1740

1741

1742

1743

1744

1745

1746

1747

1748

1749

1750

1751

1752

1753

1754

1755

1756

1757

1758

1759

1760

1761

1762

1763

1764

1765

1766

1767

1768

1769

1770

1771

1772

1773

1774

1775

1776

1777

1778

1779

1780

1781

1782

1783

1784

1785

1786

1787

1788

1789

1790

1791

1792

1793

1794

1795

1796

1797

1798

1799

1800

1801

1802

1803

1804

1805

1806

1807

1808

1809

1810

1811

1812

1813

1814

1815

1816

1817

1818

1819

1820

1821

1822

1823

1824

1825

1826

1827

1828

1829

1830

1831

1832

1833

1834

1835

1836

1837

1838

1839

1840

1841

1842

1843

1844

1845

1846

1847

1848

1849

1850

1851

1852

1853

1854

1855

1856

1857

1858

1859

1860

1861

1862

1863

1864

1865

1866

1867

1868

1869

1870

1871

1872

1873

1874

1875

1876

1877

1878

1879

1880

1881

1882

1883

1884

1885

1886

1887

1888

1889

1890

1891

1892

1893

1894

1895

1896

1897

1898

1899

1900

1901

1902

1903

1904

1905

1906

1907

1908

1909

1910

1911

1912

1913

1914

1915

1916

1917

1918

1919

1920

1921

1922

1923

1924

1925

1926

1927

1928

1929

1930

1931

1932

1933

1934

1935

1936

1937

1938

1939

1940

1941

1942

1943

# This file was automatically generated by SWIG (http://www.swig.org). 

# Version 2.0.4 

# 

# Do not make changes to this file unless you know what you are doing--modify 

# the SWIG interface file instead. 

 

 

 

from sys import version_info 

if version_info >= (2,6,0): 

    def swig_import_helper(): 

        from os.path import dirname 

        import imp 

        fp = None 

        try: 

            fp, pathname, description = imp.find_module('_msmetadata', [dirname(__file__)]) 

        except ImportError: 

            import _msmetadata 

            return _msmetadata 

        if fp is not None: 

            try: 

                _mod = imp.load_module('_msmetadata', fp, pathname, description) 

            finally: 

                fp.close() 

            return _mod 

    _msmetadata = swig_import_helper() 

    del swig_import_helper 

else: 

    import _msmetadata 

del version_info 

try: 

    _swig_property = property 

except NameError: 

    pass # Python < 2.2 doesn't have 'property'. 

def _swig_setattr_nondynamic(self,class_type,name,value,static=1): 

    if (name == "thisown"): return self.this.own(value) 

    if (name == "this"): 

        if type(value).__name__ == 'SwigPyObject': 

            self.__dict__[name] = value 

            return 

    method = class_type.__swig_setmethods__.get(name,None) 

    if method: return method(self,value) 

    if (not static): 

        self.__dict__[name] = value 

    else: 

        raise AttributeError("You cannot add attributes to %s" % self) 

 

def _swig_setattr(self,class_type,name,value): 

    return _swig_setattr_nondynamic(self,class_type,name,value,0) 

 

def _swig_getattr(self,class_type,name): 

    if (name == "thisown"): return self.this.own() 

    method = class_type.__swig_getmethods__.get(name,None) 

    if method: return method(self) 

    raise AttributeError(name) 

 

def _swig_repr(self): 

    try: strthis = "proxy of " + self.this.__repr__() 

    except: strthis = "" 

    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) 

 

try: 

    _object = object 

    _newclass = 1 

except AttributeError: 

    class _object : pass 

    _newclass = 0 

 

 

class msmetadata(_object): 

    """Proxy of C++ casac::msmetadata class""" 

    __swig_setmethods__ = {} 

    __setattr__ = lambda self, name, value: _swig_setattr(self, msmetadata, name, value) 

    __swig_getmethods__ = {} 

    __getattr__ = lambda self, name: _swig_getattr(self, msmetadata, name) 

    __repr__ = _swig_repr 

    def __init__(self): 

        """__init__(self) -> msmetadata""" 

        this = _msmetadata.new_msmetadata() 

        try: self.this.append(this) 

        except: self.this = this 

    __swig_destroy__ = _msmetadata.delete_msmetadata 

    __del__ = lambda self : None; 

    def almaspws(self, chavg = False, fdm = False, sqld = False, tdm = False, 

    wvr = False, complement = False): 

        """ 

        almaspws(self, chavg = False, fdm = False, sqld = False, tdm = False,  

            wvr = False, complement = False) -> std::vector<(int)> 

 

        Summary 

                Get a list of spectral window IDs with ALMA-specific attributes. 

 

        Description 

                 

                        Get spectral window IDs based on ALMA-specific criteria. The inputs are or'ed together 

                        to form the returned list. If complement=True, then the complement of the selection 

                        is returned. 

                     

 

        Input Parameters: 

                chavg            Get channel average spectral windows? false  

                fdm              Get FDM spectral windows? false  

                sqld             Get square law (i.e. total power) detector spectral windows? false  

                tdm              Get TDM spectral windows? false  

                wvr              Get WVR spectral windows? false  

                complement       Return the complement of the selected set? false  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get all square law detector spectral window IDs 

            msmd.almaspws(sqld=True) 

            # get all spectral window IDs other than those associated with square law detectors 

            msmd.almaspws(sqld=True, complement=True) 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_almaspws(self, chavg, fdm, sqld, tdm, wvr, complement) 

 

    def antennaids(self, *args, **kwargs): 

        """ 

        antennaids(self, name = initialize_variant(""), mindiameter = initialize_variant("0m"),  

            maxdiameter = initialize_variant("1pc")) -> std::vector<(int)> 

 

        Summary 

                Get the zero-based antenna ID for the specfied antenna name. 

 

        Description 

                 

                        Get the zero-based antenna IDs for the specfied antenna names and the specified diameter 

                        range. An array of unique IDs in order of the specified names is returned. 

                        If no names and no diameter range is specified, all IDs are returned. 

                     

 

        Input Parameters: 

                name             Antenna names (string or string array) for which to get the corresponding IDs. Note that * matches any number of characters of all character classes.  

                mindiameter      Minimum antenna diameter, expressed as a quantity. 0m  

                maxdiameter      Maximum antenna diameter, expressed as a quantity. 1pc  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the zero-based antenna IDs for the antenna named 'VB2' 

            antenna_id = msmd.antennaids('VB2')[0] 

            # get the zero-based antenna IDs for all antennas with diameters between 9m and 11m 

            antenna_ids = msmd.antennaids(mindiameter='9m', maxdiameter=qa.quantity('11m')) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_antennaids(self, *args, **kwargs) 

 

    def antennanames(self, *args, **kwargs): 

        """ 

        antennanames(self, antennaids = initialize_variant("-1 -1")) -> std::vector<(std::string)> 

 

        Summary 

                Get the names of the antennas for the specfied zero-based antenna IDs. 

 

        Description 

                 

                        Get the name of the antenna for the specfied zero-based antenna ID. If antennaids is not specified, 

                        all antenna names are returned. 

                     

 

        Input Parameters: 

                antennaids       Zero-based antenna IDs (int or int array) for which to get the antenna names. -1 -1  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the name associated with antenna ID 31 

            antenna_name = msmd.antennanames(31)[0] 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_antennanames(self, *args, **kwargs) 

 

    def antennaoffset(self, *args, **kwargs): 

        """ 

        antennaoffset(self, which = initialize_variant("0")) -> record 

 

        Summary 

                Get the offset position of the specified antenna relative to the array reference position. 

 

        Description 

                 

                        Get the offset position of the specified antenna relative to the array reference position. Antenna may 

                        be specified as a zero-based integer (row number in the ANTENNA table) or a string representing a valid 

                        antenna name. The returned 

                        record contains the longitude, latitude, and elevation offsets as quantity records. The reported longitude and 

                        latitude offsets are measured along the surface of a sphere whose center is coincident with the center of 

                        the earth and whose surface contains the observatory reference position. 

                     

 

        Input Parameters: 

                which            Zero-based antenna in the ANTENNA table. 0  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the offset of the (zero-based) 3rd antenna in the ANTENNA table 

            antennna_offset = msmd.antennaoffset(3) 

            # get the offset of antenna DV02 

            antennna_offset = msmd.antennaoffset('DV02') 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_antennaoffset(self, *args, **kwargs) 

 

    def antennaposition(self, *args, **kwargs): 

        """ 

        antennaposition(self, which = initialize_variant("0")) -> record 

 

        Summary 

                Get the position of the specified antenna. 

 

        Description 

                 

                        Get the position of the specified antenna. The returned record represents a position measure, 

                        and can be used as such by the measures (me) tool. 

                     

 

        Input Parameters: 

                which            Zero-based antenna ID in the ANTENNA table or antenna name. 0  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the position of the (zero-based) 3rd antenna in the ANTENNA table 

            antennna_position = msmd.antennaposition(3) 

            # get the position of the antenna named DV07 

            antennna_position = msmd.antennaposition('DV07') 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_antennaposition(self, *args, **kwargs) 

 

    def antennastations(self, *args, **kwargs): 

        """ 

        antennastations(self, which = initialize_variant("-1")) -> std::vector<(std::string)> 

 

        Summary 

                Get the station names of the specified antennas. 

 

        Description 

                 

                        Get the station names of the specified antennas. 

                     

 

        Input Parameters: 

                which            Zero-based antenna ID(s) in the ANTENNA table or antenna name(s). Single numeric id less than zero retrieves all station names. -1  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get all station names 

            stations = msmd.antennastations(-1) 

            # get the stations of the antennas named DV07 and DV01 

            stations = msmd.antennaposition(['DV07', 'DV01']) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_antennastations(self, *args, **kwargs) 

 

    def bandwidths(self, *args, **kwargs): 

        """ 

        bandwidths(self, spw = initialize_variant("-1")) -> variant 

 

        Summary 

                Get the bandwidths in Hz for the specified spectral windows. If spw less than zero, return bandwidths for all spectral windows. 

 

        Description 

                 

                        Get the bandwidths in Hz for the specified spectral windows. If spw less than zero, return bandwidths for all spectral windows. 

                     

 

        Input Parameters: 

                spw              Spectral window IDs, if integer less than zero, return bandwidths for all spectral windows. -1  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get bandwdith for spectral window 2. 

            baseband = msmd.bandwidth(2) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_bandwidths(self, *args, **kwargs) 

 

    def baseband(self, *args, **kwargs): 

        """ 

        baseband(self, spw) -> int 

 

        Summary 

                Get the baseband for the specified spectral window. 

 

        Description 

                 

                        Get the baseband for the specified spectral window. 

                     

 

        Input Parameters: 

                spw              Spectral window ID.  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get baseband for spectral window 2. 

            baseband = msmd.baseband(2) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_baseband(self, *args, **kwargs) 

 

    def baselines(self): 

        """ 

        baselines(self) -> variant 

 

        Summary 

                Get a two dimensional boolean array representing baselines for data recorded in the MS. 

 

        Description 

                 

                        Get a two dimensional boolean array representing baselines for data recorded in the MS. A value of True means 

                        there is at least one row in the MS main table for that baseline, False means no rows for that baseline. Autocorrelation 

                        'baseline' information is also present via the values along the diagonal. 

                     

        Example: 

                 

            msmd.open('my.ms') 

            # get the baseline matrix for this data set 

            baselines = msmd.baselines() 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_baselines(self) 

 

    def chanavgspws(self): 

        """ 

        chanavgspws(self) -> std::vector<(int)> 

 

        Summary 

                Get an array of spectral window IDs used for channel averages. These are windows that do have 1 channel. 

 

        Description 

                 

                        

                        Get an array of spectral window IDs used for channel averages. These are windows that do have 1 channel. 

                     

        Example: 

                 

            msmd.open('my.ms') 

            # get the spectral window IDs used for channel averages. 

            chan_avg_spws = msmd.chanavgspws() 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_chanavgspws(self) 

 

    def chanfreqs(self, *args, **kwargs): 

        """ 

        chanfreqs(self, spw, unit = string("Hz")) -> std::vector<(double)> 

 

        Summary 

                Get an array of channel frequencies for the specified spectral window. 

 

        Description 

                 

                        Get an array of channel frequencies for the specified spectral window. 

                     

 

        Input Parameters: 

                spw              Spectral window ID.  

                unit             Convert frequencies to this unit. Hz  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the channel frequencies for spectral window 2. 

            chan_freqs = msmd.chanfreqs(2) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_chanfreqs(self, *args, **kwargs) 

 

    def chanwidths(self, *args, **kwargs): 

        """ 

        chanwidths(self, spw, unit = string("Hz")) -> std::vector<(double)> 

 

        Summary 

                Get an array of channel widths for the specified spectral window. 

 

        Description 

                 

                        Get an array of channel widths for the specified spectral window. 

                     

 

        Input Parameters: 

                spw              Spectral window ID.  

                unit             Convert frequencies to this unit. Hz  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the channel widths for spectral window 2. 

            chan_freqs = msmd.chanwidths(2) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_chanwidths(self, *args, **kwargs) 

 

    def close(self): 

        """ 

        close(self) -> bool 

 

        Summary 

                Close this tool and reclaim system resources associated with it. 

 

        Description 

                 

                        This method will close the tool and reclaim system resources it has been using. Returns true if successful. 

                     

        Example: 

                 

                        msmd.open('my.ms') 

                        # do things with tool 

                        # finish, close tool and free up resources. 

                        msmd.close() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_close(self) 

 

    def datadescids(self, *args, **kwargs): 

        """ 

        datadescids(self, spw = -1, pol = -1) -> std::vector<(int)> 

 

        Summary 

                Get the data description IDs associated with the specified spectral window and/or polarization ID 

 

        Description 

                 

                        Get a list of data description IDs associated with the specified spectral window ID 

                        and/or polarization ID. Values of less than zero for either means all IDs should be used 

                        in the selection. 

                     

 

        Input Parameters: 

                spw              Spectral window ID. Less than zero implies any, -1  

                pol              Polarization ID. Less than zero implies any. -1  

                 

        Example: 

                 

                        msmd.open('my.ms') 

                        # get all data description IDs associated with spw 2. 

                        msmd.datadescids(spw=2) 

                        # same as before but limit the IDs returned to those associated with 

                        # polarization ID 3 

                        msmd.datadescids(spw=2, pol=3) 

                        msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_datadescids(self, *args, **kwargs) 

 

    def done(self): 

        """ 

        done(self) -> bool 

 

        Summary 

                Close this tool and reclaim system resources associated with it. 

 

        Description 

                 

                        This method will close the tool and reclaim system resources it has been using. Returns true if successful. 

                     

        Example: 

                 

                        msmd.open('my.ms') 

                        # do things with tool 

                        # finish, close tool and free up resources. 

                        msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_done(self) 

 

    def effexposuretime(self): 

        """ 

        effexposuretime(self) -> record 

 

        Summary 

                Get the effective exposure (on-source integration time) 

 

        Description 

                 

                        Get the effective exposure time (equivalent to what might be more commonly known as total integration 

                        time or total sample time) is calculated by summing over all rows in the main MS table, excluding 

                        autocorrelations or rows where FLAG\_ROW is false, thusly: 

                         

                        sum[over i] (exposure[i]*sum[over j](UFBW[i, j])/ncorrelations[i] )/ nmaxbaselines 

                         

                        where exposure[i] is the value of EXPOSURE for the ith row, the inner sum is performed over each correlation 

                        for that row, UFBW is the unflagged fractional bandwidth is determined by summing all the widths of the 

                        unflagged channels for that correlation and dividing by the total bandwidth of all spectral windows observed 

                        at the timestamp of row i, ncorrelations is the number of correlations determined by the number of rows in 

                        the FLAG matrix for MS row i, and nmaxbaselines is the maximum number of antenna pairs, 

                        nantennas*(nantennas-1)/2, where nantennas is the number of antennas in the ANTENNA table. This method returns 

                        a quantity (a dictionary having a numerical value and a string unit). 

                     

        Example: 

                 

            msmd.open('my.ms') 

            # get the effective exposure time. 

            exposure_time = msmd.effexposuretime() 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_effexposuretime(self) 

 

    def exposuretime(self, *args, **kwargs): 

        """ 

        exposuretime(self, scan = 0, spwid = 0, polid = -1, obsid = 0, arrayid = 0) -> record 

 

        Summary 

                Get the exposure time for the specified scan, spwid, polarizaiton ID, array ID, and observation ID. 

 

        Description 

                 

                        Get the exposure time for the specified scan, spwid, polarizaiton ID, array ID, and observation ID. 

                        This is the exposure time of the record with the lowest time stamp of the records associated with 

                        these parameters. Returns a quantity dictionary. If polid is not specified (or specified and negative) 

                        and there is only one polarization ID in for the specified combination of scan, spwid, obsID, and 

                        arrayID, then that polarization ID is used. If there are multiple polarization IDs for the 

                        combination of other parameters, a list of these is logged and an empty dictionary is returned. 

                     

 

        Input Parameters: 

                scan             Scan number. 0  

                spwid            Spectral window ID. 0  

                polid            Polarization ID. -1  

                obsid            Observation ID. 0  

                arrayid          Array ID. 0  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the exposure time for scan 1, spwid 2, and polid 3 

            # for arrayID = 0 and obsID = 0 

            integration_time = msmd.getexposuretime(scan=1, spwid=2, polid=3) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_exposuretime(self, *args, **kwargs) 

 

    def fdmspws(self): 

        """ 

        fdmspws(self) -> std::vector<(int)> 

 

        Summary 

                Get an array of spectral window IDs used for FDM. These are windows that do not have 64, 128, or 256 channels. 

 

        Description 

                 

                         

                        Get an array of spectral window IDs used for FDM. These are windows that do not have 64, 128, or 256 channels. 

                     

        Example: 

                 

            msmd.open('my.ms') 

            # get the spectral window IDs used for FDM. 

            fdm_spws = msmd.fdmspws() 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_fdmspws(self) 

 

    def fieldsforintent(self, *args, **kwargs): 

        """ 

        fieldsforintent(self, intent = string(""), asnames = False) -> variant 

 

        Summary 

                Get an array of the unique fields for the specified intent. 

 

        Description 

                 

                        Get an array of the unique fields for the specified intent. Note that * matches any number of characters of all character classes. 

                     

 

        Input Parameters: 

                intent           Intent (case sensitive) for which to return the fields.  

                asnames          If true, return the field names. If false, return the zero-based field IDs. false  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the field names for intent 'observe target' 

            field_names = msmd.fieldsforintent('observe target', True, regex=False) 

            # get the field IDs for intent 'observe target' 

            field_IDs = msmd.fieldsforintent('observe target', False, regex=False) 

            # get all field IDs for all intents which contain 'WVR' 

            field_IDs = msmd.fieldsforIntent('*WVR*') 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_fieldsforintent(self, *args, **kwargs) 

 

    def fieldsforname(self, *args, **kwargs): 

        """ 

        fieldsforname(self, name = string("")) -> std::vector<(int)> 

 

        Summary 

                Get an array of the unique, zero-based field IDs for the specified field name. 

 

        Description 

                 

                        Get an array of the unique, zero-based field IDs for the specified field name. If the field name is the 

                        empty string (the default), a list of all unique field IDs in the main table of the MS will be returned. 

                     

 

        Input Parameters: 

                name             Field name (case sensitive) for which to return the fields.  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the field IDs for field name 'Enceladus' 

            fields = msmd.fieldsforname('Enceladus') 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_fieldsforname(self, *args, **kwargs) 

 

    def fieldsforscan(self, *args, **kwargs): 

        """ 

        fieldsforscan(self, scan = -1, asnames = False, obsid = 0, arrayid = 0) -> variant 

 

        Summary 

                Get an array of the unique fields for the specified scan number, observation ID, and array ID. 

 

        Description 

                 

                        Get an array of the unique fields for the specified scan number, observation ID, and array ID. 

                     

 

        Input Parameters: 

                scan             Scan number for which to return the fields. -1  

                asnames          If true, return the field names. If false, return the zero-based field IDs. false  

                obsid            Observation ID. 0  

                arrayid          Array ID. 0  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the field names for scan number 5 (arrayid = obsid = 0) 

            field_names = msmd.fieldsforscan(5, True) 

            # get the field IDs for scan number 5 (arrayid = obsid = 0) 

            field_IDs = msmd.fieldsforscan(5, False) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_fieldsforscan(self, *args, **kwargs) 

 

    def fieldsforscans(self, *args, **kwargs): 

        """ 

        fieldsforscans(self, scans = std::vector< int >(), asnames = False, obsid = 0,  

            arrayid = 0) -> variant 

 

        Summary 

                Get an array of the unique fields for the specified scan numbers, observationID, and array ID. 

 

        Description 

                 

                        Get an array of the unique fields for the specified scan numbers, observation ID, and array ID. 

                     

 

        Input Parameters: 

                scans            Scan numbers for which to return the fields.  

                asnames          If true, return the field names. If false, return the zero-based field IDs. false  

                obsid            Observation ID. 0  

                arrayid          Array ID. 0  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the field names for scan numbers 5 and 10 (obsid = 0, arrayid = 0) 

            field_names = msmd.fieldsforscan([5, 10], True) 

            # get the field IDs for scan numbers 5 and 10 (obsid = 0, arrayid = 0) 

            field_IDs = msmd.fieldsforscan([5, 10], False) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_fieldsforscans(self, *args, **kwargs) 

 

    def fieldsforsource(self, *args, **kwargs): 

        """ 

        fieldsforsource(self, source = -1, asnames = False) -> variant 

 

        Summary 

                Get an array of the unique fields for the specified source ID. 

 

        Description 

                 

                        Get an array of the unique fields for the specified spectral window. 

                     

 

        Input Parameters: 

                source           Zero-based source ID for which to return the fields. -1  

                asnames          If true, return the field names. If false, return the zero-based field IDs. false  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the field names for source ID 1 

            field_names = msmd.fieldsforsource(1, True) 

            # get the field IDs for source ID 1 

            field_IDs = msmd.fieldsforsource(1, False) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_fieldsforsource(self, *args, **kwargs) 

 

    def fieldsforspw(self, *args, **kwargs): 

        """ 

        fieldsforspw(self, spw = -1, asnames = False) -> variant 

 

        Summary 

                Get an array of the unique fields for the specified spectral window. 

 

        Description 

                 

                        Get an array of the unique fields for the specified spectral window. 

                     

 

        Input Parameters: 

                spw              Zero-based spectral window ID for which to return the fields. -1  

                asnames          If true, return the field names. If false, return the zero-based field IDs. false  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the field names for spectral window 1 

            field_names = msmd.fieldsforspw(1, True) 

            # get the field IDs for spectral window 1 

            field_IDs = msmd.fieldsforspw(1, False) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_fieldsforspw(self, *args, **kwargs) 

 

    def fieldsfortimes(self, *args, **kwargs): 

        """ 

        fieldsfortimes(self, time = -1, tol = 0) -> std::vector<(int)> 

 

        Summary 

                Get an array of the unique, zero-based, field IDs for the specified time range (time-tol to time+tol). 

 

        Description 

                 

                        Get an array of the unique, zero-based, fieldIDs for the specified time range (time-tol to time+tol). 

                     

 

        Input Parameters: 

                time             Time at center of time range. -1  

                tol              Time on either side of center for specifying range. 0  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the field IDs associated with the specified time range 

            fields = msmd.fieldsfortimes(4.8428293714e+09, 20) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_fieldsfortimes(self, *args, **kwargs) 

 

    def intents(self): 

        """ 

        intents(self) -> std::vector<(std::string)> 

 

        Summary 

                Get an array of the unique intents associated with the MS. 

 

        Description 

                 

                        Get an array of the unique intents associated with the MS. 

                     

        Example: 

                 

            msmd.open('my.ms') 

            # get the intents associated with the MS 

            intents = msmd.intents() 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_intents(self) 

 

    def intentsforfield(self, *args, **kwargs): 

        """ 

        intentsforfield(self, field = initialize_variant("-1")) -> std::vector<(std::string)> 

 

        Summary 

                Get an array of the unique intents for the specified field. 

 

        Description 

                 

                        Get an array of the unique intents for the specified field. 

                     

 

        Input Parameters: 

                field            Field ID or name for which to return the intents. -1  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the intents associated with field 4 

            intents = msmd.intentsforfield(4) 

            # get intents for field 'MOS' 

            intents2 = msmd.intentsforfield('MOS') 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_intentsforfield(self, *args, **kwargs) 

 

    def intentsforscan(self, *args, **kwargs): 

        """ 

        intentsforscan(self, scan = -1, obsid = 0, arrayid = 0) -> std::vector<(std::string)> 

 

        Summary 

                Get an array of the unique intents for the specified scan, obsservation ID, and array ID. 

 

        Description 

                 

                        Get an array of the unique intents for the specified scan, observation ID, and array ID. 

                     

 

        Input Parameters: 

                scan             Scan number for which to return the intents. -1  

                obsid            Observation ID. 0  

                arrayid          Array ID. 0  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the intents associated with scan 4 (obsid=0, arrayid = 0) 

            intents = msmd.intentsforscan(4) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_intentsforscan(self, *args, **kwargs) 

 

    def intentsforspw(self, *args, **kwargs): 

        """ 

        intentsforspw(self, spw = -1) -> std::vector<(std::string)> 

 

        Summary 

                Get an array of the unique intents for the specified spectral window ID. 

 

        Description 

                 

                        Get an array of the unique intents for the specified spectral window ID. 

                     

 

        Input Parameters: 

                spw              Spectral window ID (\>=0) for which to return the intents. -1  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the intents associated with spectral window ID 3 

            intents = msmd.intentsforspw(3) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_intentsforspw(self, *args, **kwargs) 

 

    def meanfreq(self, *args, **kwargs): 

        """ 

        meanfreq(self, spw, unit = string("Hz")) -> double 

 

        Summary 

                Get the mean frequency for the specified spectral window. 

 

        Description 

                 

                        Get the mean frequency for the specified spectral window. 

                     

 

        Input Parameters: 

                spw              Spectral window ID.  

                unit             Convert frequencies to this unit. Hz  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the mean frequency for spectral window 2. 

            mean_freq = msmd.meanfreq(2) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_meanfreq(self, *args, **kwargs) 

 

    def name(self): 

        """ 

        name(self) -> string 

 

        Summary 

                Get the name of the attached MS. 

 

        Description 

                 

                        Get the name of the attached MS. 

                     

        Example: 

                 

            msmd.open('my.ms') 

            # get its name 

            myname = msmd.name() 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_name(self) 

 

    def nantennas(self): 

        """ 

        nantennas(self) -> int 

 

        Summary 

                Get the number of antennas associated with the MS. 

 

        Description 

                 

                        Get the number of antennas associated with the MS. 

                     

        Example: 

                 

            msmd.open('my.ms') 

            number_of_antennas = msmd.nantennas() 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_nantennas(self) 

 

    def namesforfields(self, *args, **kwargs): 

        """ 

        namesforfields(self, fieldids = initialize_variant("")) -> std::vector<(std::string)> 

 

        Summary 

                Get the name of the specified field. 

 

        Description 

                 

                        Get the name of the specified field. 

                     

 

        Input Parameters: 

                fieldids         Zero-based field IDs for which to get the names (integer or interger array). Unspecified will return all field names.  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the name for field 8 and 2. 

            field_names = msmd.namesforfields([8, 2]) 

            # get all field names 

            all_field_nams = namesforfields() 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_namesforfields(self, *args, **kwargs) 

 

    def namesforspws(self, *args, **kwargs): 

        """ 

        namesforspws(self, spwids = initialize_variant("")) -> std::vector<(std::string)> 

 

        Summary 

                Get the name of the specified spws. 

 

        Description 

                 

                        Get the name of the specified spw(s). 

                     

 

        Input Parameters: 

                spwids           Zero-based spw ID(s) for which to get the names (integer or interger array). Unspecified will return all spw names.  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the name for spws 8 and 2. 

            spw_names = msmd.namesforspws([8, 2]) 

            # get all spw names 

            all_spw_names = namesforspws() 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_namesforspws(self, *args, **kwargs) 

 

    def nbaselines(self): 

        """ 

        nbaselines(self) -> int 

 

        Summary 

                Get the number of baselines represented in the main MS table. 

 

        Description 

                 

                        Get the number of unique baselines (antenna pairs) represented in the main MS table. This can, in theory, be less than 

                        n*(n-1)/2 (n being the number of antennas in the ANTENNA table), if data for certain baselines 

                        are not included in the main MS table. Autocorrelation 'baselines' are not included in this count. 

                     

        Example: 

                 

            msmd.open('my.ms') 

            number_of_baselines = msmd.nbaselines() 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_nbaselines(self) 

 

    def nchan(self, *args, **kwargs): 

        """ 

        nchan(self, spw) -> int 

 

        Summary 

                Get the number of channels associated with the specified spectral window. 

 

        Description 

                 

                        Get the number of channels associated with the specified spectral window. 

                     

 

        Input Parameters: 

                spw              Zero-based spw ID for which to get the number of channels.  

                 

        Example: 

                 

            msmd.open('my.ms') 

            nchan = msmd.nchan(3) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_nchan(self, *args, **kwargs) 

 

    def nfields(self): 

        """ 

        nfields(self) -> int 

 

        Summary 

                Get the number of fields associated with the MS. 

 

        Description 

                 

                        Get the number of fields associated with the MS. 

                     

        Example: 

                 

            msmd.open('my.ms') 

            number_of_fields = msmd.nfields() 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_nfields(self) 

 

    def nobservations(self): 

        """ 

        nobservations(self) -> int 

 

        Summary 

                Get the number of observations associated with the MS from the OBSERVATIONS table. 

 

        Description 

                 

                        Get the number of observations associated with the MS from the OBSERVATIONS table. 

                     

        Example: 

                 

            msmd.open('my.ms') 

            number_of_obs_ids = msmd.nobservations() 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_nobservations(self) 

 

    def nspw(self, includewvr = True): 

        """ 

        nspw(self, includewvr = True) -> int 

 

        Summary 

                Get the number of spectral windows associated with the MS. 

 

        Description 

                 

                        This method will return the number of spectral windows in the associated MS. 

                     

 

        Input Parameters: 

                includewvr       Include wvr spectral windows? If false, exclude wvr windows from count. true  

                 

        Example: 

                 

            msmd.open('my.ms') 

            number_of_spectral_windows = msmd.nspw() 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_nspw(self, includewvr) 

 

    def nstates(self): 

        """ 

        nstates(self) -> int 

 

        Summary 

                Get the number of states (from the STATE table) associated with the MS. 

 

        Description 

                 

                        This method will return the number of states (number of rows in the STATES table) in the associated MS. 

                     

        Example: 

                 

            msmd.open('my.ms') 

            number_of_states = msmd.nstates() 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_nstates(self) 

 

    def nscans(self): 

        """ 

        nscans(self) -> int 

 

        Summary 

                Get the number of scans associated with the MS. 

 

        Description 

                 

                        Get the number of scans associated with the MS. 

                     

        Example: 

                 

            msmd.open('my.ms') 

            number_of_scans = msmd.nscans() 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_nscans(self) 

 

    def nrows(self, autoc = True, flagged = True): 

        """ 

        nrows(self, autoc = True, flagged = True) -> double 

 

        Summary 

                Get the number of visibilities (from the main table) associated with the MS. 

 

        Description 

                 

                        Get the number of visibilities (from the main table) associated with the MS. 

                     

 

        Input Parameters: 

                autoc            Include autocorrelation data? If False, only cross correlation rows will be summed. true  

                flagged          Include flagged data? If False, only unflagged or patially flagged rows will be summed. true  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the total number of rows 

            nrows = msmd.nrows() 

            # got the number of cross correlation rows 

            ncross = msmd.nrows(auto=False) 

            # get the number of unflagged rows 

            ngood = msmd.nrows(flagged=False) 

            # get the number of unflagged cross correlation rows 

            ncrossunflagged = msmd.nrows(auto=False, flagged=False) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_nrows(self, autoc, flagged) 

 

    def observatorynames(self): 

        """ 

        observatorynames(self) -> std::vector<(std::string)> 

 

        Summary 

                Get an array of MS telescope (observatory) names as they are listed in the OBSERVATIONS table. 

 

        Description 

                 

                        Get an array of MS telescope (observatory) names as they are listed in the OBSERVATIONS table. 

                     

        Example: 

                 

            msmd.open('my.ms') 

            # get the telescope names 

            telescope_names = msmd.telescopenames() 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_observatorynames(self) 

 

    def observatoryposition(self, which = 0): 

        """ 

        observatoryposition(self, which = 0) -> record 

 

        Summary 

                Get the position of the specified telescope. 

 

        Description 

                 

                        Get the position of the specified telescope. 

                     

 

        Input Parameters: 

                which            Zero-based telescope position in the OBSERVATIONS table (see msmd.telescopenames()). 0  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the position of the 0th telescope 

            telescope_position = msmd.telescopeposition(0) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_observatoryposition(self, which) 

 

    def open(self, *args, **kwargs): 

        """ 

        open(self, msfile = string(""), maxcache = 50) -> bool 

 

        Summary 

                Attach the MS metadata tool to the specified MS 

 

        Description 

                Attach this tool to the specified MS. 

 

        Input Parameters: 

                msfile           Name of the existing measurement set  

                maxcache         Maximum cache size, in megabytes, to use. 50  

                 

        Example: 

                 

                        msmd.open('my.ms') 

                        # do stuff and close it 

                        msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_open(self, *args, **kwargs) 

 

    def phasecenter(self, *args, **kwargs): 

        """ 

        phasecenter(self, fieldid = 0, epoch = initialize_record("")) -> record 

 

        Summary 

                Get the phasecenter direction from a field ID and time if necessary 

 

        Description 

                 

                        Get a direction measures for the phasecenter of the field id and time specified 

                     

 

        Input Parameters: 

                fieldid          Zero-based field ID for which to get the phasecenter 0  

                epoch            Optional time, expressed as a measures epoch dictionary, if field id has a polynomial in time phasecenter or an ephemerides table attached to the ID  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get phasecenter for field ID 1 

            mydir = msmd.phasecenter(1); 

            # if the phasecenter is a polynomial or has an ephemerides attached to  

            # it a time is needed to get the phase direction 

            ep=me.epoch('utc', '2015/03/15/15:30:55') 

            mydir2=msmd.phasecenter(2, ep) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_phasecenter(self, *args, **kwargs) 

 

    def pointingdirection(self, rownum = 0, interpolate = False, initialrow = 0): 

        """ 

        pointingdirection(self, rownum = 0, interpolate = False, initialrow = 0) -> record 

 

        Summary 

                Get the pointing direction for antennas at the specified row number in the main MS table. 

 

        Description 

                 

                        Get the pointing direction for antennas at the specified row number in the main MS table. Returns a record 

                        containing the time, antenna IDs and corresponding pointing directions. 

                     

 

        Input Parameters: 

                rownum           Row number in the main MS table. 0  

                interpolate      Interpolate pointings in case the interval in the main table is shorter than that in the pointing table (often the case in fast-scanning in single dish observaitions) false  

                initialrow       Initial guess of row index in pointing table to start search. 0  

                 

        Example: 

                 

                        msmd.open('my.ms') 

                        # get the pointing directions for row ID 500 

                        dirs = msmd.pointingdirection(500) 

                        msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_pointingdirection(self, rownum, interpolate, initialrow) 

 

    def scannumbers(self, obsid = 0, arrayid = 0): 

        """ 

        scannumbers(self, obsid = 0, arrayid = 0) -> std::vector<(int)> 

 

        Summary 

                Get an array of the unique scan numbers associated with the MS for the specified observation ID and array ID. 

 

        Description 

                 

                        This method will return an array of unique scan numbers in the associated MS for the specified observation ID and array ID. 

                     

 

        Input Parameters: 

                obsid            Observation ID. 0  

                arrayid          Array ID. 0  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # scan numbers for obsid=0 and arrayid=0 

            scan_numbers = msmd.scannumbers() 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_scannumbers(self, obsid, arrayid) 

 

    def scansforfield(self, *args, **kwargs): 

        """ 

        scansforfield(self, intent = initialize_variant(""), obsid = 0, arrayid = 0) -> std::vector<(int)> 

 

        Summary 

                Get an array of the unique scan numbers associated with the specified field, observation ID, and array ID. 

 

        Description 

                 

                        Get an array of the unique scan numbers associated with the specified field, observation ID, and array ID. 

                     

 

        Input Parameters: 

                intent           Field ID or field name (case sensitive) for which to return the scan numbers.  

                obsid            Observation ID. 0  

                arrayid          Array ID. 0  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the scan numbers associated with field 'planet Z' (obsid=0, arrayid=0) 

            scan_numbers = msmd.scansforfield('planet Z') 

            # get the scan numbers associated with field ID 5 (obsid=0, arrayid=0) 

            scan_numbers = msmd.scansforfield(5) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_scansforfield(self, *args, **kwargs) 

 

    def scansforintent(self, *args, **kwargs): 

        """ 

        scansforintent(self, intent = string("-1"), obsid = 0, arrayid = 0) -> std::vector<(int)> 

 

        Summary 

                Get an array of the unique scan numbers associated with the specified intent, observation ID, and arrayID. 

 

        Description 

                 

                        Get an array of the unique scan numbers associated with the specified intent, observation ID, and arrayID. 

                        The '*' character matches any number of characters from all character classes. 

                     

 

        Input Parameters: 

                intent           Intent (case-sensitive) for which to return the scan numbers. -1  

                obsid            Observation ID. 0  

                arrayid          Array ID. 0  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the scan numbers associated with intent 'detect planet X' (obsid=0, arrayid=0) 

            scan_numbers = msmd.scansforintent('detect planet X', regex=False) 

            # got all the scan numbers associated with all intents which contain 'WVR' (obsid=0, arrayid=0) 

            scan_numbers = msmd.scansforintent('*WVR*') 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_scansforintent(self, *args, **kwargs) 

 

    def scansforspw(self, *args, **kwargs): 

        """ 

        scansforspw(self, spw = -1, obsid = 0, arrayid = 0) -> std::vector<(int)> 

 

        Summary 

                Get an array of the unique scan numbers associated with the specified zero-based spectral window ID, observation ID, and array ID. 

 

        Description 

                 

                        Get an array of the unique scan numbers associated with the specified zero-based spectral window ID, observation ID, and array ID. 

                     

 

        Input Parameters: 

                spw              Zero-based spectral window ID for which to return the scan numbers. -1  

                obsid            Observation ID. 0  

                arrayid          Array ID. 0  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the scan numbers associated with spectral window ID 14, obsid=0, arrayid=0 

            scan_numbers = msmd.scansforspw(14) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_scansforspw(self, *args, **kwargs) 

 

    def scansforstate(self, *args, **kwargs): 

        """ 

        scansforstate(self, state = -1, obsid = 0, arrayid = 0) -> std::vector<(int)> 

 

        Summary 

                Get an array of the unique scan numbers for the specified state, observation ID, and array ID. 

 

        Description 

                 

                        Get an array of the unique scan numbers for the specified state, observation ID, and array ID. 

                     

 

        Input Parameters: 

                state            ID of state for which to return the scan numbers. -1  

                obsid            Observation ID. 0  

                arrayid          Array ID. 0  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the scan numbers associated with state 2, obsid=0, arrayid=0 

            scans = msmd.scansforstate(2) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_scansforstate(self, *args, **kwargs) 

 

    def scansfortimes(self, *args, **kwargs): 

        """ 

        scansfortimes(self, time = -1, tol = 0, obsid = 0, arrayid = 0) -> std::vector<(int)> 

 

        Summary 

                Get an array of the unique scan numbers for the specified time range (time-tol to time+tol), observation ID, and array ID. 

 

        Description 

                 

                        Get an array of the unique scan numbers for the specified time range (time-tol to time+tol), observation ID, and array ID. 

                     

 

        Input Parameters: 

                time             Time at center of time range. -1  

                tol              Time on either side of center for specifying range. 0  

                obsid            Observation ID. 0  

                arrayid          Array ID. 0  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the scan numbers associated with the specified time range (obsid=0, arrayid=0) 

            scans = msmd.scansfortimes(4.84282937e+09, 20) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_scansfortimes(self, *args, **kwargs) 

 

    def sideband(self, *args, **kwargs): 

        """ 

        sideband(self, spw) -> int 

 

        Summary 

                Get the sideband for the specified spectral window. 

 

        Description 

                 

                        Get the sideband for the specified spectral window. 

                     

 

        Input Parameters: 

                spw              Spectral window ID.  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get sideband for spectral window 2. 

            sideband = msmd.sideband(2) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_sideband(self, *args, **kwargs) 

 

    def spwsforbaseband(self, *args, **kwargs): 

        """ 

        spwsforbaseband(self, baseband = -1, sqldmode = string("include")) -> variant 

 

        Summary 

                Get the spws associated with the specified baseband or dictionary that maps baseband to spws. 

 

        Description 

                 

                        Get the spectral windows associated with the specified baseband or dictionary that maps baseband to spectral windows. 

                     

 

        Input Parameters: 

                baseband         Baseband number. If \<0, return a dictionary mapping basebands to spws. -1  

                sqldmode         If 'include', include SQLD windows, if 'exclude', exclude SQLD windows, if 'only', include only SQLD windows. Case insenstive, inimum match honored. include  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the spectral window IDs associated with all the basebands in this dataset 

            basebandtospwdict = msmd.spwsforbasebands() 

            # get an array of spws associated with baseband 2. 

            spwsforbb2 = msmd.spwsforbasebands(2) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_spwsforbaseband(self, *args, **kwargs) 

 

    def spwsforfield(self, *args, **kwargs): 

        """ 

        spwsforfield(self, field = initialize_variant("")) -> std::vector<(int)> 

 

        Summary 

                Get an array of the unique spectral window IDs for the specified field. 

 

        Description 

                 

                        Get an array of the unique spectral window IDs for the specified field. 

                     

 

        Input Parameters: 

                field            Field (case sensitive string or zero-based integer ID) for which to return the spectral window IDs.  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the spectral window IDs associated with field 'Fomalhaut' 

            spws = msmd.spwsforfield('Fomalhaut') 

            # get spectral window IDs associated with field ID 2 

            spws = msmd.spwsforfield(2) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_spwsforfield(self, *args, **kwargs) 

 

    def spwsforintent(self, *args, **kwargs): 

        """ 

        spwsforintent(self, intent = string("")) -> std::vector<(int)> 

 

        Summary 

                Get an array of the unique spectral window IDs for the specified intent. 

 

        Description 

                 

                        Get an array of the unique spectral window IDs for the specified intent. The '*' character matches any number of characters from all character classes. 

                     

 

        Input Parameters: 

                intent           Intent (case sensitive) for which to return the spectral window IDs.  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the spectral window IDs associated with 'MY COOL INTENT' 

            spws = msmd.spwsforintent('MY COOL INTENT') 

            # got all the spw IDs associated with all intents which contain 'WVR' 

            scan_numbers = msmd.spwsforintent('*WVR*') 

            msmd.done() 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_spwsforintent(self, *args, **kwargs) 

 

    def spwsforscan(self, *args, **kwargs): 

        """ 

        spwsforscan(self, scan = -1, obsid = 0, arrayid = 0) -> std::vector<(int)> 

 

        Summary 

                Get an array of the unique spectral window IDs for the specified scan number, observation ID, and array ID. 

 

        Description 

                 

                        Get an array of the unique spectral window IDs for the specified scan number, observation ID, and array ID. 

                     

 

        Input Parameters: 

                scan             Scan number for which to return the spectral window IDs. -1  

                obsid            Observation ID. 0  

                arrayid          Array ID. 0  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the spectral window IDs associated with scan number 20, obsid=0, arrayid=0. 

            spws = msmd.spwsforscan(20) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_spwsforscan(self, *args, **kwargs) 

 

    def statesforscan(self, *args, **kwargs): 

        """ 

        statesforscan(self, scan = -1, obsid = 0, arrayid = 0) -> std::vector<(int)> 

 

        Summary 

                Get an array of the unique state IDs for the specified scan number, observation ID, and array ID. 

 

        Description 

                 

                        Get an array of the unique state IDs for the specified scan number, observation ID, and array ID. 

                     

 

        Input Parameters: 

                scan             Scan number for which to return the state IDs. -1  

                obsid            Observation ID. 0  

                arrayid          Array ID. 0  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the state IDs associated with scan number 251, obsid=0, arrayid=0 

            states = msmd.statesforscan(251) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_statesforscan(self, *args, **kwargs) 

 

    def summary(self): 

        """ 

        summary(self) -> record 

 

        Summary 

                Get dictionary summarizing the MS. 

 

        Description 

                 

                        Get dictionary summarizing the MS. 

                     

        Example: 

                 

            msmd.open('my.ms') 

            # get the summary 

            summary = msmd.summary() 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_summary(self) 

 

    def tdmspws(self): 

        """ 

        tdmspws(self) -> std::vector<(int)> 

 

        Summary 

                Get an array of spectral window IDs used for TDM. These are windows that have 64, 128, or 256 channels. 

 

        Description 

                 

                         

                        Get an array of spectral window IDs used for TDM. These are windows that have 64, 128, or 256 channels. 

                     

        Example: 

                 

            msmd.open('my.ms') 

            # get the spectral window IDs used for TDM. 

            tdm_spws = msmd.tdmspws() 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_tdmspws(self) 

 

    def timesforfield(self, *args, **kwargs): 

        """ 

        timesforfield(self, field = -1) -> std::vector<(double)> 

 

        Summary 

                Get an array of the unique times for the specified field. 

 

        Description 

                 

                        Get an array of the unique times for the specified field. 

                     

 

        Input Parameters: 

                field            Zero-based field ID for which to return the times. -1  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the times associated with field 3 

            times = msmd.timesforfields(3) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_timesforfield(self, *args, **kwargs) 

 

    def timesforintent(self, *args, **kwargs): 

        """ 

        timesforintent(self, intent = string("")) -> std::vector<(double)> 

 

        Summary 

                Get an array of the unique times for the specified intent. 

 

        Description 

                 

                        Get an array of the unique times for the specified intent. 

                     

 

        Input Parameters: 

                intent           Intent for which to return the times.  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the times associated with intent 'myintent' 

            times = msmd.timesforintent('myintent') 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_timesforintent(self, *args, **kwargs) 

 

    def timesforscan(self, *args, **kwargs): 

        """ 

        timesforscan(self, scan = -1, obsid = 0, arrayid = 0) -> std::vector<(double)> 

 

        Summary 

                Get an array of the unique times for the specified scan number, observation ID, and array ID. 

 

        Description 

                 

                        Get an array of the unique times for the specified scan number, observation ID, and array ID. 

                     

 

        Input Parameters: 

                scan             Scan number for which to return the times. -1  

                obsid            Observation ID. 0  

                arrayid          Array ID. 0  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the times associated with scan number 10, obsid=0, arrayid=0 

            times = msmd.timesforscans(10) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_timesforscan(self, *args, **kwargs) 

 

    def timesforscans(self, *args, **kwargs): 

        """ 

        timesforscans(self, scans = initialize_vector(1, (int)-1), obsid = 0, arrayid = 0) -> std::vector<(double)> 

 

        Summary 

                Get an array of the unique times for the specified scan numbers, observation ID, and array ID. 

 

        Description 

                 

                        Get an array of the unique times for the specified scan numbers, observation ID, and array ID. 

                     

 

        Input Parameters: 

                scans            Scan numbers for which to return the times. -1  

                obsid            Observation ID. 0  

                arrayid          Array ID. 0  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the times associated with scan numbers 10 and 20, obsid=0, arrayid=0 

            times = msmd.timesforscans([10,20]) 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_timesforscans(self, *args, **kwargs) 

 

    def wvrspws(self, *args, **kwargs): 

        """ 

        wvrspws(self, complement = -false) -> std::vector<(int)> 

 

        Summary 

                Get an array of spectral window IDs used for WVR. These are windows that have 4 channels. 

 

        Description 

                 

                         

                        Get an array of spectral window IDs used for WVR. These are windows that have 4 channels. 

                        If complement is True, return the complement set instead (all non-wvr spw IDs). 

                     

 

        Input Parameters: 

                complement       If True, return all non-wvr spws. -false  

                 

        Example: 

                 

            msmd.open('my.ms') 

            # get the spectral window IDs used for WVR. 

            wvr_spws = msmd.wvrspws() 

            msmd.done() 

                     

        -------------------------------------------------------------------------------- 

                       

        """ 

        return _msmetadata.msmetadata_wvrspws(self, *args, **kwargs) 

 

msmetadata_swigregister = _msmetadata.msmetadata_swigregister 

msmetadata_swigregister(msmetadata) 

 

# This file is compatible with both classic and new-style classes.