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

1944

1945

1946

1947

1948

1949

1950

1951

1952

1953

1954

1955

1956

1957

1958

1959

1960

1961

1962

1963

1964

1965

1966

1967

1968

1969

1970

1971

1972

1973

1974

1975

1976

1977

1978

1979

1980

1981

1982

1983

1984

1985

1986

1987

1988

1989

1990

1991

1992

1993

1994

1995

1996

1997

1998

1999

2000

2001

2002

2003

2004

2005

2006

2007

2008

2009

2010

2011

2012

2013

2014

2015

2016

2017

2018

2019

2020

2021

2022

2023

2024

2025

2026

2027

2028

2029

2030

2031

2032

2033

2034

2035

2036

2037

2038

2039

2040

2041

2042

2043

2044

2045

2046

2047

2048

2049

2050

2051

2052

2053

2054

2055

2056

2057

2058

2059

2060

2061

2062

2063

2064

2065

2066

2067

2068

2069

2070

2071

2072

2073

2074

2075

2076

2077

2078

2079

2080

2081

2082

2083

2084

2085

2086

2087

2088

2089

2090

2091

2092

2093

2094

2095

2096

2097

2098

2099

2100

2101

2102

2103

2104

2105

2106

2107

2108

2109

2110

2111

2112

2113

2114

2115

2116

2117

2118

2119

2120

2121

2122

2123

2124

2125

2126

2127

2128

2129

2130

2131

2132

2133

2134

2135

2136

2137

2138

2139

2140

2141

2142

2143

2144

2145

2146

2147

2148

2149

2150

2151

2152

2153

2154

2155

2156

2157

2158

2159

2160

2161

2162

2163

2164

2165

2166

2167

2168

2169

2170

2171

2172

2173

2174

2175

2176

2177

2178

2179

2180

2181

2182

2183

2184

2185

2186

2187

2188

2189

2190

2191

2192

2193

2194

2195

2196

2197

2198

2199

2200

2201

2202

2203

2204

2205

2206

2207

2208

2209

2210

2211

2212

2213

2214

2215

2216

2217

2218

2219

2220

2221

2222

2223

2224

2225

2226

2227

2228

2229

2230

2231

2232

2233

2234

2235

2236

2237

2238

2239

2240

2241

2242

2243

2244

2245

2246

2247

2248

2249

2250

2251

2252

2253

2254

2255

2256

2257

2258

2259

2260

2261

2262

2263

2264

2265

2266

2267

2268

2269

2270

2271

2272

2273

2274

2275

2276

2277

2278

2279

2280

2281

2282

2283

2284

2285

2286

2287

2288

2289

2290

2291

2292

2293

2294

2295

2296

2297

2298

2299

2300

2301

2302

2303

2304

2305

2306

2307

2308

2309

2310

2311

2312

2313

2314

2315

2316

2317

2318

2319

2320

2321

2322

2323

2324

2325

2326

2327

2328

2329

2330

2331

2332

2333

2334

2335

2336

2337

2338

2339

2340

2341

2342

2343

2344

2345

2346

2347

2348

2349

2350

2351

2352

2353

2354

2355

2356

2357

2358

2359

2360

2361

2362

2363

2364

2365

2366

2367

2368

2369

2370

2371

2372

2373

2374

2375

2376

2377

2378

2379

2380

2381

2382

2383

2384

2385

2386

2387

2388

2389

2390

2391

2392

2393

2394

2395

2396

2397

2398

2399

2400

2401

2402

2403

2404

2405

2406

2407

2408

2409

2410

2411

2412

2413

2414

2415

2416

2417

2418

2419

2420

2421

2422

2423

2424

2425

2426

2427

2428

2429

2430

2431

2432

2433

2434

2435

2436

2437

2438

2439

2440

2441

2442

2443

2444

2445

2446

2447

2448

2449

2450

2451

2452

2453

2454

2455

2456

2457

2458

2459

2460

2461

2462

2463

2464

2465

2466

2467

2468

2469

2470

2471

2472

2473

2474

2475

2476

2477

2478

2479

2480

2481

2482

2483

2484

2485

2486

2487

2488

2489

2490

2491

2492

2493

2494

2495

2496

2497

2498

2499

2500

2501

2502

2503

2504

2505

2506

2507

2508

2509

2510

2511

2512

2513

2514

2515

2516

2517

2518

2519

2520

2521

2522

2523

2524

2525

2526

2527

2528

2529

2530

2531

2532

2533

2534

2535

2536

2537

2538

2539

2540

2541

2542

2543

2544

2545

2546

2547

2548

2549

2550

2551

2552

2553

2554

2555

2556

2557

2558

2559

2560

2561

2562

2563

2564

2565

2566

2567

2568

2569

2570

2571

2572

2573

2574

2575

2576

2577

2578

2579

2580

2581

2582

2583

2584

2585

2586

2587

2588

2589

2590

2591

2592

2593

2594

2595

2596

2597

2598

2599

2600

2601

2602

2603

2604

2605

2606

2607

2608

2609

2610

2611

2612

2613

2614

2615

2616

2617

2618

2619

2620

2621

2622

2623

2624

2625

2626

2627

2628

2629

2630

2631

2632

2633

2634

2635

2636

2637

2638

2639

2640

2641

2642

2643

2644

2645

2646

2647

2648

2649

2650

2651

2652

2653

2654

2655

2656

2657

2658

2659

2660

2661

2662

2663

2664

2665

2666

2667

2668

2669

2670

2671

2672

2673

2674

2675

2676

2677

2678

2679

2680

2681

2682

2683

2684

2685

2686

2687

2688

2689

2690

2691

2692

2693

2694

2695

2696

2697

2698

2699

2700

2701

2702

2703

2704

2705

2706

2707

2708

2709

2710

2711

2712

2713

2714

2715

2716

2717

2718

2719

2720

2721

2722

2723

2724

2725

2726

2727

2728

2729

2730

2731

2732

2733

2734

2735

2736

2737

2738

2739

2740

2741

2742

2743

2744

2745

2746

2747

2748

2749

2750

2751

2752

2753

2754

2755

2756

2757

2758

2759

2760

2761

2762

2763

2764

2765

2766

2767

2768

2769

2770

2771

2772

2773

2774

2775

2776

2777

2778

2779

2780

2781

2782

2783

2784

2785

2786

2787

2788

2789

2790

2791

2792

2793

2794

2795

2796

2797

2798

2799

2800

2801

2802

2803

2804

2805

2806

2807

2808

2809

2810

2811

2812

2813

2814

2815

2816

2817

2818

2819

2820

2821

2822

2823

2824

2825

2826

2827

2828

2829

2830

2831

2832

2833

2834

2835

2836

2837

2838

2839

2840

2841

2842

2843

2844

2845

2846

2847

2848

2849

2850

2851

2852

2853

2854

2855

2856

2857

2858

2859

2860

2861

2862

2863

2864

2865

2866

2867

2868

2869

2870

2871

2872

2873

2874

2875

2876

2877

2878

2879

2880

2881

2882

2883

2884

2885

2886

2887

2888

2889

2890

2891

2892

2893

2894

2895

2896

2897

2898

2899

2900

2901

2902

2903

2904

2905

2906

2907

2908

2909

2910

2911

2912

2913

2914

2915

2916

2917

2918

2919

2920

2921

2922

2923

2924

2925

2926

2927

2928

2929

2930

2931

2932

2933

2934

2935

2936

2937

2938

2939

2940

2941

2942

2943

2944

2945

2946

2947

2948

2949

2950

2951

2952

2953

2954

2955

2956

2957

2958

2959

2960

2961

2962

2963

2964

2965

2966

2967

2968

2969

2970

2971

2972

2973

2974

2975

2976

2977

2978

2979

2980

2981

2982

2983

2984

2985

2986

2987

2988

2989

2990

2991

2992

2993

2994

2995

2996

2997

2998

2999

3000

3001

3002

3003

3004

3005

3006

3007

3008

3009

3010

3011

3012

3013

3014

# 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('_table', [dirname(__file__)]) 

        except ImportError: 

            import _table 

            return _table 

        if fp is not None: 

            try: 

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

            finally: 

                fp.close() 

            return _mod 

    _table = swig_import_helper() 

    del swig_import_helper 

else: 

    import _table 

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 table(_object): 

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

    __swig_setmethods__ = {} 

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

    __swig_getmethods__ = {} 

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

    __repr__ = _swig_repr 

    def __init__(self): 

        """__init__(self) -> table""" 

        this = _table.new_table() 

        try: self.this.append(this) 

        except: self.this = this 

    __swig_destroy__ = _table.delete_table 

    __del__ = lambda self : None; 

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

        """ 

        fromfits(self, tablename, fitsfile, whichhdu = 1, storage = string("standard"),  

            convention = string("none"), nomodify = True,  

            ack = True) -> table 

 

        Summary 

                Create a casa table from a binary FITS file 

 

        Description 

                 

        Create a table from binary FITS format. This generates a CASA table 

        from the binary FITS table in the given HDU (header unit) of the 

        FITS file. Note that other FITS formats ({m e.g.} 

        Image FITS and UVFITS) are read by other means. 

        \It is possible to specify the storage manager to use for the table: 

        \       exttt{standard} is the default storage manager. 

        \       exttt{incremental} is efficient for slowly varying data. 

        \       exttt{memort} is for in memory use for e.g to grab given columns via getcol. 

 

 

        Input Parameters: 

                tablename        Name of table to be created  

                fitsfile         Name of FITS file to be read  

                whichhdu         Which HDU to read (0-relative to primary HDU i.e. 1 is the smallest valid value) 1  

                storage          Storage manager to use (standard or incremental or memory) standard standard incremental memory  

                convention       Convention to use (sdfits or none) none  

                nomodify         Open Read-only? true  

                ack              Acknowledge creations, etc true  

                 

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

                       

        """ 

        return _table.table_fromfits(self, *args, **kwargs) 

 

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

        """ 

        fromascii(self, tablename, asciifile, headerfile = string(""), autoheader = False,  

            autoshape = initialize_vector(1, (int)-1),  

            sep = string(""), commentmarker = string(""),  

            firstline = 0, lastline = -1,  

            nomodify = True, columnnames = std::vector< string >(1, ""),  

            datatypes = std::vector< string >(1, "")) -> bool 

 

        Summary 

                Create a casa table from a file containing data in ASCII format 

 

        Description 

                 

        Create a table from an ASCII file. Columnar data as well as 

        table and column keywords may be specified. 

        \Once the table is created from the ASCII data, it is opened in the 

        specified mode by the table tool.  

 

        The table columns are filled from a file containing the data values 

        separated by a separator (one line per table row). The default 

        separator is a blank. Blanks after the separator are ignored. 

        \If a non-blank separator is used, values can be empty. Such values 

        default to 0, empty string, or F depending on the data type. E.g. 

        1,,2, has 4 values of which the 2nd and 4th are empty and default to 0. 

        Similarly if fewer values are given than needed, the missing values 

        get the default value. 

 

        Either the data format can be explicitly specified or it can be found 

        automatically. The former gives more control in ambiguous situations. 

        Both scalar and array columns can be generated from the ASCII input. 

        The format string determines the type and optional shape. 

 

        In automatic mode (     exttt{autoheader=True}) the first line 

        of the ASCII data is analyzed 

        to deduce the data types. Only the types I, D, and A can be 

        recognized. A number without decimal point or exponent is I (integer), 

        otherwise it is D (double). Any other string is A (string). 

        Note that a number may contain a leading sign (+ or -). 

        The     exttt{autoshape} argument can be used to specify if the input 

        should be stored as multiple scalars (the default) or as a single 

        array. In the latter case one axis in the shape can be defined as 

        variable length by giving it the value 0. It means that the actual 

        array shape in a row is determined by the number of values in the 

        corresponding input line. 

        Columns get the names   exttt{Column1},         exttt{Column2}, etc.. 

        \For example: 

        egin{enumerate} 

        \item 

                exttt{autoshape=[]} (which is the default) means that all values 

        are to be stored as scalar columns. 

        \item 

                exttt{autoshape=0} means that all values in a row are to be stored as 

        a variable length vector. 

        \item 

                exttt{autoshape=10} defines a fixed length vector. If an input 

        line contains less than 10 values, the vector is filled with default 

        values. If more than 10 values, the latter values are ignored. 

        \item 

                exttt{autoshape=[5,0]} defines a 2-dim array of which the 2nd axis is 

        variable. Note that if an input line does not contain a multiple of 5 

        values, the array is filled with default values. 

        nd{enumerate} 

 

        If the format of the table is explicitly specified, it has to be done 

        either in the first two lines of the data file (named by the 

        argument filename), or in a separate header file (named by the 

        argument headerfile). In both forms, table keywords may also be 

        specified before the column definitions. 

        The column names and types can be described by two lines: 

 

        egin{enumerate} 

        \item The first line contains the names of the columns. 

        These names may be enclosed in quotes (either single or double).  

        \item The second line contains the data type and optionally the shape 

        of each column. Valid types are:  

        egin{itemize} 

        \item S for Short data  

        \item I for Integer data  

        \item R for Real data  

        \item D for Double Precision data  

        \item X for Complex data (Real followed by Imaginary)  

        \item Z for Complex data (Amplitude then Phase)  

        \item DX for Double Precision Complex data (Real followed by Imaginary)  

        \item DZ for Double Precision Complex data (Amplitude then Phase)  

        \item A for ASCII data (a value must be enclosed in single or double quotes 

                if it contains whitespace)  

        \item B for Boolean data (False are empty string, 0, or any string 

                starting with F, f, N, or n). 

        nd{itemize} 

        nd{enumerate} 

        If a column is an array, the shape has to be given after the data type 

        without any whitespace. E.g.    exttt{I10} defines an integer vector 

        of length 10.   exttt{A2,5} defines a 2-dim string array with shape 

        [2,5]. Note that        exttt{I} is not the same as     exttt{I1} as the 

        first one defines a scalar and the other one a vector with length 1. 

        The last column can have one variable length axis denoted by the value 

        0. It 'consumes' the remainder of the input line. 

 

        If the argument headerfile is set then the header information is 

        read from that file instead of the first lines of the data file. 

 

        To give a simple example of the form where the header information 

        is located at the top of the data file: 

 

        egin{verbatim} 

        COLI   COLF   COLD       COLX        COLZ       COLS 

         I      R      D          X           Z          A 

        1      1.1    1.11       1.12 1.13   1.14 1.15  Str1 

        10     11     12         13   14     15   16    '' 

        nd{verbatim} 

        Note that a complex number consists of 2 numbers. 

        \Also note that an empty string can be given. 

 

        Let us now give an example of a separate header file that one might use to get 

        interferometer data into \casa: 

 

        egin{verbatim} 

        U     V      W         TIME        ANT1       ANT2      DATA 

        R     R      R          D           I          I        X1,0 

        nd{verbatim} 

 

        The data file would then look like: 

 

        egin{verbatim} 

        124.011 54560.0  3477.1  43456789.0990    1      2        4.327 -0.1132 

        34561.0 45629.3  3900.5  43456789.0990    1      3        5.398 0.4521 

        nd{verbatim} 

        Note that the DATA column is defined as a 2-dim array of 1 

        correlation and a variable number of channels, so the actual number of 

        channels is determined by the input. In this example both rows will 

        have 1 channel (note that a complex value contains 2 values). 

 

        Tables may have keywords in addition to the columns. The keywords 

        are useful for holding information that is global to the entire 

        table (such as author, revision, history, {m etc,}). 

        \The keywords in the header definitions must preceed the column descriptions. 

        They must be enclosed between a line that starts with '.key...' and 

        a line that starts with '.endkey...' (where ... can be anything). 

        Between these two lines each 

        line should contain the following as listed below. 

        A table keywordset and column keywordsets can be specified. 

        The latter can be specified by specifying the column name after the 

        .keywords string. 

 

        egin{itemize} 

        \item The keyword name, e.g., ANYKEY  

        \item The datatype and optional  shape of the keyword 

              (cf. list of valid types above)  

        \item The value or values for the keyword (the keyword may contain  

        a scalar or an array of values). e.g., 3.14159 21.78945  

        nd{itemize} 

 

        Thus to continue the example above, one might wish to add keywords 

        as follows: 

 

        egin{verbatim} 

        .keywords 

        DATE        A  '97/1/16' 

        REVISION    D 2.01 

        AUTHOR      A 'Tim Cornwell' 

        INSTRUMENT  A 'VLA' 

        .endkeywords 

        .keywords TIME 

        UNIT A 's' 

        .endkeywords 

        U     V      W         TIME        ANT1       ANT2      DATA 

        R     R      R          D           I          I        X1,0 

        nd{verbatim} 

        Similarly to the column format string, the keyword formats can also 

        contain shape information. The only difference is that if no shape is 

        given, a keyword can have multiple values (making it a vector). 

 

        It is possible to ignore comment lines in the header and data file 

        by giving the   exttt{commentmarker}. It indicates that lines 

        starting with the given marker are ignored. Note that the marker can 

        be a regular expression (e.g. texttt{' *//'} tells that lines starting 

        with // and optionally preceeded by blanks have to be ignored). 

 

        With the arguments      exttt{firstline} and    exttt{lastline} one can 

        specify which lines have to be taken from the input file. A negative value 

        means 1 for     exttt{firstline} or end-of-file for     exttt{lastline}. 

        Note that if the headers and data are combined in one file, 

        these line arguments apply to the whole file. If headers and data are in 

        separate files, these line arguments apply to the data file only. 

 

        Also note that ignored comment lines are counted, thus are used to 

        determine which lines are in the line range. 

 

        The number of rows is determined by the number of lines read from the data 

        file.  

 

 

        Input Parameters: 

                tablename        Name of table to be created  

                asciifile        Name of ASCII file to be read  

                headerfile       Name of an optional file defining the format  

                autoheader       Determine header information automatically false  

                autoshape        Shape to be used if autoheader=True -1  

                sep              Value separator  

                commentmarker    Regex indicating comment line  

                firstline        First line to use 0  

                lastline         Last line to use -1  

                nomodify         Open Read-only? true  

                columnnames      Column Names  

                datatypes        Data types  

                 

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

                       

        """ 

        return _table.table_fromascii(self, *args, **kwargs) 

 

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

        """ 

        open(self, tablename = string(""), lockoptions = initialize_record("default"),  

            nomodify = True) -> bool 

 

        Summary 

                open an existing table 

 

        Description 

                 

                Opens a disk file containing an existing \casa\ Table. 

 

        Most of the time you just need to specify the tablename and perhaps 

        nomodify. 

 

        A table can be shared by multiple processes by using the appropriate 

        locking options. The possible options are: 

        \- auto: let the system take care of locking. At regular time 

        intervals these autolocks are released to give other processes the 

        opportunity to access the table.  

        \- autonoread: as auto, but no read locking is needed. This must be 

        used with care, because it means that reading can be done while 

        the table tool is not synchronized with the table file (as is 

        normally done when a lock is acquired). The function    exttt{resync} 

        can be used to explicitly synchronize the table tool 

        \- user: the user takes care by explicit calls to lock and unlock 

        \- usernoread: as user and the no readlocking behaviour of autonoread. 

        \- permanent: use a permanent lock; the constructor fails when the table is 

        already in use in another process 

        \- permanentwait: as above, but wait until the other process 

        releases its lock 

        \- default: this is the default option. 

        If the given table is already open, the locking option in use is not 

        changed. Otherwise it reverts to auto. 

        \When auto locking is used, it is possible to give a record containing 

        the fields option, interval, and/or maxwait. In this way advanced 

        users have full control over the locking options. In practice this is 

        hardly ever needed. 

 

 

 

 

        Input Parameters: 

                tablename         

                lockoptions      locking to be used default  

                nomodify         true  

                 

        Example: 

                 

 

 

          # First let's make a table for testing 

          def maketesttable(): 

              # Get path to CASA home directory by stipping name from '$CASAPATH' 

              pathname=os.environ.get('CASAPATH').split()[0] 

              # This is where the 3C273XC1.fits data should be 

              fitsdata=pathname+'/data/demo/3C273XC1.fits' 

              # Remove old table if present 

              !rm -rf 3C273XC1.MS 

              ms.fromfits('3C273XC1.MS',fitsdata) 

              ms.close() 

 

          maketesttable() 

          tb.open('3C273XC1.MS') 

          tb.browse() 

          tb.close() 

 

 

        The first line opens an existing table 3C273XC1.MS, the second browses 

        it using the browse function. 

 

 

          tb.open('3C273XC1.MS', nomodify=False, lockoptions='user') 

          tb.lock(); 

          tb.addrows(); 

          tb.unlock(); 

 

 

        In this example explicit user locking is used. The function lock 

        is needed to acquire a (write) lock before the addrows is done. 

        Thereafter the lock is released to give other processes the chance 

        to operate on the table. 

        \Note that releasing a lock implies flushing the table, so doing 

        that very often can be quite expensive. 

 

 

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

                       

        """ 

        return _table.table_open(self, *args, **kwargs) 

 

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

        """ 

        create(self, tablename = string(""), tabledesc = initialize_record(""),  

            lockoptions = initialize_record("default"),  

            endianformat = string(""), memtype = string(""),  

            nrow = 0, dminfo = initialize_record("")) -> bool 

 

        Summary 

                create a new table 

 

        Description 

                 

                Create a new \casa\ Table. 

 

        Most of the time you just need to specify the table's name and a description of 

        its format. 

 

        A table can be shared by multiple processes by using the appropriate 

        locking options. The possible options are: 

        \- auto: let the system take care of locking. At regular time 

        intervals these autolocks are released to give other processes the 

        opportunity to access the table.  

        \- autonoread: as auto, but no read locking is needed. This must be 

        used with care, because it means that reading can be done while 

        the table tool is not synchronized with the table file (as is 

        normally done when a lock is acquired). The function    exttt{resync} 

        can be used to explicitly synchronize the table tool 

        \- user: the user takes care by explicit calls to lock and unlock 

        \- usernoread: as user and the no readlocking behaviour of autonoread. 

        \- permanent: use a permanent lock; the constructor fails when the table is 

        already in use in another process 

        \- permanentwait: as above, but wait until the other process 

        releases its lock 

        \- default: this is the default option. 

        If the given table is already open, the locking option in use is not 

        changed. Otherwise it reverts to auto. 

        \When auto locking is used, it is possible to give a record containing 

        the fields option, interval, and/or maxwait. In this way advanced 

        users have full control over the locking options. In practice this is 

        hardly ever needed. 

 

 

 

 

        Input Parameters: 

                tablename         

                tabledesc        description of the table's format  

                lockoptions      locking to be used default  

                endianformat      

                memtype           

                nrow             0  

                dminfo           Data Manager information  

                 

        Example: 

                 

 

 

          # First let's get sample descriptions of a table and its data managers. 

          import os, shutil 

 

          def get_tabledesc_and_dminfo(tabname='3C273XC1.MS'): 

              made_copy = False 

 

              # Fetch new table if tabname not present 

              if not os.path.isdir(tabname): 

                  # Get path to CASA root directory by stripping name from '$CASAPATH' 

                  pathname = os.environ.get('CASAPATH').split()[0] 

 

                  # There should be some data here 

                  fitsdata = pathname + '/data/demo/3C273XC1.fits' 

                  tabname = '3C273XC1.MS' 

 

                  ms.fromfits(tabname, fitsdata) 

                  ms.close() 

                  made_copy = True 

 

              tb.open(tabname) 

              tabdesc = tb.getdesc() 

              dminfo  = tb.getdminfo() 

              print tabname, 'has', tb.nrows(), 'rows.' 

              tb.close() 

 

              # Clean up 

              if made_copy: 

                  shutil.rmtree(tabname) 

 

              return tabdesc, dminfo 

 

          tabdesc, dmi = get_tabledesc_and_dminfo() 

          tabdesc  # prints tabdesc 

          dmi      # prints dmi 

 

          # You could alter tabdesc and/or dmi at this point. 

 

          # Unnecessary, but just to show there is nothing up my sleeve... 

          tb.close() 

 

          tb.create('myempty.ms', tabdesc, dminfo=dmi) 

          tb.nrows()     # 0L 

          tb.addrows(5)  # Add the rows _before_ filling the columns. 

          tb.putcol('ARRAY_ID', numpy.array([0 for i in range(5)])) 

          tb.putcol('ANTENNA1', numpy.array(range(5))) 

          tb.putcol('ANTENNA2', numpy.array(range(1,6))) 

          tb.browse()    # Still mostly, but not completely, empty. 

          tb.close() 

 

 

        This creates a CASA table using a description of a table and its data managers from an existing MS. 

 

 

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

                       

        """ 

        return _table.table_create(self, *args, **kwargs) 

 

    def flush(self): 

        """ 

        flush(self) -> bool 

 

        Summary 

                flush the current contents to disk 

 

        Description 

                 

        Until a flush is performed, the results of all operations 

        are not reflected in any change to the 

        disk file. Hence you {m must} do a flush to write the changes 

        to disk. 

 

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

                       

        """ 

        return _table.table_flush(self) 

 

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

        """ 

        fromASDM(self, tablename, xmlfile) -> bool 

 

        Summary 

                Create an CASA table from an ASDM table 

 

        Description 

                 

        .keywords 

        DATE        A  '07/7/23' 

        REVISION    D 0  

        AUTHOR      A 'Paulo C. Cortes' 

        INSTRUMENT  A 'ALMA' 

        .endkeywords 

 

        The main function for this task is to create a CASA::Table from a XML  ASDM Table. The classes asdmCasaXMLUtil and asdmCasaSaxHandler are the main objects which 

        implement the task. The asdmCasaSaxHandler encapsulate all the operations  

        returning a reference to a CASA::Table. The class uses xerces-c to parse the 

        XML table and creates the CASA::Table. The implementation assumes the integrity 

        of the XML data, it not attempting to check whether the XML  data meets a  

        column format or not. In detail, an ArrayString column should agree with 

        the following format: nd nx ... data, where nd is the number of dimensions, 

        nx is the size of the first dimension (implemented upto a cube, i.e. nx,ny,nz), 

        and data is the array itself which should have the appropiate number of  

        elements. For example, a VectorString column could be: 1 2 'I' 'Q' or  

        dimension 1, size 2, and two string elements. Due to the lack of data type 

        spefication in the XML tables, the column names are hardcoded into the  

        asdmCasaSaxHandler based on the ASDM specification (see  

        http://aramis.obspm.fr/~alma/ASDM/ASDMEntities/index.html).  

        While missing data from a table column will be accepted by the task,  

        any new column beyond the specification has to be added into the class, also, 

        any change in data types form the specificatin will produce a crash, CASA 

        is picky with data types integrity. So far, the list of tables included in  

        the class is: 

 

        AlmaCorrelatorMode.xml, 

        Antenna.xml 

        ConfigDescription.xml, 

        DataDescription.xml, 

        ExecBlock.xml, 

        Feed.xml, 

        Field.xml, 

        Main.xml, 

        Polarization.xml, 

        Processor.xml, 

        Receiver.xml, 

        SBSummary.xml, 

        Scan.xml, 

        Source.xml, 

        SpectralWindow.xml, 

        State.xml, 

        Station.xml, 

        Subscan.xml, 

        SwitchCycle.xml, 

        CalCurve.xml, 

        CalData.xml, 

        CalPhase.xml 

 

        more tables will follow. The usage of fromASDM is simple, it gets two 

        string, tablename and xmlfile, where tablename is the CASA::Table to be 

        written and xmlfile represents the ASDM XML table. To call it do: 

        tb.fromasdm(tablename,xmlfile) 

 

 

 

        Input Parameters: 

                tablename        Name of table to be created  

                xmlfile          Name of the XML file to be read  

                 

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

                       

        """ 

        return _table.table_fromASDM(self, *args, **kwargs) 

 

    def resync(self): 

        """ 

        resync(self) -> bool 

 

        Summary 

                resync the table tool with table file 

 

        Description 

                 

        Acquiring a read or write lock automatically synchronizes the internals 

        of the table tool with the actual contents of the table files. 

        In this way different processes accessing the same table always 

        use the same table data. 

        \However, a table can be used without read locking. In that case 

        the table tool internals are not synchronized automatically. 

        The resync function offers a way to do explicit synchronization. 

        It is only useful if the table is opened with locking mode 

                exttt{autonoread} or    exttt{usernoread}. 

 

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

                       

        """ 

        return _table.table_resync(self) 

 

    def close(self): 

        """ 

        close(self) -> bool 

 

        Summary 

                close the table tool 

 

        Description 

                 

        First a flush is done, then the table is closed inside casapy and 

        is no longer available for use. 

 

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

                       

        """ 

        return _table.table_close(self) 

 

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

        """ 

        copy(self, newtablename, deep = False, valuecopy = False, dminfo = initialize_record(""),  

            endian = string("aipsrc"),  

            memorytable = False, returnobject = False,  

            norows = False) -> table 

 

        Summary 

                copy a table 

 

        Description 

                 

        Copy the table. All subtables are also copied. 

        References to another table are preserved. 

 

        The argument    exttt{deep} determines how a reference table (i.e. the 

        result of a query) is copied. By default 

        a file copy is made, thus the resulting table still contains 

        references and no actual data. If, however,     exttt{deep=True} is given, 

        a deep copy is made which means that the actual data are copied. Also 

        all subtables are copied. 

        \Normally a plain table is copied by copying the files. However, 

        if      exttt{deep=True} and    exttt{valuecopy=True} are given, a plain table is 

        copied by copying all its values and subtables. This is useful to 

        reorganize the tables, i.e. to regain file space that is wasted by 

        frequent updates to a table. 

        \The argument   exttt{dminfo} can be used to specify explicit data 

        manager info for the columns in the new plain table. It can be used to 

        change, for example, a storage manager from IncrStMan to StandardStMan. 

        The     exttt{dminfo} is a record as returned by the 

        getdminfo 

        If      exttt{dminfo} is a non-empty record, it forces  exttt{valuecopy=True}. 

 

        The standard operation is make the copy to a plain table. It is, 

        however, possible to copy to a memory table by giving   exttt{memorytable=True}. 

 

        The endian format for the newly created table can be specified. This 

        is only meaningful if a deep copy is made to a plain table. 

        The possible values are: 

        \- big: big endian format (as used on e.g. SUN) 

        \- little: little endian format (as used on e.g. PC) 

        \- local: use the endian format of the machine being used 

        \- aipsrc: use the endian format specified in aipsrc variable 

        table.endianformat (which defaults to big). 

        \The default is aipsrc. 

 

        Normally the    exttt{copy} function only copies the table and does not 

        create a new table tool object. The user can do that by opening the newly 

        created table in the standard way. However, it is possible to get an 

        object back by using    exttt{returnobject=True}. An object is always 

        returned if the copy is made to a memory table. 

 

 

        Input Parameters: 

                newtablename     Name of newtable on disk  

                deep             Make a deep copy of a reference table? false  

                valuecopy        Make a deep copy of any table? false  

                dminfo           Data manager info for new table  

                endian           Endian format of new table aipsrc  

                memorytable      Hold new table in memory? false  

                returnobject     Return a tool object for the new table false  

                norows           Don't copy any rows (useful for copying only the table structure) false  

                 

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

                       

        """ 

        return _table.table_copy(self, *args, **kwargs) 

 

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

        """ 

        copyrows(self, outtable, startrowin = 0, startrowout = -1, nrow = -1) -> bool 

 

        Summary 

                copy rows from this table to another 

 

        Description 

                 

        Copy rows from this table to another. By default all rows of this 

        table are appended to the output table. It is possible though to 

        control which rows are copied. 

        \Rows are added to the output table as needed. 

        Because no rows can be added to a reference table, it is only possible 

        to overwrite existing rows in such tables. 

 

        Only the data of columns existing in both tables will be copied. 

        Thus by making a reference table consisting of a few columns, it 

        is possible to copy those columns only. 

 

 

        Input Parameters: 

                outtable         table object of output table  

                startrowin       First row to take from input table 0  

                startrowout      First row to write in output table, -1 (=end) -1  

                nrow             Nr of rows to copy, -1 (=all) -1  

                 

        Example: 

                 

        This example appends rows to the table itself, thus doubles the number 

        of rows. 

 

          tb.open('3C273XC1.MS',nomodify=False) 

          tb.copyrows('3C273XC1.MS') 

          tb.close() 

 

        This example copies 10 rows of the selected subset of the MS to the 

        beginning of the output MS. 

 

          !rm -rf in.MS out.MS 

          ms.fromfits('in.MS','3C273XC1.fits')       #Make two MSs 

          ms.fromfits('out.MS','3C273XC1.fits')      #for example 

          ms.close() 

          tb.open('in.MS') 

          t1 = tb.query('ANTENNA1==0') 

          tb.close() 

          t1.copyrows('out.MS',nrow=10,startrowout=0) 

          t1.close() 

 

 

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

                       

        """ 

        return _table.table_copyrows(self, *args, **kwargs) 

 

    def done(self): 

        """ 

        done(self) -> bool 

 

        Summary 

                end the table tool 

 

        Description 

                 

        Effectively a synonym for function close. 

 

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

                       

        """ 

        return _table.table_done(self) 

 

    def iswritable(self): 

        """ 

        iswritable(self) -> bool 

 

        Summary 

                is the table writable? 

 

        Description 

                 

        Test if the table is opened for write. 

 

 

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

                       

        """ 

        return _table.table_iswritable(self) 

 

    def endianformat(self): 

        """ 

        endianformat(self) -> string 

 

        Summary 

                get the endian format used for this table 

 

        Description 

                 

        Get the endian format used for this table. 

        It returns a string with value 'big' or 'little'. 

 

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

                       

        """ 

        return _table.table_endianformat(self) 

 

    def lock(self, write = True, nattempts = 0): 

        """ 

        lock(self, write = True, nattempts = 0) -> bool 

 

        Summary 

                acquire a lock on the table 

 

        Description 

                 

        Try to acquire a read or write lock on the table. Nothing will be 

        done if the table is already correctly locked by this process. 

        It is only needed when user locking is used. 

        When the lock is acquired, the internal caches will be synchronized 

        with the (possibly changed) contents of the table. 

        \It is possible to specify the number of attempts to do (1 per 

        second) in case the table is locked by another process. The default 0 

        is trying indefinitely. 

 

 

        Input Parameters: 

                write            Write lock? (F=read lock) true  

                nattempts        Nr of attempts 0  

                 

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

                       

        """ 

        return _table.table_lock(self, write, nattempts) 

 

    def unlock(self): 

        """ 

        unlock(self) -> bool 

 

        Summary 

                unlock and flush the table 

 

        Description 

                 

        The table is flushed and the lock on the table is released. 

        This function is only needed when user locking is used. 

        However, it is also possible to use it with auto locking. In that case 

        the lock will automatically be re-acquired before the next table operation. 

 

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

                       

        """ 

        return _table.table_unlock(self) 

 

    def datachanged(self): 

        """ 

        datachanged(self) -> bool 

 

        Summary 

                has data changed in table? 

 

        Description 

                 

        This function tests if data in the table have changed (by another 

        process) since the last call to this function. 

 

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

                       

        """ 

        return _table.table_datachanged(self) 

 

    def haslock(self, write = True): 

        """ 

        haslock(self, write = True) -> bool 

 

        Summary 

                has this process a lock on the table? 

 

        Description 

                 

        Has this process a read or write lock on the table? 

 

 

        Input Parameters: 

                write            Has it a write lock? (F=read lock) true  

                 

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

                       

        """ 

        return _table.table_haslock(self, write) 

 

    def lockoptions(self): 

        """ 

        lockoptions(self) -> record 

 

        Summary 

                get the lock options used for this table 

 

        Description 

                 

        Get the lock options used for this table. 

        It returns a record with the fields: option, interval and maxwait. 

        The record can be used as the lockoptions argument when opening a table. 

 

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

                       

        """ 

        return _table.table_lockoptions(self) 

 

    def ismultiused(self, checksubtables = False): 

        """ 

        ismultiused(self, checksubtables = False) -> bool 

 

        Summary 

                is the table in use in another process? 

 

        Description 

                 

        Is the table still in use in another process? 

        If so, the table cannot be deleted. 

 

 

        Input Parameters: 

                checksubtables   check if subtables are multiused?) false  

                 

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

                       

        """ 

        return _table.table_ismultiused(self, checksubtables) 

 

    def browse(self): 

        """ 

        browse(self) -> bool 

 

        Summary 

                browse a table using a graphical browser 

 

        Description 

                 

        To start the browser, the environment variable 

        DISPLAY must be set. 

 

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

                       

        """ 

        return _table.table_browse(self) 

 

    def name(self): 

        """ 

        name(self) -> string 

 

        Summary 

                return name of table on disk 

 

        Description 

                 

        Gives the name of the \casa\ table on disk that the 

        table tool has open. 

 

        Example: 

                 

 

          tb.open('3C273XC1.MS') 

          tb.name() 

        # 3C273XC1.MS 

 

 

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

                       

        """ 

        return _table.table_name(self) 

 

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

        """ 

        createmultitable(self, outputTableName, tables, subdirname) -> bool 

 

        Summary 

                 

                Create a virtually concatenated table 

                 

 

        Description 

                 

                 

 

        Input Parameters: 

                outputTableName  name of the concatenated table  

                tables           list of the names of the tables to be concatenated  

                subdirname       optional name of the subdirectory into which the input tables are moved  

                 

        Example: 

                 

                 

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

                       

        """ 

        return _table.table_createmultitable(self, *args, **kwargs) 

 

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

        """ 

        toasciifmt(self, asciifile, headerfile = string(""), columns = std::vector< string >(1, ""),  

            sep = string("")) -> bool 

 

        Summary 

                Write casa table into an ASCII format  

 

        Description 

                 

        Write a table into an ASCII format approximately compatible with fromascii except that in order to permit variable shaped arrays (as they often occur in MSs), array values are output enclosed in square brackets.  

        The separator between values can be specified and defaults to a blank. Note that columns containing 

        invalid data or record type data are ignored and a warning is issued. 

 

        If the argument headerfile is set then the header information is 

        written to that file instead of the first two lines of the data file. 

 

 

        Input Parameters: 

                asciifile        Name of ASCII file to be written  

                headerfile       Name of an optional file defining the format  

                columns          Names of columns to be written, default is all  

                sep              Value separator, default is one blank  

                 

        Example: 

                 

 

        tb.toasciifmt(asciifile='myfile3.dat', headerfile='myfile3.head', columns=['SOURCE_ID', 'NAME', 'PROPER_MOTION'], sep=', ') 

 

 

        will produce a comma separated ASCII output of the three columns 'SOURCE_ID', 'NAME', and 'PROPER_MOTION' in file 'myfile3.dat' 

        and a format description in 'myfile3.head'.  

 

 

        tb.toasciifmt(asciifile='myfile.dat') 

 

 

        will produce a space separated ASCII output of all table columns into file 'myfile.dat' 

        with the first two lines containing a format description.  

 

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

                       

        """ 

        return _table.table_toasciifmt(self, *args, **kwargs) 

 

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

        """ 

        taql(self, taqlcommand = string("TaQL expression")) -> table 

 

        Summary 

                Make a table from a TaQL command.  

 

        Description 

                This method Expose TaQL to the user. 

                        Details on TaQL maybe found at http://www.astron.nl/aips++/docs/notes/199 

 

        Input Parameters: 

                taqlcommand      TaQL expression TaQL expression  

                 

        Example: 

                 

                For more information on TaQL see http://www.astron.nl/aips++/docs/notes/199 

 

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

                       

        """ 

        return _table.table_taql(self, *args, **kwargs) 

 

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

        """ 

        query(self, query = string("String"), name = string(""), sortlist = string(""),  

            columns = string(""), style = string("")) -> table 

 

        Summary 

                Make a table from a query 

 

        Description 

                 

        Make a table from a query applied to the current table.  It is possible to 

        specify column(s) and/or expressions to sort on and to specify the 

        columns to be contained in the output table.  See the example below. 

        A new 'on-the-fly' table tool is returned. The new (reference) table 

        can be given a name and will then be written to disk. Note that the 

        resulting table is just a reference to the original table.  One can 

        make a deep copy of the query result using the copy function (see example). 

 

 

 

 

        Input Parameters: 

                query            Query string String  

                name             Name of resulting reference table  

                sortlist         Sort string (one or more expressions separated by commas)  

                columns          List of column names separated by commas  

                style            How to handle numeric ranges and order axes  

                 

        Example: 

                 

 

          tb.open('3C273XC1.MS') 

          subt=tb.query('OBSERVATION_ID==0', 

                        sortlist='ARRAY_ID', columns='TIME, DATA, UVW') 

          print subt.ncols() 

        # 23 

          tb.close() 

          copyt = subt.copy ('3C273XC1_spw1.MS', True) 

          subt.close() 

          copyt.close() 

 

        From the original table corresponding to the disk file 3C273XC1.MS, only rows 

        with OBSERVATION\_ID equal to 0 are selected and sorted by ARRAY\_ID. Only the 

        columns TIME DATA UVW are written. Thereafter a deep copy of the result is 

        made.  This table query command is equivalent to the Table Query Language 

        (TaQL) command 

 

          SELECT TIME, DATA, UVW 

          FROM 3C273XC1.MS 

          WHERE OBSERVATION_ID==0 

          ORDERBY ARRAY_ID 

 

        See http://www.astron.nl/casacore/trunk/casacore/doc/notes/199.html for an explanation of TaQL. 

 

        If 'style' is not blank, 'using style \<style\> ' is prepended to the 

        query.  See 

        http://www.astron.nl/casacore/trunk/casacore/doc/notes/199.html#x1-50002.2 for 

        an explanation and list of choices for style.  The default (glish) style is 

        1-based, inclusive end, and Fortran ordering.  You may prefer python (0-based, 

        exclusive end, and C order) style. 

 

        tb.open('any_data') 

        tsel = tb.selectrows([0]) 

        print tsel.nrows() # returns 1 

        tsel = tb.query('ROWNUMBER()==0') 

        print tsel.nrows() # returns 0 

        tsel = tb.query('ROWNUMBER()==0', style='python') 

        print tsel.nrows() # returns 1 

        tb.close() 

 

        Note that style had no effect on the 'OBSERVATION_ID==0' query above. 

 

 

        Example: 

                 

        The sortlist argument can be used to sort in ascending or descending 

        order (or a mix of them) on one or more columns. Default is ascending. 

        It is also possible to remove duplicate values using the word 

        NODUPLICATES at the beginning. 

 

        E.g.: 

 

 

          sortlist='TIME desc' 

          sortlist='noduplicates ANTENNA1,ANTENNA2' 

          sortlist='ANTENNA1 desc, ANTENNA2 asc' 

          sortlist='desc ANTENNA1, ANTENNA2, TIME' 

 

 

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

                       

        """ 

        return _table.table_query(self, *args, **kwargs) 

 

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

        """ 

        calc(self, expr, prefix = string("using style base0, endincl, fortranorder"),  

            showtaql = False) -> variant 

 

        Summary 

                 TaQL expression with calc to calculate an expression on a table 

 

        Description 

                 

 

 

        Get the result from the calculation of an expression on a table 

 

        The expression can be any expression that can be given in the WHERE 

        clause of a SELECT expression (thus including subqueries). 

        The given expression determines if the result is a scalar, a vector, 

        or a record containing arrays. See the examples below. 

 

 

        Input Parameters: 

                expr             Expression string  

                prefix           TaQL prefix for style and ordering etc ...check TaQL note 199 for usage using style base0, endincl, fortranorder  

                showtaql         Show the full taql command used false  

                 

        Example: 

                 

 

 

        tb.calc('[select from ngc5921.ms  giving [mean(abs(DATA))]]') 

 

        find the mean of the abs of each row of the  DATA column of the MeasurementSet ngc5921.ms  

 

        returns a (potentially enormous) record where a field contains the 

        value of the expression for the row with that number. Note that it 

        returns a record because for each row the expression results in an array. 

        It should be clear that this example is useless. However, something 

        like this could be useful for a column with (very) small arrays. 

 

        tb.calc('[select from ngc5921.ms.contsub giving  [ntrue(FLAG)]]') 

          

 

        returns for each row the number of flags set. The result is a vector, 

        because for each row the expression results in a scalar. 

 

 

        tb.calc('sum([select from ngc5921.ms.contsub giving  [ntrue(FLAG)]])') 

 

        returns the total number of flags set in the table (in a single 

        scalar). 

 

        using subrow array  

        tb.calc('median([select from ngc5921.ms where ANTENNA1==3 && ANTENNA2==5 giving [abs(DATA[0,31])]])') 

 

        The above will find the median channel 31 and 0th pol of the requested  baseline formed with antennas 3 and 5. 

        Note that the that the default casa order of arrays is fortran order ...pol axis is before channel axis 

 

        tb.calc('median([select from ngc5921.ms where ANTENNA1==3 && ANTENNA2==5 giving [abs(DATA[31, 0])]])', prefix='using style python') 

 

        Now the same is as the above but using the python style of axis ordering access 

 

 

 

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

                       

        """ 

        return _table.table_calc(self, *args, **kwargs) 

 

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

        """ 

        selectrows(self, rownrs, name = string("")) -> table 

 

        Summary 

                Make a table from a selection of rows 

 

        Description 

                 

        Create a (reference) table containing a given subset of rows. 

        It is, for instance, useful when a selection is done 

        on another table containing the row numbers in the main table. 

        It can be useful to apply the casapy function unique to those 

        row numbers, otherwise the same row might be included multiple 

        times (see example). 

 

 

 

        It is possible to give a name to the resulting table. If given, 

        the resulting table is made persistent with that table name. 

        Otherwise the table is transient and disappears when closed or when 

        casapy exits. 

 

        The rownumbers function returns a 

        vector containing the row number in the main table for each row in the 

        selection table. 

        Thus given a row number vector  exttt{rownrs}, the following is 

        always true. 

        egin{verbatim} 

          rownrs == tb.selectrows(rownrs).rownumbers() 

        nd{verbatim} 

        However, it is not true when selectrows is used on a selection table. 

        because         exttt{rownumbers} does not return the row number in that 

        selection table but in the main table. 

        \It means that one has to take great care when using 

                exttt{selectrows} on a selection table. 

 

 

        Input Parameters: 

                rownrs           0-based Row Numbers  

                name             Name of resulting table  

                 

        Example: 

                 

 

        # EXAMPLE NOT VERIFIED SINCE query IS BROKEN 

        #   Do the query on the main table. 

          tb.open('SOMENAME') 

          scantable = tb.query(command) 

        #   Get the column containing the 0-based row numbers in the BACKEND table. 

        #   Make the row numbers unique.  NEED TO REPLACE GLISH unique FUNCTION HERE! 

          backrows = unique(scantable.getcol('NS_GBT_BACKEND_ID')) 

        #   Form the table subset of the BACKEND table containing those rows. 

          tb.close() 

          tb.open('SOMENAME/GBT_BACKEND') 

          scanback = tb.selectrows(backrows); 

        #   Do something with that table. 

          print scanback.nrows(); 

 

 

 

 

 

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

                       

        """ 

        return _table.table_selectrows(self, *args, **kwargs) 

 

    def info(self): 

        """ 

        info(self) -> record 

 

        Summary 

                get the info record 

 

        Description 

                 

        The info record contains information on the table.  

 

 

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

                       

        """ 

        return _table.table_info(self) 

 

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

        """ 

        putinfo(self, value) -> bool 

 

        Summary 

                set the info record 

 

        Description 

                 

        The info record contains information on the table. It is 

        written by applications, and used  to determine what type of 

        information is stored in a table. 

 

 

 

        Input Parameters: 

                value            Info record  

                 

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

                       

        """ 

        return _table.table_putinfo(self, *args, **kwargs) 

 

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

        """ 

        addreadmeline(self, value) -> bool 

 

        Summary 

                add a readme line to the info record 

 

        Description 

                 

        A readme line is part of the info record associated with a table. 

        It is to inform the user, and is not used by any application directly. 

 

 

        Input Parameters: 

                value            readme line  

                 

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

                       

        """ 

        return _table.table_addreadmeline(self, *args, **kwargs) 

 

    def summary(self, recurse = False): 

        """ 

        summary(self, recurse = False) -> bool 

 

        Summary 

                summarize the contents of the table 

 

        Description 

                 

        A (terse) summary of the table contents is sent to the defaultlogger. 

 

 

        Input Parameters: 

                recurse          Summarize subtables recursively false  

                 

        Example: 

                 

 

          tb.open('tcal') 

          tb.summary() 

        # successful nomodify open of table  tcal :  9 columns, 11 rows 

        # Table summary: tcal 

        # Shape: 9 columns by 11 rows 

        # Info: [type=Calibration, subType=T Jones, readme=] 

        # Table keywords: [Type=T Jones, Interval=30, DeltaT=1] 

        # Columns: StartTime StopTime Gain SolutionOK Fit FitWeight 

        # iSolutionOK iFit iFitWeight 

 

 

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

                       

        """ 

        return _table.table_summary(self, recurse) 

 

    def colnames(self): 

        """ 

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

 

        Summary 

                return the names of the columns 

 

        Description 

                 

        The names of the columns in the table are returned as a vector 

        of Strings. 

 

        Example: 

                 

 

          tb.open('tcal') 

          tb.colnames() 

        # StartTime StopTime Gain SolutionOK Fit FitWeight iSolutionOK iFit iFitWeight 

 

 

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

                       

        """ 

        return _table.table_colnames(self) 

 

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

        """ 

        rownumbers(self, tab = initialize_record(""), nbytes = 0) -> std::vector<(int)> 

 

        Summary 

                !!!INPUT PARAMETERS IGNORED!!! return the row numbers in the (reference) table 

 

        Description 

                 

 

        !!!NOTE INPUT PARAMETERS IGNORED!!! 

 

        This function can be useful after a selection or a sort. 

        It returns the row numbers of the rows in this table with respect 

        to the given table. If no table is given, the original table is used. 

        \For example: 

        egin {verbatim} 

        !!!NOTE INPUT PARAMETERS IGNORED!!! 

 

          tb.open('3C273XC1.MS') 

          t1=tb.selectrows([1,3,5,7,9]) 

          t1.rownumbers() 

        # [1L, 3L, 5L, 7L, 9L] 

          t2=t1.selectrows([2,4]) 

          t2.rownumbers(t1) 

        # [2L, 4L] 

          t2.rownumbers(tb.name()) 

        # [5L, 9L] 

          t2.rownumbers() 

        # [5L, 9L] 

        nd{verbatim} 

        The last statements show that the function returns the row numbers 

        referring to the given table. Table t2 contains rows 2 and 4 in table t1, 

        which are rows 5 and 9 in table '3C273XC1.MS'. 

 

        Note that when a table is opened using its name, that table can 

        be a reference table. Thus in the example above 

        the last 2 statements may give different results depending on the fact 

        if 3C273XC1.MS is a reference table or not. 

        \The function should always be called with a table argument. 

        The ability of omitting the argument is only present for backward 

        compatibility. 

 

        The function can be useful to get the correct values from the result of a 

        getcol or getcolslice on the original table. 

 

        !!!NOTE INPUT PARAMETERS IGNORED!!! 

 

 

        Input Parameters: 

                tab              Table to which the row numbers refer  

                nbytes           Maximum cache size in bytes 0  

                 

        Example: 

                 

 

        !!!NOTE INPUT PARAMETERS IGNORED!!! 

          tb.open('3C273XC1.MS') 

          tb.nrows() 

        #7669L 

          data=tb.getcolslice('DATA', [0,0], [0,0]) 

          data.shape 

        #(1, 1, 7669) 

          selt=tb.query('ANTENNA1==1') 

          selt.nrows() 

        #544L 

          print len(selt.rownumbers()) 

        #544L 

 

 

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

                       

        """ 

        return _table.table_rownumbers(self, *args, **kwargs) 

 

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

        """ 

        setmaxcachesize(self, columnname, nbytes) -> bool 

 

        Summary 

                set maximum cache size for column in the table 

 

        Description 

                 

        It can sometimes be useful to limit the size of the cache used by 

        a column stored with the tiled storage manager. 

        This function requires some more knowledge about the table system 

        and is not meant for the casual user. 

 

 

        Input Parameters: 

                columnname       Name of column  

                nbytes           Maximum cache size in bytes  

                 

        Example: 

                 

 

          tb.open('3C273XC1.MS') 

          tb.nrows() 

        # 7669L 

          tb.setmaxcachesize ('DATA', 4*1024*1024); 

        # True 

 

 

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

                       

        """ 

        return _table.table_setmaxcachesize(self, *args, **kwargs) 

 

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

        """ 

        isscalarcol(self, columnname) -> bool 

 

        Summary 

                is the specified column scalar? 

 

        Description 

                 

        A column may contain either scalars or arrays in each cell.  

        This tool function tests if the specified column has scalar contents. 

 

 

        Input Parameters: 

                columnname       Name of column  

                 

        Example: 

                 

 

          tb.open('tcal') 

          tb.isscalarcol('StartTime') 

        # True 

          tb.open('tcal') 

          tb.isscalarcol('Gain') 

        # False 

 

 

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

                       

        """ 

        return _table.table_isscalarcol(self, *args, **kwargs) 

 

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

        """ 

        isvarcol(self, columnname) -> bool 

 

        Summary 

                tell if column contains variable shaped arrays 

 

        Description 

                 

        This functions tells if the column contains variable shaped arrays. 

        If so, the function     exttt{getvarcol} should be used to get the 

        entire column. Otherwise        exttt{getcol} can be used. 

 

 

        Input Parameters: 

                columnname       Name of column  

                 

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

                       

        """ 

        return _table.table_isvarcol(self, *args, **kwargs) 

 

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

        """ 

        coldatatype(self, columnname) -> string 

 

        Summary 

                return the column data type 

 

        Description 

                 

        A column may contain various data types. This tool function returns the 

        type of the column as a string. 

 

 

        Input Parameters: 

                columnname       Name of column  

                 

        Example: 

                 

 

          tb.open('tcal') 

          tb.coldatatype('StartTime') 

        # double 

          tb.open('tcal') 

          tb.coldatatype('Gain') 

        # complex 

 

 

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

                       

        """ 

        return _table.table_coldatatype(self, *args, **kwargs) 

 

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

        """ 

        colarraytype(self, columnname) -> string 

 

        Summary 

                return the column array type 

 

        Description 

                 

        The possible column array types are defined as: 

        egin{description} 

        \item[FixedShape]  FixedShape means that the shape of the array must be the 

        same in each cell of the column. If not given, the array 

        shape may vary. Option Direct forces FixedShape.  

        \item[Direct] Direct means that the data is directly stored in the  

        table. Direct forces option FixedShape. If not given, the array is 

        indirect, which implies that the data will be stored in a 

        separate file.   

        nd{description} 

 

 

        Input Parameters: 

                columnname       Name of column  

                 

        Example: 

                 

 

          tb.open('tcal') 

          tb.colarraytype('Gain') 

        # Direct,FixedShape 

 

 

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

                       

        """ 

        return _table.table_colarraytype(self, *args, **kwargs) 

 

    def ncols(self): 

        """ 

        ncols(self) -> int 

 

        Summary 

                return number of columns 

        Example: 

                 

 

          tb.open('3C273XC1.MS') 

          tb.ncols() 

        # 23L 

 

 

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

                       

        """ 

        return _table.table_ncols(self) 

 

    def nrows(self): 

        """ 

        nrows(self) -> int 

 

        Summary 

                return number of rows 

 

        Description 

                 

        Note that rows are numbered starting at 0. 

 

        Example: 

                 

 

          tb.open('3C273XC1.MS') 

          tb.nrows() 

        # 7669L 

 

 

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

                       

        """ 

        return _table.table_nrows(self) 

 

    def addrows(self, nrow = 1): 

        """ 

        addrows(self, nrow = 1) -> bool 

 

        Summary 

                add a specified number of rows 

 

        Description 

                 

        Rows can be added to the end of a table that was opened nomodify=False. 

        The new rows are empty. 

 

 

        Input Parameters: 

                nrow             Number of rows to add 1  

                 

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

                       

        """ 

        return _table.table_addrows(self, nrow) 

 

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

        """ 

        removerows(self, rownrs) -> bool 

 

        Summary 

                remove the specified rows 

 

        Description 

                 

        Remove the row numbers specified in the vector from the table. 

        It fails when the table does not support row removal. 

 

 

        Input Parameters: 

                rownrs           Row numbers to remove  

                 

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

                       

        """ 

        return _table.table_removerows(self, *args, **kwargs) 

 

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

        """ 

        addcols(self, desc, dminfo = initialize_record("")) -> bool 

 

        Summary 

                !!!REQUIRES COLUMN DESCRIPTION FUNCTIONS THAT HAVE NOT BEEN IMPLEMENTED!!! 

        add one or more columns 

 

        Description 

                 

        Columns can be added to a table that was opened nomodify=False. 

        The new columns will be filled with a default value (0 or blank). 

 

 

        !!!THESE COLUMN DESCRIPTION FUNCTIONS HAVE NOT BEEN IMPLEMENTED!!! 

        \For each column to be added a column description has to be setup 

        using function 

        tablecreatescalarcoldesc or 

        tablecreatearraycoldesc. 

        When multiple columns are used, they have to be combined in a single 

        record using 

        tablecreatedesc.  

        \It is possible to specify data manager info in order to define a 

        data manager (storage manager or virtual column engine) for the 

        columns to be added. 

 

 

        Input Parameters: 

                desc             Description of one or more columns  

                dminfo           Optional description data manager to use  

                 

        Example: 

                 

 

        !!!REQUIRES COLUMN DESCRIPTION FUNCTIONS THAT HAVE NOT BEEN IMPLEMENTED!!! 

          tb.open('mytable', nomodify=False) 

          dc3=tablecreatescalarcoldesc('C3', 'a')    

          dc4=tablecreatescalarcoldesc('C4', as_float(0)) 

          dc5=tablecreatearraycoldesc('C5', as_double(0), 2, [10,20]) 

          tb.addcols(dc3) 

        # True 

          tb.addcols(tablecreatedesc(dc4, dc5)) 

        # True 

 

        A single column can be added as such, but multiple columns have 

        to be combined. 

 

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

                       

        """ 

        return _table.table_addcols(self, *args, **kwargs) 

 

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

        """ 

        renamecol(self, oldname, newname) -> bool 

 

        Summary 

                rename a column 

 

        Description 

                 

        A column can be renamed in a table that was opened nomodify=False. 

        \However, renaming is not possible in a (reference) table resulting 

        from a select or sort operation. 

 

 

        Input Parameters: 

                oldname          name of column to be renamed  

                newname          new name of column  

                 

        Example: 

                 

 

          tb.open('3C273XC1.MS', nomodify=False) 

          tb.renamecol ('DATA', 'DATA2') 

        # T 

          print tb.colnames() 

          tb.renamecol ('DATA2', 'DATA') 

        # T 

          print tb.colnames() 

 

        Column  exttt{DATA} is renamed to       exttt{DATA2} and then back to 

                exttt{DATA} again.. 

 

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

                       

        """ 

        return _table.table_renamecol(self, *args, **kwargs) 

 

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

        """ 

        removecols(self, columnames) -> bool 

 

        Summary 

                remove one or more columns 

 

        Description 

                 

        Columns can be removed from a table that was opened nomodify=False. 

        \It may not always be possible to remove a column, because some data 

        managers do not support column removal. However, if all columns of 

        a data manager are removed, it will always succeed. It results in the 

        removal of the entire data manager (and its possible files). 

        \Note that function getdminfo 

        can be used to find which columns are served by which data manager. 

 

 

        Input Parameters: 

                columnames       names of columns to be removed  

                 

        Example: 

                 

 

          tb.open('mytable', nomodify=False) 

          tb.removecols ('col1 col2') 

        # T 

          print tb.colnames() 

 

        Two columns are removed. 

 

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

                       

        """ 

        return _table.table_removecols(self, *args, **kwargs) 

 

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

        """ 

        iscelldefined(self, columnname, rownr = 0) -> bool 

 

        Summary 

                test if a specific cell contains a value 

 

        Description 

                 

        A column containing variable shaped arrays can have an empty cell 

        (if no array has been put into it). This function tests if a cell 

        is defined (thus is not empty). 

        Note that a scalar column and a fixed shape array column cannot have 

        empty cells. 

 

 

        Input Parameters: 

                columnname       Name of column  

                rownr            Row number, starting at 0 0  

                 

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

                       

        """ 

        return _table.table_iscelldefined(self, *args, **kwargs) 

 

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

        """ 

        getcell(self, columnname, rownr = 0) -> variant 

 

        Summary 

                get a specific cell 

 

        Description 

                 

        A cell is the value at one row in one column. It may be a scalar 

        or an array. 

 

 

        Input Parameters: 

                columnname       Name of column  

                rownr            Row number, starting at 0 0  

                 

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

                       

        """ 

        return _table.table_getcell(self, *args, **kwargs) 

 

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

        """ 

        getcellslice(self, columnname, rownr, blc, trc, incr = initialize_vector(1, (int)1)) -> variant 

 

        Summary 

                get a slice from a specific cell 

 

        Description 

                 

        A cell is the value at one row in one column. It must be an array. 

        The slice must be specified as blc, trc with an optional stride. 

        \In blc and trc -1 can be used to indicate all values for a dimension 

        (-1 in blc is equivalent to 0, so -1 is especially useful for trc). 

 

 

        Input Parameters: 

                columnname       Name of column  

                rownr            Row number, starting at 0  

                blc              Bottom left corner (e.g. [0,0,0] is start of 3D array)  

                trc              Top right corner  

                incr             Stride (defaults to 1 for all axes) 1  

                 

        Example: 

                 

 

          tb.open('3C273XC1.MS') 

          data=tb.getcellslice('DATA', 0, [0,0], [1,0]) 

          print data.shape 

        # [2 1] 

 

 

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

                       

        """ 

        return _table.table_getcellslice(self, *args, **kwargs) 

 

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

        """ 

        getcol(self, columnname, startrow = 0, nrow = -1, rowincr = 1) -> variant 

 

        Summary 

                get a specific column 

 

        Description 

                 

        The entire column (or part of it) is returned. Warning: it might be big! 

        The functions can only be used if all arrays in the column have the 

        same shape. That is guaranteed for columns containing scalars or fixed 

        shaped arrays. For columns containing variable shaped arrays it only 

        succeeds if all those arrays happen to have the same shape. 

        \Note that function     exttt{getvarcol} can be used to get a column of 

        arbitrary shaped arrays, which also handles empty cells correctly. 

        Function        exttt{isvarcol} tells if a column contains variable shaped arrays. 

        shaped  

 

 

        Input Parameters: 

                columnname       Name of column  

                startrow         First row to read (default 0) 0  

                nrow             Number of rows to read (default -1 means till the end) -1  

                rowincr          Increment in rows to read (default 1) 1  

                 

        Example: 

                 

 

          tb.open('3C273XC1.MS') 

        # True 

          gain=tb.getcol('DATA') 

          print gain.shape 

        # (4, 1, 7669) 

 

 

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

                       

        """ 

        return _table.table_getcol(self, *args, **kwargs) 

 

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

        """ 

        getvarcol(self, columnname, startrow = 0, nrow = -1, rowincr = 1) -> record 

 

        Summary 

                get a specific column (for variable arrays) 

 

        Description 

                 

        Function        exttt{getcol} can only used if values in the column cells to get 

        have the same shape. Function   exttt{getvarcol} addresses this limitation by 

        returning the values as a record instead of an array. Each field in 

        the record contains the value for a column cell. If the value is 

        undefined (i.e. the cell does not contain a value), the unset value is 

        put in the record. Each field name is the letter r followed by the 

        row number. The length of the record is the number of rows to get. 

        \Note that the function         exttt{isvarcol} tells if a column contains 

        variable shaped arrays. 

 

 

        Input Parameters: 

                columnname       Name of column  

                startrow         First row to read (default 0) 0  

                nrow             Number of rows to read (default -1 means till the end) -1  

                rowincr          Increment in rows to read (default 1) 1  

                 

        Example: 

                 

 

          tb.open('3C273XC1.MS') 

          gain=tb.getvarcol('DATA') 

          print len(gain) 

        # 7669 

 

 

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

                       

        """ 

        return _table.table_getvarcol(self, *args, **kwargs) 

 

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

        """ 

        getcolslice(self, columnname, blc, trc, incr, startrow = 0, nrow = -1,  

            rowincr = 1) -> variant 

 

        Summary 

                get a slice from a specific column 

 

        Summary 

                array 

 

        Description 

                 

        A slice from the entire column (or part of it) is returned. 

        Warning: it might be big! 

        \In blc and trc -1 can be used to indicate all values for a dimension 

        (-1 in blc is equivalent to 1, so -1 is especially useful for trc). 

        Note that blc and trc should not contain the row number, only the 

        blc and trc of the arrays in the column. 

 

 

        Input Parameters: 

                columnname       Name of column  

                blc              Bottom left corner (e.g. [0,0,0] is start of 3D array)  

                trc              Top right corner  

                incr             Stride (defaults to 1 for all axes)  

                startrow         First row to read (default 0) 0  

                nrow             Number of rows to read (default -1 means till the end) -1  

                rowincr          Increment in rows to read (default 1) 1  

                 

        Example: 

                 

 

          tb.open('3C273XC1.MS') 

          data=tb.getcolslice('DATA', [0,0], [1,0]) 

          data.shape 

        # (2 1 7669) 

 

 

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

                       

        """ 

        return _table.table_getcolslice(self, *args, **kwargs) 

 

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

        """ 

        putcell(self, columnname, rownr, thevalue) -> bool 

 

        Summary 

                put a specific cell 

 

        Description 

                 

        A cell is the the value at one row in one column. It 

        may be a scalar or an array. 

 

 

        Input Parameters: 

                columnname       Name of column  

                rownr            Row number(s) (0-relative)  

                thevalue         Value  

                 

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

                       

        """ 

        return _table.table_putcell(self, *args, **kwargs) 

 

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

        """ 

        putcellslice(self, columnname, rownr, value, blc, trc, incr = initialize_vector(1, (int)1)) -> bool 

 

        Summary 

                put a slice into a specific cell 

 

        Description 

                 

        A cell is the value at one row in one column. It must be an array. 

        The slice must be specified as blc, trc with an optional stride. 

        \In blc and trc -1 can be used to indicate all values for a dimension 

        (-1 in blc is equivalent to 0, so -1 is especially useful for trc). 

 

 

        Input Parameters: 

                columnname       Name of column  

                rownr            Row number, starting at 0  

                value            Value  

                blc              Bottom left corner (e.g. [0,0,0] is start of 3D array)  

                trc              Top right corner  

                incr             Stride (defaults to 1 for all axes) 1  

                 

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

                       

        """ 

        return _table.table_putcellslice(self, *args, **kwargs) 

 

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

        """ 

        putcol(self, columnname, value, startrow = 0, nrow = -1, rowincr = 1) -> bool 

 

        Summary 

                put a specific column 

 

        Input Parameters: 

                columnname       Name of column  

                value            Array  

                startrow         First row to put (default 0) 0  

                nrow             Number of rows to put (default -1 means till the end) -1  

                rowincr          Increment in rows to put (default 1) 1  

                 

        Example: 

                 

 

          tb.open('3C273XC1.MS',nomodify=False) 

          data=tb.getcol('DATA') 

          # [could modify data here] 

          tb.putcol('DATA', data) 

          tb.flush() 

 

 

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

                       

        """ 

        return _table.table_putcol(self, *args, **kwargs) 

 

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

        """ 

        putvarcol(self, columnname, value, startrow = 0, nrow = -1, rowincr = 1) -> bool 

 

        Summary 

                put a specific column (for variable arrays) 

 

        Description 

                 

                exttt{putcol} can only used if values in the column cells to put 

        have the same shape.    exttt{putvarcol} addresses this limitation by 

        passing the values as a record instead of an array. Each field in 

        the record contains the value for a column cell. So the length of the 

        record has to match the number of rows to put. If a value is the unset 

        value, no put is done for that row. 

 

 

        Input Parameters: 

                columnname       Name of column  

                value            Record with values  

                startrow         First row to put (default 0) 0  

                nrow             Number of rows to put (default -1 means till the end) -1  

                rowincr          Increment in rows to put (default 1) 1  

                 

        Example: 

                 

 

          tb.open('3C273XC1.MS',nomodify=False) 

          gain=tb.getvarcol('DATA', 0, 10) 

          tb.putvarcol('Gain', gain, 10, 10) 

          tb.flush() 

 

        This example copies the values from row 0-9 to row 10-19. 

 

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

                       

        """ 

        return _table.table_putvarcol(self, *args, **kwargs) 

 

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

        """ 

        putcolslice(self, columnname, value, blc, trc, incr = initialize_vector(1, (int)1),  

            startrow = 0, nrow = -1, rowincr = 1) -> bool 

 

        Summary 

                put a slice into a specific column 

 

        Description 

                 

        In blc and trc, -1 can be used to indicate all values for a dimension 

        (-1 in blc is equivalent to 0, so -1 is especially useful for trc). 

        Note that blc and trc should not contain the row number, only the 

        blc and trc of the arrays in the column. 

 

 

        Input Parameters: 

                columnname       Name of column  

                value            Array  

                blc              Bottom left corner (e.g. [0,0,0] is start of 3D array)  

                trc              Top right corner  

                incr             Stride (defaults to 1 for all axes) 1  

                startrow         First row to put (default 0) 0  

                nrow             Number of rows to put (default -1 means till the end) -1  

                rowincr          Increment in rows to put (default 1) 1  

                 

        Example: 

                 

 

          tb.open('3C273XC1.MS',nomodify=False) 

          data_all=tb.getcolslice('DATA', [-1,-1], [-1,=1]) 

          print data_all.shape 

          # (4, 1, 7669) 

          data=tb.getcolslice('DATA', [0,0],[3,0]) 

          # can modify data here 

          tb.putcolslice('DATA', data, [0,0],[3,0]) 

          tb.flush() 

 

 

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

                       

        """ 

        return _table.table_putcolslice(self, *args, **kwargs) 

 

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

        """ 

        getcolshapestring(self, columnname, startrow = 0, nrow = -1, rowincr = 1) -> std::vector<(std::string)> 

 

        Summary 

                get shape of arrays in a specific column 

 

        Description 

                 

        The shapes of the arrays in the entire column (or part of it) are 

        returned as strings like [20,3]. When the column contains fixed shaped 

        arrays, a single string is returned. Otherwise a vector of strings is 

        returned. 

 

 

        Input Parameters: 

                columnname       Name of column  

                startrow         First row to read (default 0) 0  

                nrow             Number of rows to read (default -1 means till the end) -1  

                rowincr          Increment in rows to read (default 1) 1  

                 

        Example: 

                 

 

          tb.open('3C273XC1.MS') 

          shapes=tb.getcolshapestring('DATA')) 

          print len(shapes) 

 

 

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

                       

        """ 

        return _table.table_getcolshapestring(self, *args, **kwargs) 

 

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

        """ 

        getkeyword(self, keyword) -> variant 

 

        Summary 

                get value of specific table keyword 

 

        Description 

                 

        The value of the given table keyword is returned. The value can be of any 

        type, including a record and a table. 

        \If a keyword is a table, its value is returned as a string containing 

        the table name prefixed by 'Table: '.  

        \It is possible that the value of a keyword is a record itself 

        (arbitrarily deeply nested). A field in such a subrecord can be 

        read by separating the name with dots. 

 

 

        Input Parameters: 

                keyword          Name or seqnr of keyword: string or int  

                 

        Example: 

                 

 

          tb.open('3C273XC1.MS') 

          tb.getkeywords() 

          tb.getkeyword('MS_VERSION') 

        # 2.0 

          tb.close() 

          tb.open('tcal') 

          tb.getkeyword('rec.fld')     # get field from a record 

        # 3.14 

 

 

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

                       

        """ 

        return _table.table_getkeyword(self, *args, **kwargs) 

 

    def getkeywords(self): 

        """ 

        getkeywords(self) -> record 

 

        Summary 

                get values of all table keywords 

 

        Description 

                 

        The values of all table keywords are returned. The values can be of any 

        type, including a record and a table. 

        \If a keyword is a table, its value is returned as a string containing 

        the table name prefixed by 'Table: '.  

 

        Example: 

                 

 

          tb.open('3C273XC1.MS') 

          tb.getkeywords() 

        #{'ANTENNA': 'Table: /home/aips2mgr/testing/3C273XC1.MS/ANTENNA', 

        # 'DATA_DESCRIPTION': 'Table: /home/aips2mgr/testing/3C273XC1.MS/DATA_DESCRIPTION', 

        # 'FEED': 'Table: /home/aips2mgr/testing/3C273XC1.MS/FEED', 

        # 'FIELD': 'Table: /home/aips2mgr/testing/3C273XC1.MS/FIELD', 

        # 'FLAG_CMD': 'Table: /home/aips2mgr/testing/3C273XC1.MS/FLAG_CMD', 

        # 'HISTORY': 'Table: /home/aips2mgr/testing/3C273XC1.MS/HISTORY', 

        # 'MS_VERSION': 2.0, 

        # 'OBSERVATION': 'Table: /home/aips2mgr/testing/3C273XC1.MS/OBSERVATION', 

        # 'POINTING': 'Table: /home/aips2mgr/testing/3C273XC1.MS/POINTING', 

        # 'POLARIZATION': 'Table: /home/aips2mgr/testing/3C273XC1.MS/POLARIZATION', 

        # 'PROCESSOR': 'Table: /home/aips2mgr/testing/3C273XC1.MS/PROCESSOR', 

        # 'SOURCE': 'Table: /home/aips2mgr/testing/3C273XC1.MS/SOURCE', 

        # 'SPECTRAL_WINDOW': 'Table: /home/aips2mgr/testing/3C273XC1.MS/SPECTRAL_WINDOW', 

        # 'STATE': 'Table: /home/aips2mgr/testing/3C273XC1.MS/STATE'} 

 

 

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

                       

        """ 

        return _table.table_getkeywords(self) 

 

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

        """ 

        getcolkeyword(self, columnname, keyword) -> variant 

 

        Summary 

                get value of specific column keyword 

 

        Description 

                 

        The value of the given column keyword is returned. The value can be of any 

        type, including a record and a table. 

        \If a keyword is a table, its value is returned as a string containing 

        the table name prefixed by 'Table: '.  

        \It is possible that the value of a keyword is a record itself 

        (arbitrarily deeply nested). A field in such a subrecord can be 

        read by separating the name with dots. 

 

 

        Input Parameters: 

                columnname       Name of column  

                keyword          Name or seqnr of keyword: string or int  

                 

        Example: 

                 

 

          tb.open('3C273XC1.MS') 

          tb.getcolkeyword('UVW', 'QuantumUnits') 

        #array(['m', 'm', 'm'], 

        #      dtype='|S2') 

 

 

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

                       

        """ 

        return _table.table_getcolkeyword(self, *args, **kwargs) 

 

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

        """ 

        getcolkeywords(self, columnname) -> variant 

 

        Summary 

                get values of all keywords for a column 

 

        Description 

                 

        The values of all keywords for the given column are returned. 

        The values can be of any type, including a record and a table. 

        \If a keyword is a table, its value is returned as a string containing 

        the table name prefixed by 'Table: '.  

 

 

        Input Parameters: 

                columnname       Name of column  

                 

        Example: 

                 

 

          tb.open('3C273XC1.MS') 

          tb.getcolkeywords('UVW') 

        #{'MEASINFO': {'Ref': 'ITRF', 'type': 'uvw'}, 

        # 'QuantumUnits': array(['m', 'm', 'm'], 

        #      dtype='|S2')} 

 

 

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

                       

        """ 

        return _table.table_getcolkeywords(self, *args, **kwargs) 

 

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

        """ 

        putkeyword(self, keyword, value, makesubrecord = False) -> bool 

 

        Summary 

                put a specific table keyword 

 

        Description 

                 

        Put a table keyword. The value of the keyword can be a scalar or 

        an array of any type or it can be a record. 

        \It is possible to define a keyword holding a subtable. In that 

        case a special string containing the name of the subtable will be 

        passed to the table client. 

        \It is possible that the value of a keyword is a record itself 

        (arbitrarily deeply nested). A field in such a subrecord can be 

        written by separating the name with dots. If a subrecord does not 

        exist, an error is returned unless      exttt{makesubrecord=True} is given. 

        In such a case intermediate records are created when needed. 

 

 

        Input Parameters: 

                keyword          Name or seqnr of keyword: string or int  

                value            Value of keyword  

                makesubrecord    Create intermediate records false  

                 

        Example: 

                 

 

          tb.open('3C273XC1.MS', nomodify=False) 

          tb.putkeyword('VERSION', '1.66') 

        # True 

        #      define ANTENNA subtable 

          tb.putkeyword('ANTENNA', 'Table: 3C273XC1.MS/ANTENNA') 

          tb.flush() 

        # True 

        #      write a field in a record and create subrecords when needed 

          tb.putkeyword('REC.SUB.FLD', 'val', True) 

        # True 

        #      write a keyword with a record value 

          tb.putkeyword('REC', {'SUB': {'FLD': 'val'}}) 

        # True 

 

        Note that the last example does the same as the previous one (assuming 

        that    exttt{REC} does not exist yet with other fields). 

 

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

                       

        """ 

        return _table.table_putkeyword(self, *args, **kwargs) 

 

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

        """ 

        putkeywords(self, value) -> bool 

 

        Summary 

                !!!BROKEN!!! put multiple table keywords 

 

        Description 

                 

        Put multiple table keywords. All fields in the given record are put 

        as table keywords. The value of each field can be a scalar or 

        an array of any type or it can be a record. 

        \It is also possible to define a keyword holding a subtable. 

        This can be done by giving the keyword a string value consisting of 

        the subtable name prefixed by 'Table: '.  

 

 

        Input Parameters: 

                value            Record of keyword=value pairs  

                 

        Example: 

                 

 

          tb.open('3C273XC1.MS', nomodify=False) 

          kw=tb.getkeywords() 

          print kw['MS_VERSION'] 

        # 2.0 

          kw['MS_VERSION']=2.1 

          tb.putkeywords(kw) 

        # !!!BROKEN. Keywords containing float are not handled properly!!! 

          tb.flush() 

        # True 

 

 

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

                       

        """ 

        return _table.table_putkeywords(self, *args, **kwargs) 

 

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

        """ 

        putcolkeyword(self, columnname, keyword, value) -> bool 

 

        Summary 

                put a specific keyword for a column 

 

        Description 

                 

        Put a keyword in the given column. 

        The value of the keyword can be a scalar or 

        an array of any type or it can be a record. 

        \It is possible to define a keyword holding a subtable. In that 

        case a special string containing the name of the subtable will be 

        passed to the table client. 

        \It is possible that the value of a keyword is a record itself 

        (arbitrarily deeply nested). A field in such a subrecord can be 

        written by separating the name with dots. If a subrecord does not 

        exist, an error is returned unless      exttt{makesubrecord=True} is given. 

        In such a case intermediate records are created when needed. 

 

 

        Input Parameters: 

                columnname       Name of column  

                keyword          Name or seqnr of keyword,string or int  

                value            Value of keyword  

                 

        Example: 

                 

 

          tb.open('3C273XC1.MS', nomodify=False) 

          ckw=tb.getcolkeyword('UVW','QuantumUnits') 

          print ckw 

          # modify ckw as desired 

          tb.putcolkeyword('UVW','QuantumUnits',ckw) 

        # True 

          tb.flush() 

        # True 

 

 

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

                       

        """ 

        return _table.table_putcolkeyword(self, *args, **kwargs) 

 

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

        """ 

        putcolkeywords(self, columnname, value) -> bool 

 

        Summary 

                put multiple keywords for a column 

 

        Description 

                 

        Put multiple keywords in the given column. 

        All fields in the given record are put 

        as column keywords. The value of each field can be a scalar or 

        an array of any type or it can be a record. 

        \It is also possible to define a keyword holding a subtable. 

        This can be done by giving the keyword a string value consisting of 

        the subtable name prefixed by 'Table: '.  

 

 

        Input Parameters: 

                columnname       Name of column  

                value            Record of keyword=value pairs  

                 

        Example: 

                 

 

          tb.open('3C273XC1.MS', nomodify=False) 

          kws = tb.getcolkeywords('UVW') 

          kws 

        #{'MEASINFO': {'Ref': 'ITRF', 'type': 'uvw'}, 

        # 'QuantumUnits': array(['m', 'm', 'm'], 

        #      dtype='|S2')} 

          kws['MEASINFO']['Ref']='B1950' 

          tb.putcolkeywords(kws) 

        # True 

 

 

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

                       

        """ 

        return _table.table_putcolkeywords(self, *args, **kwargs) 

 

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

        """ 

        removekeyword(self, keyword) -> bool 

 

        Summary 

                remove a specific table keyword 

 

        Input Parameters: 

                keyword          Name or seqnr of keyword: string or int  

                 

        Example: 

                 

 

          tb.open('3C273XC1.MS', nomodify=False) 

          tb.removekeyword('MS_VERSION') 

        # True 

          tb.flush() 

        # True 

 

 

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

                       

        """ 

        return _table.table_removekeyword(self, *args, **kwargs) 

 

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

        """ 

        removecolkeyword(self, columnname, keyword) -> bool 

 

        Summary 

                remove a specific keyword for a column 

 

        Input Parameters: 

                columnname       Name of column  

                keyword          Name or seqnr of keyword: string or int  

                 

        Example: 

                 

 

          tb.open('3C273XC1.MS', nomodify=False) 

          tb.removecolkeyword('UVW', 'QuantumUnits') 

        # True 

          tb.flush() 

        # True 

 

 

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

                       

        """ 

        return _table.table_removecolkeyword(self, *args, **kwargs) 

 

    def getdminfo(self): 

        """ 

        getdminfo(self) -> record 

 

        Summary 

                get the info about data managers 

 

        Description 

                 

        This function returns the types and names of the data managers used. 

        For each data manager it also returns the names of the columns served by it. 

        The information is returned as a record containing a subrecord for 

        each data manager. Each subrecord contains the fields TYPE, NAME and 

        COLUMNS. 

 

        Example: 

                 

 

          tb.open('3C273XC1.MS') 

          rec = tb.getdminfo() 

 

        Print the output record shows that the table uses 9 storage managers. 

 

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

                       

        """ 

        return _table.table_getdminfo(self) 

 

    def keywordnames(self): 

        """ 

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

 

        Summary 

                get the names of all table keywords 

 

        Description 

                 

        This function returns a vector of strings containing the names 

        of all table keywords. 

 

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

                       

        """ 

        return _table.table_keywordnames(self) 

 

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

        """ 

        fieldnames(self, keyword = string("")) -> std::vector<(std::string)> 

 

        Summary 

                get the names of fields in a table keyword 

 

        Description 

                 

        This function returns a vector of strings containing the names 

        of all fields in the given table keyword. 

        It is only valid if the keyword value is a record. 

        \If no keyword name is given, the names of all table keywords are returned. 

 

 

        Input Parameters: 

                keyword          keyword name  

                 

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

                       

        """ 

        return _table.table_fieldnames(self, *args, **kwargs) 

 

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

        """ 

        colkeywordnames(self, columnname) -> std::vector<(std::string)> 

 

        Summary 

                get the names of all keywords in a column 

 

        Description 

                 

        This function returns a vector of strings containing the names 

        of all keywords in the column with the given name.. 

 

 

        Input Parameters: 

                columnname       column name  

                 

        Example: 

                 

 

          tb.open('3C273XC1.MS') 

          tb.colkeywordnames('UVW') 

 

 

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

                       

        """ 

        return _table.table_colkeywordnames(self, *args, **kwargs) 

 

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

        """ 

        colfieldnames(self, columnname, keyword = string("")) -> std::vector<(std::string)> 

 

        Summary 

                get the names of fields in a keyword in a column 

 

        Description 

                 

        This function returns a vector of strings containing the names 

        of all fields in the given keyword in the given column. 

        It is only valid if the keyword value is a record. 

        \If no keyword name is given, the names of all keywords in the column 

        are returned. 

 

 

        Input Parameters: 

                columnname       column name  

                keyword          keyword name  

                 

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

                       

        """ 

        return _table.table_colfieldnames(self, *args, **kwargs) 

 

    def getdesc(self, actual = True): 

        """ 

        getdesc(self, actual = True) -> record 

 

        Summary 

                get the table description 

 

        Description 

                 

        The table description is a casapy record that contains a complete  

        description of the layout 

        of the table (except for the number of rows).  

        \ 

        By default the actual table description is returned (thus telling the 

        actual shapes and data managers used). It is also possible to get 

        the table description used when creating the table. 

 

 

        Input Parameters: 

                actual           actual table description? true  

                 

        Example: 

                 

 

          tb.open('3C273XC1.MS') 

          tb.getdesc() 

 

 

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

                       

        """ 

        return _table.table_getdesc(self, actual) 

 

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

        """ 

        getcoldesc(self, columnname) -> record 

 

        Summary 

                get the description of a specific 

        column 

 

        Description 

                 

        The column description is a casapy record that contains a complete  

        description of the layout 

        of a specified column (except for the number of rows). It can be used  

        to construct a table description. 

 

 

        Input Parameters: 

                columnname       Name of column  

                 

        Example: 

                 

 

          tb.open('3C273XC1.MS') 

          tb.getcoldesc('DATA') 

        #{'comment': 'The data column', 

        # 'dataManagerGroup': 'TiledData', 

        # 'dataManagerType': 'TiledShapeStMan', 

        # 'maxlen': 0, 

        # 'ndim': 2, 

        # 'option': 0, 

        # 'valueType': 'complex'} 

 

 

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

                       

        """ 

        return _table.table_getcoldesc(self, *args, **kwargs) 

 

    def ok(self): 

        """ 

        ok(self) -> bool 

 

        Summary 

                Is the table tool ok? 

 

        Description 

                 

        Perform a number of sanity checks and return T if ok. 

        Failure (returning F) is a sign of a bug. 

 

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

                       

        """ 

        return _table.table_ok(self) 

 

    def clearlocks(self): 

        """ 

        clearlocks(self) -> bool 

 

        Summary 

                Clears any table lock associated with the current process 

 

        Description 

                 

                Occasionally a table will be inretrievably locked to another process no matter how much closing is done. 

                So clearLocks will unlock all the files in the table cache that use AutoLocking. 

 

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

                       

        """ 

        return _table.table_clearlocks(self) 

 

    def listlocks(self): 

        """ 

        listlocks(self) -> bool 

 

        Summary 

                Lists any table lock associated with the current process 

 

        Description 

                 

                Occasionally a table will be inretrievably locked to another process no matter how much closing is done. 

                So listLocks will list the offending tables (and unoffending ones, too), so we can figure out where the problem might be. 

 

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

                       

        """ 

        return _table.table_listlocks(self) 

 

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

        """ 

        statistics(self, column, complex_value = string(""), useflags = True) -> record 

 

        Summary 

                Get statistics on the selected table column 

 

        Description 

                 

            This function computes descriptive statistics on the table column. 

            It returns the statistical values as a dictionary.  The given  

            column name must be a numerical column. 

            If it is a complex valued column, the parameter complex\_value defines 

            which derived real value is used for the statistics computation. 

           

 

        Input Parameters: 

                column           Column name  

                complex_value    Which derived value to use for complex columns (amp, amplitude, phase, imag, real, imaginary)  

                useflags         Use the data flags true  

                 

        Example: 

                 

             

               

              tb.open('ggtau.1mm.amp.gcal') 

              s = tb.statistics(column='GAIN', complex_value='phase') 

             

           

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

                       

        """ 

        return _table.table_statistics(self, *args, **kwargs) 

 

    def showcache(self, verbose = True): 

        """ 

        showcache(self, verbose = True) -> std::vector<(std::string)> 

 

        Summary 

                show the contents of the table cache 

 

        Description 

                 

        Show the contents of the table cache. 

 

 

        Input Parameters: 

                verbose          true  

                 

        Example: 

                 

        tb.showcache() 

 

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

                       

        """ 

        return _table.table_showcache(self, verbose) 

 

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

        """ 

        testincrstman(self, column) -> bool 

 

        Summary 

                Checks consistency of an Incremental Store Manager bucket layout 

 

        Description 

                 

                 

                Checks consistency of an Incremental Store Manager bucket layout 

                 

                In case of corruption it returns False and a SEVERE msg is posted containing information about the location of the corrupted bucket 

                 

                 

 

        Input Parameters: 

                column           Column name  

                 

        Example: 

                 

                 

                        mytb = tbtool() 

                        mytb.open('uid___A002_X841035_X203.ms.split') 

                        mytb.testincrstman('FLAG_ROW')         

                 

                 

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

                       

        """ 

        return _table.table_testincrstman(self, *args, **kwargs) 

 

table_swigregister = _table.table_swigregister 

table_swigregister(table) 

 

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