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

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

        except ImportError: 

            import _componentlist 

            return _componentlist 

        if fp is not None: 

            try: 

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

            finally: 

                fp.close() 

            return _mod 

    _componentlist = swig_import_helper() 

    del swig_import_helper 

else: 

    import _componentlist 

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

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

    __swig_setmethods__ = {} 

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

    __swig_getmethods__ = {} 

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

    __repr__ = _swig_repr 

    def __init__(self): 

        """__init__(self) -> componentlist""" 

        this = _componentlist.new_componentlist() 

        try: self.this.append(this) 

        except: self.this = this 

    __swig_destroy__ = _componentlist.delete_componentlist 

    __del__ = lambda self : None; 

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

        """ 

        open(self, filename = string(""), nomodify = False, log = True) -> bool 

 

        Summary 

                Construct an componentlist 

            from the data in an aipspp table 

 

        Description 

                 

 

          Use this constructor to construct a componentlist tool by reading 

          the data from an ipspp\ table. To ensure that this table contains 

          all the necessary columns and to allow the table format to be 

          enhanced in the future, it is highly recommended that the table be 

          created using a componentlist tool ootnote{To be more precise the 

          table should have been created using the functions in the 

          ComponentList class (C++).}. 

 

          The table that contains the componentlist may be opened read-only by 

          setting the readonly flag to True. When this is done some of the 

          functions in the componentlist tool cannot be used. These include 

          the ``set'', ``convert'', ``remove'', ``replace'', ``purge'', 

          ``recover'', and ``sort'' functions. 

 

 

 

        Input Parameters: 

                filename         The filename of the table  

                nomodify         Should the table be opened read only false  

                log              Send a message to the logger true  

                 

        Example: 

                 

 

        cl.open('crux.cl'); 

 

 

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

                       

        """ 

        return _componentlist.componentlist_open(self, *args, **kwargs) 

 

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

        """ 

        asciitocomponentlist(self, filename, asciifile, refer = string("J2000"), format = string("ST"),  

            direction = initialize_record(""),  

            spectrum = initialize_record(""), flux = initialize_record(""),  

            log = True) -> int 

 

        Summary 

                Create a componentlist from an ascii file {bf (Not implemented yet)} 

 

        Description 

                 

 

        This constructor allows conversion of a number of ascii-file-based 

        formats to componentlists. The formats currently supported are the 

        AIPS star file format, the Caltech model format, and the WENSS, FIRST, 

        and NVSS surveys. 

           

        egin{description} 

        \item[AIPS ST file] The AIPS star file describes positions of ``stars'' 

        that one might wish to plot overlaid on some other display. It does 

        not contain source strength information.  In the AIPS help file for 

        STARS, the format of the star file is described as follows: 

        egin{verbatim} 

            The text file contains one line per star and each line has 

        up to 7 logical columns containing, in order: 

           1. X position (Right Ascension 00 00 00.00) 

           2. Y position (Declination +/-00 00 00.0) 

           3. Major axis (Full width in arc seconds on sky) 

           4. Minor axis (Full width in arc seconds on sky) 

           5. Position Angle (E of N, degrees) 

           6. Star Type  (-1 to 20, integer ) 

           7. Star label (up to 24 character string) 

        If X and Y are not RA-DEC or DEC-RA, then the logical columns 

        are also 7 actual columns and the units are in AIPS standard 

        units (e.g. degrees, m/s etc. ).  In this case the position 

        angle should be given as 0.0, the major axis is the width in the 

        Y coordinate and the minor axis is the width in the X 

        coordinate.  For RA and DEC positions, the sexagesimal notation 

        is used (e.g. HH MM SS.SSS -DD MM SS.S) for the positions and 

        arc seconds on the sky are used for the Deltas. 

        The last 5 columns are not required.  If the last 5 columns are 

        not given, a value of 1 cell is assumed for the deltas. 

        If the position angle is not included, the default is 0 degrees. 

        If the star type is not included, the default type is a cross. 

        The default is no label string. 

        There are currently 22 different types of star marks. 

         \< 0: No Mark, only the star label is printed 

           0: Cross             10: Five pointed star 

           1: Ellipse           11: Star of David 

           2: Box               12: Seven pointed star 

           3: Triangle          13: Eight pointed star 

           4: Diamond           14: Nine  pointed star 

           5: Pentagon          15: Ten   pointed star 

           6: Hexagon           16: 11    pointed star 

           7: Septagon          17: 12    pointed star 

           8: Octagon           18: 13    pointed star 

           9: Nine-gon          19: 14    pointed star 

          20: Cross with gap   \>20: Ellipse 

        The Box (type=2) is different from the diamond in that the 

        star size is the half height and width of the box dimensions. 

        The Box and the Null (\<0) are labeled at RA and Dec plus Delta 

        RA and Delta Dec.  The other marks are labeled at the right 

        edge of the of the Rotated RA axis.  The CROSS WITH GAP 

        (type=20) has the inner third of the cross removed so the 

        marked object is not over written. 

        nd{verbatim} 

 

        For more information, see the AIPS help file for 

        \htmladdnormallink{STARS}{http://www.cv.nrao.edu/cgi-bin/AIPSHELP?STARS}. 

 

        Caveats: 

        egin{itemize} 

        \item In AIPS, the following are supported: 1: 1900; 2: B1950; 3: J2000; 4: Galactic 

        5: OHLSSON Gal.; 6: VAN TULDER Galactic; 7: Super Galactic; if \> 1000 then year assumed. 

        Currently, ipspp\ can support 2 (refer='b1950'), 3 

        (refer='j2000'), 4 (refer='gal'), 7 (refer='supergal'). If you 

        need any of the others, please contact us. 

 

        \item[Caltech] The  

        \htmladdnormallink{Caltech package} 

        {http://astro.caltech.edu/~tjp/citvlb/index.html} 

        uses a format for specifying positions relative to an undefined 

        position. In the documentation for {m modelfit}, the format is 

        described as follows: 

        nd{itemize} 

 

        egin{verbatim} 

             Model files are text files that can be typed or printed directly; 

        they  can  be  modified or created using the standard text editors.  A 

        model file consists of one line for each component of the model,  with 

        up to 7 numbers on each line (in free format): 

 

             1.  Component flux density (Jy) 

 

             2.  Distance of center of component  from  origin  (milliarcsec), 

                 'radius' 

 

             3.  Position angle of center of component  with  respect  to  the 

                 origin (degrees, North through East), 'theta' 

 

             4.  Major axis of component (milliarcsec), 'axis' 

 

             5.  Axial ratio (minor/major, i.e.  \< 1), 'ratio' 

 

             6.  Position angle of major axis (degrees, North  through  East), 

                 'phi' 

 

             7.  Type: 

                     0 or 1:  elliptical Gaussian  (major  axis  is  FWHM)  or 

                     delta-function (major axis = 0) 

                     2:  uniform elliptical disk (major axis is diameter) 

                     3:  optically thin spheroid or tapered disk  (major  axis 

                     is diameter) 

                     4:  elliptical ring (major axis is diameter) 

                     5:  line (major axis is length) 

 

        For Gaussians and  delta-functions,  the  Type  can  be  omitted;  for 

        delta-functions, the major-axis, axial-ratio, position- angle and type 

        can be omitted.  (Not all the  programs  understand  types  2-5.)  The 

        'origin' is an arbitrary phase-reference point.  The maximum number of 

        components varies from 600  to  10000,  depending  on  the  individual 

        program.                                                               

        nd{verbatim} 

 

        Caveats: 

        egin{itemize} 

        \item In ipspp, directions in componentlist are currently absolute 

        only. Hence one must specify the reference direction. 

 

        \item[WENSS] The \htmladdnormallink{Westerbork Northern Sky Survey (WENSS)} 

        {http://www.strw.leidenuniv.nl/\%7Edpf/wenss/} is a 

        low-frequency radio survey that covers the whole sky north of delta=30 

        degree at a wavelength of 92cm to a limiting flux density of 

        approximately 18 mJy (5 sigma). This survey has a resolution of 54'' x 

        54'' cosec (delta) and a positional accuracy for strong sources of 

        1.5''.  The WSRT Northern Sky Survey catalog is available via a 

        \htmladdnormallink{Web 

        interface}{http://www.strw.leidenuniv.nl/\%7Edpf/wenss/search.html}. 

        Use this interface to search for sources, choose the plain text 

        output, capture the output into a file and then convert. 

 

        \item[FIRST] \htmladdnormallink{Faint Images of the Radio Sky at 

        Twenty-cm}{http://sundog.stsci.edu/top.html} -- is a project designed 

        to produce the radio equivalent of the Palomar Observatory Sky Survey 

        over 10,000 square degrees of the North and South Galactic Caps. Using 

        the NRAO Very Large Array (VLA) and an automated mapping pipeline, 

        they produce images with 1.8' pixels, a typical rms of 0.15 mJy, and a 

        resolution of 5'. At the 1 mJy source detection threshold, there are 

        ~90 sources per square degree, ~35\% of which have resolved structure 

        on scales from 2-30'. Go to the \htmladdnormallink{FIRST catalog search 

        page}{http://sundog.stsci.edu/cgi-bin/searchfirst}, search for the 

        sources that you want, cut out only the lines that include the 

        sources, put in a file and then convert. 

 

        \item[NVSS] The \htmladdnormallink{NRAO VLA Sky Survey} 

        {http://www.cv.nrao.edu/~jcondon/nvss.html} The NRAO VLA Sky Survey 

        (NVSS) is a radio continuum survey covering the sky north of -40 deg 

        declination. A detailed description appears in the 1998 May issue of 

        The Astronomical Journal (Condon, J. J., Cotton, W. D., Greisen, 

        E. W., Yin, Q. F., Perley, R. A., Taylor, G. B., \& Broderick, 

        J. J. 1998, AJ, 115, 1693). Go to the \htmladdnormallink{NVSS catalog 

        search page}{http://www.cv.nrao.edu/NVSS/NVSS.html}, search for the 

        sources that you want, cut out only the lines that include the sources 

        (you can leave in the alternating lines with error information), put 

        in a file and then convert. 

        nd{itemize} 

 

        Caveats: 

        egin{itemize} 

        \item The catalog contains upper limits on some scale sizes. We 

        have chosen to represent these as actual sizes. 

        nd{itemize} 

        nd{description} 

 

 

 

        Input Parameters: 

                filename         Name of output component list table  

                asciifile        Name of input ascii file  

                refer            Input reference frame B1950 J2000  

                format           Name of format (only ST supported) ST  

                direction        Direction measure (for relative coordinates)  

                spectrum         Default spectrum field, valid spectrum field [type='Constant', frequency=[type='frequency' , refer='LSR' , m0=[unit='GHz' , value=1.0]]  

                flux             Default flux field, valid flux field [value=[0.0, 0.0, 0.0, 0.0], unit='Jy', polarization='Stokes']  

                log              Send a message to the logger true  

                 

        Example: 

                 

 

        mycl := asciitocomponentlist('sgra-stars.cl', 'sgra-stars.stfile', refer='j2000',  

        format='ST') 

 

 

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

                       

        """ 

        return _componentlist.componentlist_asciitocomponentlist(self, *args, **kwargs) 

 

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

        """ 

        concatenate(self, list = initialize_variant(""), which = initialize_vector(1, (int)-1),  

            log = True) -> bool 

 

        Summary 

                Append components from another componentlist. 

 

        Description 

                 

 

            The concatenate function copies the specified component(s), from 

            the specified to list, to the end of the current list.  The 

            components are specified by numbering them from one to the length 

            of the list.  You cannot append components to a list that has been 

            opened read only but the list you are copying from may be 

            readonly. 

 

            You use a vector of indices to copy a number of components at 

            once. By default all components are copied. 

 

           

 

        Input Parameters: 

                list             list to copy from. Can be a componentlist record or a componentlist file name from disk  

                which            which components to copy, -1 unset -1  

                log              Send a message to the logger true  

                 

        Example: 

                 

             

               cl.addcomponent(flux=1.0, dir='J2000 19h00m00 -40d00m00') 

               cl.addcomponent(flux=2.0, dir='J2000 19h10m00 -40d00m00') 

               cl.addcomponent(flux=3.0, dir='J2000 19h00m00 -40d00m00') 

               cl2 = cltool(); 

               cl2.concatenate(cl.torecord(), [0,2]); 

               cl.done() 

               cl2.rename('part_list.cl'); 

               cl2.done() 

            We make a 3 component component list and 

            copies the first and third component to another a componentlist 

            that was initially empty. These components are then saved to the 

            table called part_list.cl. 

 

             

 

              cl.close() ### make sure we start with empty componentlist 

              cl.concatenate('crux.cl', [0,2]); 

              cl.rename('crux-copy.cl'); 

              cl.done() 

             

            This example reads a componentlist from a casa table and 

            copies the first and third component to another a componentlist 

            that was initially empty. These components are then saved to the 

            table called crux-copy.cl. 

 

             

           

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

                       

        """ 

        return _componentlist.componentlist_concatenate(self, *args, **kwargs) 

 

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

        """ 

        fromrecord(self, record = initialize_record("")) -> bool 

 

        Summary 

                make a componentlist tool from a record 

 

        Description 

                 

 

            This function allows the componentlist records that are returned by other functions (for e.g from imageanalysis tool) be converted to a tool  to be manipulated or to be saved on disk 

 

           

 

        Input Parameters: 

                record           a component list record  

                 

        Example: 

                 

             

               

              cl2 = cltool() 

              

              cl2.fromrecord(ia.findsources()) 

              cl2.rename('sourcesfound.cl') 

              cl2.done() 

             

           

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

                       

        """ 

        return _componentlist.componentlist_fromrecord(self, *args, **kwargs) 

 

    def torecord(self): 

        """ 

        torecord(self) -> record 

 

        Summary 

                convert componentlist to a record 

 

        Description 

                 

 

            This function allows the componentlist to be converted to a record. Usually useful to pass to other functions in image analysis for e.g 

 

           

        Example: 

                 

             

              cl2=cltool() 

              cl.open('mycomp.cl') 

              

              cl2.fromrecord(ia.deconvolvecomponentlist(cl.torecord())) 

              cl2.rename('deconvolved_sources.cl') 

              cl2.done() 

             

           

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

                       

        """ 

        return _componentlist.componentlist_torecord(self) 

 

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

        """ 

        remove(self, which = initialize_vector(1, (int)-1), log = True) -> bool 

 

        Summary 

                Remove a component from the list. 

 

        Description 

                 

 

            The remove function removes the specified component(s) from the 

            list. Components are specified by numbering them from one to the 

            length of the list. So removing component one will remove the 

            first component. After using this function all the 

            remaining components will be shuffled down so that component two 

            becomes component one.  You cannot remove components from a list 

            that has been opened read only. 

 

            You can specify a vector of indices to remove a number of 

            components at once. For example in a five element list removing 

            elements [1,3,5] will result in a two element list, now indexed as  

            elements one and two, containing what was previously the second 

            and fourth components.  

           

            Components that have been deleted using this function are not 

            lost. The recover 

            function can be used to get them back unless the 

            purge function has 

            been executed. Then they are completely gone. 

 

           

 

        Input Parameters: 

                which            indices of which component(s) to remove a vector containing unique integers between 0 and one less than the length of the list, -1 for all -1  

                log              Send a message to the logger true  

                 

        Example: 

                 

             

              cl.open('crux.cl') 

              cl.remove(1) 

             

           

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

                       

        """ 

        return _componentlist.componentlist_remove(self, *args, **kwargs) 

 

    def purge(self): 

        """ 

        purge(self) -> bool 

 

        Summary 

                Permanently delete removed components. 

 

        Description 

                 

 

            The remove function 

            deletes components from the list but does not remove them from 

            memory. They remain accessible and can be obtained with the 

            recover 

            function. The purge function frees up the memory occupied by the 

            removed components. You cannot use the recover function to obtain 

            the removed components after the purge function has been called. 

 

           

        Example: 

                 

             

              cl.open('crux.cl') 

              cl.remove(1) 

              cl.purge() 

             

           

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

                       

        """ 

        return _componentlist.componentlist_purge(self) 

 

    def recover(self, log = True): 

        """ 

        recover(self, log = True) -> bool 

 

        Summary 

                Obtain removed components. 

 

        Description 

                 

            The recover function appends components to the end of the list 

            that have been deleted with the 

            remove 

            function. This does not include components that were removed 

            before the purge 

            function was last executed. 

           

 

        Input Parameters: 

                log              Send a message to the logger true  

                 

        Example: 

                 

             

              cl.open('crux.cl') 

              cl.remove(1) 

              cl.recover() 

             

           

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

                       

        """ 

        return _componentlist.componentlist_recover(self, log) 

 

    def length(self): 

        """ 

        length(self) -> int 

 

        Summary 

                Find the number of components in the list. 

 

        Description 

                 

            The length function returns a non-negative integer that 

            indicates how many components the list currently contains.  

           

        Example: 

                 

             

              cl.open('crux.cl') 

              n = cl.length() 

             

           

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

                       

        """ 

        return _componentlist.componentlist_length(self) 

 

    def indices(self): 

        """ 

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

 

        Summary 

                Return a vector of indices. {bf (Not implemented yet)} 

 

        Description 

                 

            The indices function returns a vector of non-negative integers that 

            can be used to index through the list. This vector always contains 

            the integers starting at one and increasing sequentially to the 

            length of the list. Its main use is in      exttt{for} loops as is 

            illustrated in the example below. 

           

        Example: 

                 

             

              include 'componentlist.g' 

              cl := componentlist('crux.cl'); 

              allcomp := cl.indices(); 

              cl.convertfluxunit(allcomp, 'jy'); 

              cl.convertfluxpol(allcomp, 'stokes'); 

              totalflux := [0,0,0,0]; 

              for (i in allcomp) { 

                totalflux +:= cl.getfluxvalue(i); 

              } 

             

           

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

                       

        """ 

        return _componentlist.componentlist_indices(self) 

 

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

        """ 

        sort(self, criteria = string("Flux"), log = True) -> bool 

 

        Summary 

                Sort the components in a list 

 

        Description 

                 

            The sort function can sort all the components in a list using a 

            variety of criteria. Currently the following criteria are 

            available. 

            egin{description} 

              \item[Flux] Sorts the list so that the brightest 

                components, as defined by the $\mbox{abs}(I)$, are at the beginning of 

                the list. 

              \item[Position] Sorts the list so that components that are 

                closest to a reference position, which is currently fixed at  

                (ra,dec) $= (0,0)$, are at the beginning of the list. 

              \item[Polarization] Sorts the list so that components with the 

                largest fractional polarization, $ rac{\sqrt{Q^2+U^2+V^2}}{I}$, are 

                at the front of the list. Components where $I=0$ are placed at  

                the end of the list. 

            nd{description} 

            The parsing of the string containg the sorting criteria is case 

            insensitive. You cannot sort a list that has been opened read only. 

           

 

        Input Parameters: 

                criteria         a string containg the criteria to use to sort the list Polarization Position Flux  

                log              Send a message to the logger true  

                 

        Example: 

                 

             

              cl.open('crux.cl') 

              cl.sort('Polarization') 

             

           

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

                       

        """ 

        return _componentlist.componentlist_sort(self, *args, **kwargs) 

 

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

        """ 

        isphysical(self, which = initialize_vector(1, (int)-1)) -> bool 

 

        Summary 

                Check if a component is physically plausible 

 

        Description 

                 

            The isphysical function is used to check if the specified 

            components meet a number of criteria that must be true if the 

            component could be used to model a physical process. These 

            criteria are: 

            egin{itemize} 

            \item $I \>= \sqrt{Q^2 + U^2 + V^2}$ 

            \item That the flux, when represented using the Stokes 

                  representation, has a zero imaginary value. 

            nd{itemize} 

 

            The ``Flux properties'' section of the ComponentModels module 

            documentation describes how it is possible to generate a 

            component which has non-zero imaginary value in the Stokes 

            representation. 

 

            It is possible to check a number of components at once by 

            specifying the indicies of all the components. The returned value 

            will only be True if all the specified components are physical. 

 

           

 

        Input Parameters: 

                which            A vector of indices Indices must be between 0 and one less than the list length, inclusively -1  

                 

        Example: 

                 

             

              cl2 = cltool() 

              cl2.simulate(2) 

              cl2.setflux(1, value=[10, 1+3j, 1-4j, 0], polarization='linear'); 

              print cl2.isphysical([0,1]) 

             

           

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

                       

        """ 

        return _componentlist.componentlist_isphysical(self, *args, **kwargs) 

 

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

        """ 

        sample(self, direction = initialize_variant("J2000 00h00m00.00 90d00m00.0"),  

            pixellatsize = initialize_variant("0.0deg"),  

            pixellongsize = initialize_variant("0.0deg"),  

            frequency = initialize_variant("1.4GHz")) -> std::vector<(double)> 

 

        Summary 

                Sample the flux of the list in a specified direction. {bf (Not implemented yet)} 

 

        Description 

                 

 

            The sample function returns a vector containing the flux in Janskys/pixel 

            of all the components in the list, in the specified direction, at 

            the specified frequency. The returned vector always contains four 

            elements corresponding to the Stokes parameters I,~Q,~U,~V. 

 

           

 

        Input Parameters: 

                direction        The direction to sample any valid direction measure. A valid Direction measure or vector of string or string, e.g me.direction('J2000','19h30m00', '-20d00m00') or ['J2000','19h30m00', '-20d00m00'] or 'J2000 19h30m00 -20d00m00' J2000 00h00m00.00 90d00m00.0  

                pixellatsize     the x-size of the in pixels to use when sampling any quantity that has angular units. 0.0deg  

                pixellongsize    the y-size of the in pixels to use when sampling any quantity that has angular units. 0.0deg  

                frequency        The frequency to sample at Any frequency measure 1.4GHz  

                 

        Example: 

                 

             

              include 'componentlist.g' 

              include 'measures.g' 

              cl := componentlist('crux.cl', readonly=T); 

              dir := dm.direction('J2000', '12h26m35.9', '-63d5m56'); 

              pixelsize := dm.quantity('1arcsec'); 

              flux := cl.sample(dir, pixelsize); 

             

           

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

                       

        """ 

        return _componentlist.componentlist_sample(self, *args, **kwargs) 

 

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

        """ 

        rename(self, filename, log = True) -> bool 

 

        Summary 

                Give the list a name so it can save itself. use close to save to disk 

 

        Description 

                 

 

            The rename function is used to specify the name of the table 

            associated with this componentlist. 

             

            When a componentlist is created using the 

            emptycomponentlist 

            constructor it is not associated with an casa table. So when the 

            componentlist is removed from memory its contents are lost. But if 

            a name is attached to the componentlist, using the rename function, 

            then its contents are saved in a table with the specified name when the componentlist is closed 

             

            {f NOTE: that by just using {      t rename} the componentlist is not ensured to be on disk;  

            to be sure use {    t close} after rename}  

 

            If the componentlist is created using the 

            componentlist 

            constructor then this function will rename the table associated 

            with the list to the user specified name. You cannot rename a 

            componentlist that has been opened read only. 

             

             

             

             

           

 

        Input Parameters: 

                filename         The filename of the table  

                log              Send a message to the logger true  

                 

        Example: 

                 

             

             

            cl.simulate(1); 

            cl.setshape(0, 'gaussian', '35mas', '27mas', '-10d') 

            cl.setflux(0, [1.0, 0.2, 0.1, 0.01]); 

            cl.rename('smallblob.cl'); 

            cl.close(); 

             

            cl.open('smallblob.cl') 

            n=cl.length() 

 

             This example starts with an  empty componentlist tool and then adds 

            one component to it. The parameters of this component are then 

            modified to change the shape and flux and the list saved in the 

            casa table called 'smallblob.cl' The data is not written to 

            disk until the list is closed, and when it is the componentlist is 

            reset. So you need to reopen it if you want to interact with it. 

           

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

                       

        """ 

        return _componentlist.componentlist_rename(self, *args, **kwargs) 

 

    def simulate(self, howmany = 1, log = True): 

        """ 

        simulate(self, howmany = 1, log = True) -> bool 

 

        Summary 

                Add some simulated components to the list 

 

        Description 

                 

            The simulate function adds simulated components to the list. The 

            simulation criterion is very simple, all the components added are 

            identical! They are point sources at the J2000 north pole with a 

            flux in Stokes I of 1~Jy, and zero in the other polarizations. The 

            spectrum is constant. The 'set' functions (eg.,  

            setflux,  

            setfreq)  

            can be used to change these parameters to desired ones.  

 

            The howmany argument indicates how many components to append to 

            the list. 

           

 

        Input Parameters: 

                howmany          How many components to simulate, greater than zero 1  

                log              Send a message to the logger true  

                 

        Example: 

                 

 

              cl.simulate(2) 

              cl.setflux(1, [2.78, 0, 0, 0]); 

              cl.rename('test.cl'); 

              cl.close(); 

             

           

           

            This example creates a componentlist with two components.  The setflux function is used to 

            modify the second component.  The list is then saved on disk.  

            I use short scripts like this a lot during testing.  

 

            I expect bad things will happen if you save the list to disk, 

            using the close 

            function, before having shut down the editor gui (using the done 

            button) or if you modify the same component using any of the set 

            functions while it is being modified by the gui. 

 

           

           

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

                       

        """ 

        return _componentlist.componentlist_simulate(self, howmany, log) 

 

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

        """ 

        addcomponent(self, flux = initialize_variant(""), fluxunit = string("Jy"),  

            polarization = string("Stokes"), dir = initialize_variant("J2000 00h00m00.0 90d00m00.0"),  

            shape = string("point"),  

            majoraxis = initialize_variant("2.0arcmin"),  

            minoraxis = initialize_variant("1.0arcmin"),  

            positionangle = initialize_variant("0.0deg"),  

            freq = initialize_variant("LSRK 1.415GHz"),  

            spectrumtype = string("constant"),  

            index = 1.0, optionalparms = initialize_vector(1, (double)0.0),  

            label = string("")) -> bool 

 

        Summary 

                Add a component to the list 

 

        Description 

                 

 

            The addcomponent function is a convenience function that ties 

            together the 

            simulate 

            function, and the various set functions. This function adds a 

            component to the end of the list. For a description of the 

            arguments see the following functions. 

            egin{description} 

            \item[flux, fluxunit, polarization] See the 

              setflux function. 

            \item[ra, raunit, dec, decunit] See the 

              setrefdir function. 

            \item[dirframe] See the 

              setrefdirframe  

              function. 

            \item[shape, majoraxis, minoraxis, positionangle] See the 

              setshape  

              function. 

            \item[freq] A frequency quantity which is split into a value and 

              units and passed to the  

              setfreq  

              function. 

            \item[freqframe] See the  

              setfreq  

              function. 

            \item[spectrumtype, index] See the  

              setspectrum  

              function. 

               

        OR 

 

              setspectrum  

            \item[label] See the  

              setlabel  

              function. 

            nd{description} 

           

 

        Input Parameters: 

                flux             The flux value. A vector with four real or complex numbers  

                fluxunit         The units of the flux. Any string with the same dimensions as the Jansky Jy  

                polarization     The polarization of the value field. ``Stokes'', ``linear'' or ``circular'' Circular Linear Stokes  

                dir              The direction measure of the source, it can a be any direction measure from the measures tool or a string of the type 'J2000 10h30m00 -20d00m00.0' or a vector of strings of the type ['J2000', '10:30:00.00', '-20.00.00.0']. Basically the string or strings should have the direction frame and quantities for Ra and Dec J2000 00h00m00.0 90d00m00.0  

                shape            The new shape type. A string that is either 'point', 'Gaussian', 'disk', or 'limbdarkeneddisk' disk limbdarkeneddisk Gaussian point  

                majoraxis        The width of the larger axis. A quantity with angular units 2.0arcmin  

                minoraxis        The width of the smaller axis. A quantity with angular units 1.0arcmin  

                positionangle    The rotation of the axes with respect to the reference frame. A quantity with angular units 0.0deg  

                freq             The reference frequency. A quantity with units equivalent to the 'Hz' and frame or a frequency measure, e.g ['TOPO', '1.6GHz'], or simply default frame (LSRK) '1.6GHz' LSRK 1.415GHz  

                spectrumtype     The spectrum type, a string that is either 'constant' or 'spectral index' spectral index constant  

                index            The spectral index 1.0  

                optionalparms    optional parameters in vector (currently only used for limbdarkeneddisk) 0.0  

                label            The label for the component  

                 

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

                       

        """ 

        return _componentlist.componentlist_addcomponent(self, *args, **kwargs) 

 

    def close(self, log = True): 

        """ 

        close(self, log = True) -> bool 

 

        Summary 

                Save the componentlist to disk and reset its state. 

 

        Description 

                 

            The close function resets the componentlist to its default state. In 

            this state it contains no components and is not associated with 

            any table.  

             

            This function flushes all the components in memory to disk if the 

            componentlist is associated with a table. The table is then 

            closed, and the contents of the list deleted. 

             

            If the list is not associated with a table its contents are still 

            deleted and memory used by the list is released. 

           

 

        Input Parameters: 

                log              Send a message to the logger true  

                 

        Example: 

                 

            See the example for the 

            rename function. 

           

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

                       

        """ 

        return _componentlist.componentlist_close(self, log) 

 

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

        """ 

        edit(self, which, log = True) -> bool 

 

        Summary 

                Start up the component editor gui {bf (Not implemented yet)} 

 

        Description 

                 

 

            The edit function starts up a graphical user interface which allows 

            the user to view and manipulate individual components. The which 

            argument specifies the component to edit.  

 

            The component being edited is copied into the 

            componenteditor 

            tool. Hence if you add or remove components or change the order 

            of components in the list while the component is in the editor it 

            will be put back in the wrong place!  So do not manipulate the 

            list while editting a component. It is also suggested you only 

            edit one component at a time. 

 

           

 

        Input Parameters: 

                which            An index specifying which component. An integer between 0 and one less than the list length no default  

                log              Send a message to the logger true  

                 

        Example: 

                 

            See the example for the 

            simulate function. 

           

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

                       

        """ 

        return _componentlist.componentlist_edit(self, *args, **kwargs) 

 

    def done(self): 

        """ 

        done(self) -> bool 

 

        Summary 

                Delete the componentlist tool 

 

        Description 

                 

            The done function frees up all the memory associated with a 

            componentlist tool. After calling this function the componentlist  

            tool cannot be used, either to manipulate the current list, or 

            to open a new one. This function does not delete the disk 

            file associated with a componentlist, but it will shut down the 

            server process if there are no other componentlist tools being used. 

           

        Example: 

                 

            See the example for the 

            rename function. 

           

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

                       

        """ 

        return _componentlist.componentlist_done(self) 

 

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

        """ 

        select(self, which) -> bool 

 

        Summary 

                Mark components in the list 

 

        Description 

                 

            The select function is used to mark the specified components as 

            ``selected''. This function will be used in conjunction with the 

            planned graphical user interface. Other functions functions in the 

            componentlist tool will behave no differently if a component is 

            marked as ``selected''. 

 

            Components are not selected when the list is initially read 

            from disk or when a new component is added to the list using the  

            simulate function. 

           

 

        Input Parameters: 

                which            A vector of indices. Indices must be between 0 and one less than the list length, inclusively  

                 

        Example: 

                 

             

              cl.open('crux.cl') 

              cl.select([1,3]) 

             

           

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

                       

        """ 

        return _componentlist.componentlist_select(self, *args, **kwargs) 

 

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

        """ 

        deselect(self, which) -> bool 

 

        Summary 

                Unmark components in the list 

 

        Description 

                 

 

            The deselect function is used to remove the ``selected'' mark from 

            specified components in the list. This function wiil be used in 

            conjunction with the planned graphical user interface and no other 

            functions in the componentlist will behave differently if a 

            component is marked as ``selected'' or not. 

 

            Components are not selected when the list is initially read 

            from disk or when a new component is added to the list using the  

            simulate 

            function. Deselecting a component that is already deselected is 

            perfectly valid and results in no change. 

           

 

        Input Parameters: 

                which            A vector of indices Indices must be between 0 and one less than the list length, inclusively  

                 

        Example: 

                 

             

              cl.open('crux.cl') 

              cl.select([1,3]) 

              cl.deselect([2,3]) 

             

           

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

                       

        """ 

        return _componentlist.componentlist_deselect(self, *args, **kwargs) 

 

    def selected(self): 

        """ 

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

 

        Summary 

                Determine which components are selected 

 

        Description 

                 

            The selected function is used to determine which components in a 

            list are selected. It returns a vector with indices that indicate 

            which components are selected. A zero length vector is returned if  

            no components are selected. 

 

            Components are marked as selected using the 

            select 

            function. This function will be used in conjunction with the 

            graphical user interface and other functions in the componentlist 

            tool will behave no differently if a component is marked as 

            ``selected'' or not. 

 

           

        Example: 

                 

             

              cl.open('crux.cl') 

              cl.select([1,3]) 

              cl.deselect([2,3]) 

              cl.selected() 

             

           

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

                       

        """ 

        return _componentlist.componentlist_selected(self) 

 

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

        """ 

        getlabel(self, which) -> string 

 

        Summary 

                Get the label of the specified component 

 

        Description 

                 

             The getlabel function returns the label associated with the specified 

             component. The label is an arbitrary text string that can be used  

             to tag a component. 

           

 

        Input Parameters: 

                which            An index specifying which component. An integer between 0 and one less than the list length, inclusively  

                 

        Example: 

                 

             

              cl.open('crux.cl') 

              cl.getlabel(1) 

             

           

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

                       

        """ 

        return _componentlist.componentlist_getlabel(self, *args, **kwargs) 

 

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

        """ 

        setlabel(self, which, value, log = True) -> bool 

 

        Summary 

                Set the label of the specified components 

 

        Description 

                 

             The setlabel function is used to reassign the label (an arbitrary 

             text string) of the specified components to 

             a new value.  

           

 

        Input Parameters: 

                which            An index specifying the component to modify. An integer between 0 and one less than the list length, inclusively no default  

                value            The label for the specified components  

                log              Send a message to the logger true  

                 

        Example: 

                 

             

              cl.open('centarusA.cl') 

              cl.setlabel(1, 'Core') 

                

           

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

                       

        """ 

        return _componentlist.componentlist_setlabel(self, *args, **kwargs) 

 

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

        """ 

        getfluxvalue(self, which) -> std::vector<(double)> 

 

        Summary 

                Get the flux value of the specified component 

 

        Description 

                 

             The getfluxvalue function returns the value of the flux of the 

             specified component using the current units and the current 

             polarization representation. The functions  

             getfluxunit \& 

             getfluxpol \& 

             can be used to get the units and polarization 

             representation that corresponds to the supplied value. 

           

 

        Input Parameters: 

                which            An index specifying which component. An integer between 0 and one less than the list length, inclusively no default  

                 

        Example: 

                 

             

              cl.open('crux.cl'); 

              flux = cl.getfluxvalue(1); 

              unit = cl.getfluxunit(1); 

               

             

            This example returns the values, units, polarization and error of the 

            first component in the list. 

           

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

                       

        """ 

        return _componentlist.componentlist_getfluxvalue(self, *args, **kwargs) 

 

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

        """ 

        getfluxunit(self, which) -> string 

 

        Summary 

                Get the flux unit of the specified component 

 

        Description 

                 

             The getfluxunit function returns the units of the flux of the 

             specified component. The actual values are obtained using the  

             getfluxvalue function. 

           

 

        Input Parameters: 

                which            An index specifying which component. An integer between 0 and one less than the list length, inclusively  

                 

        Example: 

                 

          See the example for the 

          getfluxvalue function. 

           

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

                       

        """ 

        return _componentlist.componentlist_getfluxunit(self, *args, **kwargs) 

 

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

        """ 

        getfluxpol(self, which) -> string 

 

        Summary 

                Get the polarization representation for the flux of the specified component {bf (Not implmented yet)} 

 

        Description 

                 

             The getfluxunit function returns the polarization representation 

             of the flux of the specified component. The actual values are 

             obtained using the 

             getfluxvalue 

             function. 

           

 

        Input Parameters: 

                which            An index specifying which component. An integer between 0 and one less than the list length, inclusively  

                 

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

                       

        """ 

        return _componentlist.componentlist_getfluxpol(self, *args, **kwargs) 

 

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

        """ 

        getfluxerror(self, which) -> std::vector<(double)> 

 

        Summary 

                Get the error in the flux of the specified component 

 

        Description 

                 

             The getfluxerror function returns the error in the flux of the 

             specified component using the current units and the current 

             polarization representation. The functions  

             getfluxvalue \& 

             getfluxunit \& 

             getfluxpol \& 

             can be used to get the value, units and polarization 

             representation that corresponds to the specified error. 

 

             No error calculations are done by this tool. The error can be 

             stored and retreived and if any of the parameters of the flux 

             change the user is responsible for updating the errors. 

           

 

        Input Parameters: 

                which            Index specifying which component. An integer between 0 and one less than the list length, inclusively  

                 

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

                       

        """ 

        return _componentlist.componentlist_getfluxerror(self, *args, **kwargs) 

 

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

        """ 

        setflux(self, which, value = initialize_variant(""), unit = string("Jy"),  

            polarization = string("Stokes"), error = initialize_variant(""),  

            log = True) -> bool 

 

        Summary 

                Set the flux of the specified components 

 

        Description 

                 

             The setflux function is used to reassign the flux of the specified 

             components to  

             a new value. The flux value, unit and polarization can be 

             specified and any number of components can be set to the new value. 

             (Currently, the parameter, error is ignored.) 

           

 

        Input Parameters: 

                which            A vector of indices specifying the components to modify. A vector with indices between 0 and one less than the list length, inclusively  

                value            The flux values for the specified components A vector with four real or complex numbers  

                unit             The units of the flux. Any string with the same dimensions as the Jansky Jy  

                polarization     The polarization of the value field circular linear Stokes  

                error            The error in the value field. A complex vector of length four.  

                log              Send a message to the logger true  

                 

        Example: 

                 

             

              cl.open('crux.cl'); 

              cl.setflux(0, [1,0,0,0], unit='jy',  

                         polarization='Stokes', error=[.3, 0, 0, 0]) 

             

           

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

                       

        """ 

        return _componentlist.componentlist_setflux(self, *args, **kwargs) 

 

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

        """ 

        convertfluxunit(self, which, unit = string("Jy")) -> bool 

 

        Summary 

                Change (convert) the flux units of the specified components 

 

        Description 

                 

            The convertfluxunit function is used to convert the flux to another  

            unit. The units mph{must} have the same dimensions as the Jansky. 

           

 

        Input Parameters: 

                which            A vector of indices specifying the components to modify. A vector with indices between 0 and one less than the list length, inclusively  

                unit             The units of the flux. Any string with the same dimensions as the Jansky Jy  

                 

        Example: 

                 

             

              cl.open('crux.cl') 

              print cl.getfluxvalue(1) 

              cl.convertflux(1, 'WU') 

              print cl.getfluxvalue(1) 

             

           

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

                       

        """ 

        return _componentlist.componentlist_convertfluxunit(self, *args, **kwargs) 

 

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

        """ 

        convertfluxpol(self, which, polarization = string("Stokes")) -> bool 

 

        Summary 

                Change (convert) the polarization representation of the specified components 

 

        Description 

                 

            The convertfluxpol function is used to convert the flux to another  

            polarization representation. There are are three representations 

            used, namely , 'Stokes', 'linear' \& 'circular' 

           

 

        Input Parameters: 

                which            A vector of indices specifying the components to modify. A vector with indices between 0 and one less than the list length, inclusively  

                polarization     The new polarization representation circular linear Stokes  

                 

        Example: 

                 

             

              cl.open('centarusA.cl') 

              print cl.getfluxvalue(1) 

              cl.convertfluxpol(1, 'linear') 

              print cl.getfluxvalue(1) 

             

           

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

                       

        """ 

        return _componentlist.componentlist_convertfluxpol(self, *args, **kwargs) 

 

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

        """ 

        getrefdir(self, which) -> record 

 

        Summary 

                Return the reference direction 

 

        Description 

                 

            The getrefdir function returns, as a direction measure, the 

            reference direction for the specified component. The reference 

            direction is for all the currently supported component shapes the 

            direction of the centre of the component. 

           

 

        Input Parameters: 

                which            An index specifying which component. An integer between 0 and one less than the list length, inclusively  

                 

        Example: 

                 

             

              cl.open('crux.cl') 

              dir = cl.getrefdir(1) 

             

           

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

                       

        """ 

        return _componentlist.componentlist_getrefdir(self, *args, **kwargs) 

 

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

        """ 

        getrefdirra(self, which, unit = string("deg"), precision = 6) -> string 

 

        Summary 

                Get the RA of the reference direction. {bf (Not implemented not) } 

 

        Description 

                 

            The getrefdirra function returns the right ascension of the reference 

            direction of the component as a formatted string. If the reference 

            frame is something other than J2000 or B1950 the value returned is 

            the latitude or the azimuthal angle. 

 

            The unit argument specifies the units for the returned value. It 

            can be any angular unit (eg. 'deg', 'rad', 'arcsec', 'mas') or it 

            can be 'angle' or 'time'. If it is 'angle' then the returned 

            string is formatted in degrees, minutes, seconds  

            ie., '+DDD.MM.SS.sss'. If it is 'angle' then the returned string 

            is formatted in hours, minutes, seconds ie., 'HH:MM:SS.sss'. 

 

            The precision argument controls the numerical precision of the 

            returned value. For the angular units it controls how many digits 

            are in the returned string. For the 'angle' unit, precisions of 

            two, four \& six control whether the degrees, degrees,minutes or 

            degrees, minutes \& seconds are returned. Higher precisions 

            increase the precision of the seconds field. Similarly, for the 

            'time' unit precisions of two, four \& six control whether the 

            hours, hours, minutes or hours, minutes \& seconds are returned. 

           

            All directions are stored internally in double precision. 

           

 

        Input Parameters: 

                which            An index specifying which component. An integer between 0 and one less than the list length, inclusively  

                unit             The angular unit of the returned value. Any string containing an angular unit or 'angle' or 'time' deg  

                precision        The number of digits in the returned string. Numbers between 1 and 16 make the most sense 6  

                 

        Example: 

                 

             

              include 'componentlist.g' 

              cl := componentlist('crux.cl'); 

              print 'The first component is at RA: ', cl.getrefdirra(1, 'time'), 

                    ' Dec: ', cl.getrefdirdec(1, 'angle'),  

                    ' (', cl.getrefdirframe(1), ')' 

             

           

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

                       

        """ 

        return _componentlist.componentlist_getrefdirra(self, *args, **kwargs) 

 

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

        """ 

        getrefdirdec(self, which, unit = string("deg"), precision = 6) -> string 

 

        Summary 

                Get the declination of the reference direction.{bf (Not implemented yet)} 

 

        Description 

                 

 

            The getrefdirdec function returns the declination of the reference 

            direction of the component as a formatted string. If the reference 

            frame is something other than J2000 or B1950 the value returned is 

            the longitude or the altitude. 

 

            See the 

            getrefdirra 

            function for a description of the unit and precision arguments. 

 

           

 

        Input Parameters: 

                which            An index specifying which component. An integer between 0 and one less than the list length, inclusively  

                unit             The angular unit of the returned value. Any string containing an angular unit or 'angle' or 'time' deg  

                precision        The number of digits in the returned string. Numbers between 1 and 16 make the most sense 6  

                 

        Example: 

                 

            See the example for the 

            getrefdirra function. 

           

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

                       

        """ 

        return _componentlist.componentlist_getrefdirdec(self, *args, **kwargs) 

 

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

        """ 

        getrefdirframe(self, which) -> string 

 

        Summary 

                Get the reference frame of the reference direction. 

 

        Description 

                 

            The getrefdirframe function returns the reference frame of the reference 

            direction of the component as a string. The returned string is 

            always in upper case. Common frames are, 'J2000', 'B1950' and 'GALACTIC'. 

 

           

 

        Input Parameters: 

                which            An index specifying which component. An integer between 0 and one less than the list length, inclusively  

                 

        Example: 

                 

            See the example for the 

            getrefdirra function. 

           

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

                       

        """ 

        return _componentlist.componentlist_getrefdirframe(self, *args, **kwargs) 

 

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

        """ 

        setrefdir(self, which = 1, ra = initialize_variant(""), dec = initialize_variant(""),  

            log = True) -> bool 

 

        Summary 

                Set the reference direction 

 

        Description 

                 

            The setrefdir function sets the reference direction of the 

            specified components to a new value. The direction is defined by 

            separately specifying the right ascension and the declination. 

 

            The right ascension is specified as a string or a real number 

 

            Ra can be in standard angle units 'deg', 'rad', or time formatted as such 'HH:MM:SS.sss' 

            eg., '19:34:63.8' or angle formatted as such  '+DDD.MM.SS.sss' eg., 

            '127.23.12.37'.  

 

            Similarly the declination is specified as a string or a real 

            number and the decunit can be any angular unit or 'angle' or 

            'time'. 

           

 

        Input Parameters: 

                which            A vector of indices specifying the components to modify. A vector with indices between 0 and one less than the list length, inclusively 1  

                ra               The RA of the new direction, A formatted string or a number  

                dec              The declination of the new direction. A formatted string or a number  

                log              Send a message to the logger true  

                 

        Example: 

                 

             

              cl.simulate(3) 

              cl.setrefdir(0, '12:26:35.9', '-63.5.56') 

              cl.setrefdir(1, '12h26m35.9', '-63d5m56') 

              cl.setrefdir(2, '-173.35deg', '-1.10128rad') 

              cl.rename('testcls.cl')  # write to disk 

             

           

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

                       

        """ 

        return _componentlist.componentlist_setrefdir(self, *args, **kwargs) 

 

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

        """ 

        setrefdirframe(self, which, frame, log = True) -> bool 

 

        Summary 

                Set the reference frame for the direction 

 

        Description 

                 

 

            The setrefdirframe function sets the reference frame for the 

            reference direction of the specified components (what a mouthful)! 

 

            Currently the reference frame does not include additional 

            information like when and where the observation took place. Hence 

            only reference frames that are independent of this information can be 

            used. This includes the common ones of 'J2000', 'B1950', and 

            'Galactic'. The measures module contains a 

            complete listing of all possible reference frames. The parsing of 

            the reference frame string is case-insensitive. 

 

           

 

        Input Parameters: 

                which            A vector of indices specifying the components to modify. A vector with indices between 0 and one less than the list length, inclusively  

                frame            The new reference frame, A string like 'B1950', 'J2000' or 'galactic'  

                log              Send a message to the logger true  

                 

        Example: 

                 

             

              cl.open('crux.cl'); 

              cl.setrefdirframe(0, 'B1950'); 

             

           

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

                       

        """ 

        return _componentlist.componentlist_setrefdirframe(self, *args, **kwargs) 

 

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

        """ 

        convertrefdir(self, which, frame) -> bool 

 

        Summary 

                Convert the reference direction to a new frame 

 

        Description 

                 

            The convertrefdir function changes the specified components to use a 

            new direction reference frame. Using this function will change the 

            right-ascension and declination of the component(s), unlike the 

            setrefdirframe which does not. 

 

            Please see the 

            setrefdirframe 

            function for a description of what frames are allowed. 

 

           

 

        Input Parameters: 

                which            A vector of indices specifying the components to modify. A vector with indices between 0 and one less than the list length, inclusively  

                frame            The new reference frame A string like 'B1950', 'J2000' or 'galactic'  

                 

        Example: 

                 

             

              cl.open('crux.cl'); 

              cl.convertrefdirframe(0, 'J2000'); 

             

           

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

                       

        """ 

        return _componentlist.componentlist_convertrefdir(self, *args, **kwargs) 

 

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

        """ 

        shapetype(self, which) -> string 

 

        Summary 

                Returns the shape type of the component 

 

        Description 

                 

            The shapetype function returns the current shape of the specified 

            component. The shape defines how the flux of the component varies 

            with direction on the sky. Currently there are three shapes 

            available. These are 'Point', 'Gaussian', 'Disk', and 'Limbdarkeneddisk' (experimental). This 

            function returns one of these four strings. 

 

           

 

        Input Parameters: 

                which            An index specifying which component. An integer between 0 and one less than the list length, inclusively  

                 

        Example: 

                 

             

              cl.open('crux.cl') 

              print 'The first component has a', cl.shapetype(0), ' shape' 

             

           

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

                       

        """ 

        return _componentlist.componentlist_shapetype(self, *args, **kwargs) 

 

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

        """ 

        getshape(self, which) -> record 

 

        Summary 

                Return the shape parameters the component 

 

        Description 

                 

 

            The getshape function returns the shape parameters of a component 

            in a record. As different shapes can have a differing number and 

            type of parameters the shape parameters are returned in a record 

            with fields that correspond to parameters relevant to the current 

            shape. 

 

            For a point shape there are only two fields; type and 

            direction. These are the shape type, and the reference 

            direction. These values are also returned by the 

            shapetype and 

            getrefdir 

            functions. 

 

            For both the Gaussian and disk shapes there are three additional 

            fields; majoraxis, minoraxis \& positionangle. These are angular 

            quantities, and hence are records with a value 

            and a unit.  

 

           

 

        Input Parameters: 

                which            An index specifying which component. An integer between 0 and one less than the list length, inclusively  

                 

        Example: 

                 

            See the examples for the 

            setshape \&  

            convertshape 

            functions.   

           

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

                       

        """ 

        return _componentlist.componentlist_getshape(self, *args, **kwargs) 

 

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

        """ 

        setshape(self, which, type = string("Point"), majoraxis = initialize_variant("1.0arcmin"),  

            minoraxis = initialize_variant("1.0arcmin"),  

            positionangle = initialize_variant("0.0deg"),  

            majoraxiserror = initialize_variant("0.0arcmin"),  

            minoraxiserror = initialize_variant("0.0arcmin"),  

            positionangleerror = initialize_variant("0.0deg"),  

            optionalparms = initialize_vector(1, (double)0.0),  

            log = True) -> bool 

 

        Summary 

                Change the shape of the component 

 

        Description 

                 

            The setshape function changes the shape of the specified components 

            to the user specified shape. 

 

            The type argument defines what the sort of new shape to use. This 

            can be either 'point', 'Gaussian', 'disk', or 'limbdarkeneddisk'.  

            The parsing of this string is case insensitive. The 'limbdarkeneddisk' 

            is an experimental disk model with the limb-darkening effect, where  

            the sky brigtness is described as {${I=I_o (1-(r/R)^2)^{n/2}}$} with  

            R being apparent body radius. The n can be set in optionalparms (if it is 

            not set, the default value, 0.0 will be used). 

 

            If the shape type is 'point' then the remaining arguments in this 

            function are ignored. There are no other parameters needed to 

            specify a point shape.  

 

            But if the shape is 'Gaussian', 'disk', or 'limbdarkeneddisk',  

            the remaining arguments are needed to fully specify the shape.  

            The majoraxis, minoraxis and positionangle arguments are quantities (see the 

            quanta module for a definition of a 

            quantity). Hence they can be specified either as with string eg., 

            '1arcsec' or with a record eg., [value=1, unit='deg']. 

 

            The major axis is the width of the larger axis. For the Gaussian 

            shape this is the full width at half maximum. And the minor axis 

            is the width of the orthogonal axis. The positionangle is the 

            specifies the rotation of these two axes with respect to a line 

            connecting the poles of the current direction reference frame. If 

            the angle is positive the the north point of the component moves 

            in the eastern direction. 

 

           

 

        Input Parameters: 

                which            A vector of indices specifying the components to modify. A vector with indices between 0 and one less than the list length, inclusively  

                type             The new shape type. A string that is either 'point', 'Gaussian', 'disk'i, or 'limbdarkeneddisk' disk limbdarkeneddisk Gaussian Point  

                majoraxis        The width of the larger axis. A quantity with angular units 1.0arcmin  

                minoraxis        The width of the smaller axis. A quantity with angular units 1.0arcmin  

                positionangle    The rotation of the axes with respect to the reference frame. A quantity with angular units 0.0deg  

                majoraxiserror   Error ~The width of the larger axis. A quantity with angular units 0.0arcmin  

                minoraxiserror   Error of the width of the smaller axis. A quantity with angular units 0.0arcmin  

                positionangleerror       Error of the rotation of the axes with respect to the reference frame. A quantity with angular units 0.0deg  

                optionalparms    optional parameters in a vector (for limbdarkeneddisk) 0.0  

                log              Send a message to the logger true  

                 

        Example: 

                 

             

              cl.open('crux.cl', nomodify=False) 

              cl.setshape(3, 'disk',  '45mas', '45mas') 

              print cl.getshape(3)['majoraxis'] 

             

           

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

                       

        """ 

        return _componentlist.componentlist_setshape(self, *args, **kwargs) 

 

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

        """ 

        convertshape(self, which, majoraxis = string("arcmin"), minoraxis = string("arcmin"),  

            positionangle = string("deg")) -> bool 

 

        Summary 

                Change the units of the shape parameters {bf (Not implemented yet) } 

 

        Description 

                 

 

            The convertshape function changes the units of the specified shape 

            parameters on the specified components. When changing the units it  

            also converts the values so that overall the angle has not changed. 

 

            Depending on the component shape some arguments of this function 

            are ignored. If the shape type is 'point', then all but the which 

            argument are ignored. This function is useless for points. 

 

            If the shape is a 'gaussian' or 'disk' then this will modify the 

            units of the major and minor axes and the positionangle. Use the  

            getshape function 

            to see these parameters using the new units. 

 

           

 

        Input Parameters: 

                which            A vector of indices specifying the components to modify. A vector with indices between 0 and one less than the list length, inclusively  

                majoraxis        The units to use on the larger axis. A string with angular units rad deg mas arcsec arcmin  

                minoraxis        The units to use on the smaller axis. A string with angular units rad deg mas arcsec arcmin  

                positionangle    The units to use for the rotation of these axes. A string with angular units rad deg  

                 

        Example: 

                 

             

              include 'componentlist.g' 

              cl := componentlist('crux.cl'); 

              cl.convertshape(3, 'arcsec', 'arcsec'); 

              print cl.getshape(3).minoraxis; 

             

           

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

                       

        """ 

        return _componentlist.componentlist_convertshape(self, *args, **kwargs) 

 

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

        """ 

        spectrumtype(self, which) -> string 

 

        Summary 

                Returns the spectral shape of the component 

 

        Description 

                 

            The spectrumtype function returns the current spectral shape of the 

            specified component. The spectral shape defines how the flux of 

            the component varies with frequency. Currently there are two 

            spectral shapes available. These are 'Constant' and 'Spectral 

            Index'. This function returns one of these two strings. 

 

           

 

        Input Parameters: 

                which            An index specifying which component. An integer between 0 and one less than the list length, inclusively  

                 

        Example: 

                 

             

              cl.open('crux.cl') 

              print 'The first component has a', cl.spectrumtype(1), ' spectrum' 

             

           

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

                       

        """ 

        return _componentlist.componentlist_spectrumtype(self, *args, **kwargs) 

 

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

        """ 

        getspectrum(self, which) -> record 

 

        Summary 

                Return the spectral parameters the component 

 

        Description 

                 

 

            The getspectrum function returns the spectral parameters of a 

            component in a record. As different spectral shapes can have a 

            differing number and type of parameters the spectral parameters 

            are returned in a record with fields that correspond to parameters 

            relevant to the current spectral shape. 

 

            For a constant spectrum there are only two fields; type and 

            frequency. These are the spectral type, and the reference 

            frequency. These values are also returned by the 

            spectrumtype and 

            getfreq 

            functions. 

 

            For the spectral index spectral shape there is also an index 

            field.  This contains a vector with four numbers, these are the 

            spectral indicies for the I,~Q,~U,~\&~V components of the flux. 

 

           

 

        Input Parameters: 

                which            An index specifying which component. An integer between 0 and one less than the list length, inclusively  

                 

        Example: 

                 

            See the examples for the 

            setspectrum \&  

            getspectrum 

            functions.   

           

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

                       

        """ 

        return _componentlist.componentlist_getspectrum(self, *args, **kwargs) 

 

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

        """ 

        setstokesspectrum(self, which, type = string("spectral index"), index = initialize_vector(1,(double)0.0),  

            tabularfreqs = initialize_vector(1,(double)1.0e11),  

            tabulari = initialize_vector(1,(double)1.0),  

            tabularq = initialize_vector(1,(double)0.0),  

            tabularu = initialize_vector(1,(double)0.0),  

            tabularv = initialize_vector(1,(double)0.0),  

            reffreq = initialize_variant("1.4GHz"),  

            frame = string("LSRK")) -> bool 

 

        Summary 

                Change the spectrum of the component 

 

        Description 

                 

            The setstokesspectrum function changes the spectrum of the specified components 

            to the user specified spectrum. This is different from setspectrum as it provides ways to control variation of all 4 Stokes parameters with frequency. If only I variation is needed please use setspectrum 

 

            The type argument defines what the sort of new spectrum to use. This 

            can be either 'constant' or 'spectral index' or 'tabular'. The parsing of this 

            string is case insensitive. 

 

            If the spectrum type is 'constant' then the remaining arguments in 

            this function are ignored. There are no other parameters needed to 

            specify a constant spectrum. 

 

            But if the spectrum is 'spectral index', the {      t index} argument is 

            needed. It is a 4 element vector.  

          

           The first element ($lpha_0$) is the spectral index of stokes I ($ I( 

        u)=I( 

        u_0)({{ 

        u}\over{ 

        u_0}})^{lpha_0} $) 

 

            The second element ($lpha_1$) is a spectral index for the fractional linear polarization ( $\sqrt{{{(Q( 

        u)^2+U( 

        u)^2)}\over{I( 

        u)^2}}} =   \sqrt{{{(Q( 

        u_0)^2+U( 

        u_0)^2)}\over{I( 

        u_0)^2}}}({{ 

        u}\over{ 

        u_0}})^{lpha_1}$). $lpha_1=0$ implies constant fractional linear polarization w.r.t frequency. 

          

            The third element is a 'Rotation Measure' factor, i.e angle of rotation $   heta= lpha_2 (\lambda^2 - \lambda_0^2)$ of the linear polarization at frequency $ 

        u$ w.r.t  frequency $ 

        u_0$.    

 

            The fourth element  is a spectral index for the fractional spectral polarization ( $ {{V( 

        u)}\over{I( 

        u)}} =   {{V( 

        u_0)}\over{I( 

        u_0)}}({{ 

        u}\over{ 

        u_0}})^{lpha_3}$ 

 

            If the spectrum is 'tabular', then {        t index} is ignored but the six parameters  

            {   t tabularfreqs, tabulari, tabularq, tabularu, tabularv and tabularframe} are considered. {      t tabularfreqs} and {   t tabulari, tabularq, tabularu, tabularv} have to be list of same lengths and larger than 2. You need at least 2 samples to interpolate the spectral value in between.  

            The Stokes parameters  of the source is interpolated from these values. Extrappolation outside the range given in { t tabularfreqs} is not done. 

            {   t tabularfreqs} should be float values in 'Hz' 

            {   t tabulari, tabularq, tabularu, tabularv} should be float values in 'Jy' 

 

 

            You should ensure that the reference 

            frequency is set to the value you desire, using the 

            setfreq 

            function if you change to the spectral index shape. 

 

           

 

        Input Parameters: 

                which            The index specifying the component to modify. A value between 0 and one less than the list length, inclusively  

                type             The new spectrum type. A string that is either 'constant or 'spectral index' or 'tabular' spectral index spectral index constant tabular  

                index            The spectral index. A 4-element vector of real numbers 0.0  

                tabularfreqs     The frequencies of for the tabular values, in Hz 1.0e11  

                tabulari         tabular Stokes I values, in Jy (same length as tabularfreqs) 1.0  

                tabularq         tabular Stokes Q values, in Jy (same length as tabularfreqs) 0.0  

                tabularu         tabular Stokes U values, in Jy (same length as tabularfreqs) 0.0  

                tabularv         tabular Stokes V values, in Jy (same length as tabularfreqs) 0.0  

                reffreq          The reference frequency for spectral index 1.4GHz  

                frame            The frame for which the frequencies given are in LSRK  

                 

        Example: 

                 

             

               

              

 

              This example add a point source model and revises the model point source spectral variation  changing the spectral index  and setting the reference flux to be at 2GHz. 

             I is assigned a spectral index of 1. fractional linear pol is assigned a spectral index of 0.4 and similarly for fraction circular pol and the linear pol angle is kept fixed with frequency. 

 

            cl.addcomponent(shape='point', flux=[10.0, 0.4, -0.2, 0.1], dir='J2000 19h00m00 -20d00m00') 

            cl.setstokesspectrum(which=0, type='spectral index', index=[1.0, 0.4, 0, 0.4], reffreq='2.0GHz') 

            cl.rename('my19hcomp.cl') 

            cl.done() 

 

             

 

           In this example a componentlist  is created from scratch and 2 sources are added 

           One whose spectral variation is defined by a spectral index and the other one as  

           tabular values. Both components have full Stokes parameters spectral variation  

           defined. 

 

           cl.done()  ### effectively resets state of cl tool 

           ###add first component 

           cl.addcomponent(flux=[10, 0.5, -0.3, 0.2], dir='J2000 15h22m00 5d04m00') 

           cl.setstokesspectrum(which=0, type='spectral index', index=[1.0, 0.4, 0, 0.4], reffreq='2.0GHz') 

           ###adding second component; flux value is unimportant as the tabular values will  

           ###will set it 

           cl.addcomponent(flux=[1.0, 0, 0, 0],dir='J2000 15h22m30 5d05m00') 

           ##define the IQUV flux variation as tabular values at different frequencies. 

           cl.setstokesspectrum(which=1, type='tabular', tabularfreqs=[1.0e9, 1.1e9, 1.2e9, 1.3e9, 1.4e9, 1.5e9, 1.6e9], tabulari=[10.0, 10.1, 10.2, 10.2, 10.25, 10.3, 1.4], tabularq=[0.2, 0.2, 0.22, 0.23, 0.22, 0.24, 0.25], tabularu=[-0.1, -0.12, -0.13, -0.13, -0.12, -0.14, -0.15], tabularv=[0.1, 0.2, 0.2, 0.2, 0.3, 0.1, 0.15]) 

           ###saving the componentlist to disk 

           cl.rename('two_comp.cl') 

           cl.done()  ###done is needed to sync to disk 

 

            

 

           

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

                       

        """ 

        return _componentlist.componentlist_setstokesspectrum(self, *args, **kwargs) 

 

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

        """ 

        setspectrum(self, which, type = string("spectral index"), index = 0.0,  

            tabularfreqs = initialize_vector(1,(double)1.0e11),  

            tabularflux = initialize_vector(1,(double)1.0),  

            tabularframe = string("LSRK")) -> bool 

 

        Summary 

                Change the spectrum of the component 

 

        Description 

                 

            The setspectrum function changes the spectrum of the specified components 

            to the user specified spectrum. 

 

            The type argument defines what the sort of new spectrum to use. This 

            can be either 'constant'or 'spectral index'. The parsing of this 

            string is case insensitive. 

 

            If the spectrum type is 'constant' then the remaining arguments in 

            this function are ignored. There are no other parameters needed to 

            specify a constant spectrum. 

 

            But if the spectrum is 'spectral index', the {      t index} argument is 

            needed to fully specify the spectrum by using the index argument.   

 

            If the spectrum is 'tabular', then {        t index} is ignored but the three parameters  

            {   t tabularfreqs, tabularflux and tabularframe} are considered. { t tabularfreqs} and {   t tabularflux} have to be list of same lengths and larger than 2. You need at least 2 samples to interpolate the spectral value in between.  

            The flux of the source is interpolated from these values. Extrappolation outside the range given in {       t tabularfreqs} is not done. 

            {   t tabularfreqs} should be float values in 'Hz' 

            {   t tabularflux} should be float values in 'Jy' 

 

 

            You should ensure that the reference 

            frequency is set to the value you desire, using the 

            setfreq 

            function if you change to the spectral index shape. 

 

           

 

        Input Parameters: 

                which            The index specifying the component to modify. A value between 0 and one less than the list length, inclusively  

                type             The new spectrum type. A string that is either 'constant or 'spectral index' or 'tabular' spectral index spectral index constant tabular  

                index            The spectral index. 0.0  

                tabularfreqs     The frequencies of for the tabular values, in Hz 1.0e11  

                tabularflux      tabular flux density values, in Jy (same length as tabularfreqs) 1.0  

                tabularframe     The frame for which the frequencies given are in LSRK  

                 

        Example: 

                 

             

               

              cl.open('centarusA.cl') 

              cl.setspectrum(2, 'spectral index', -0.5) 

              print cl.getcomponent(2)['spectrum']['index'] 

              cl.done() 

 

              This example revises the model for Centaurus-A changing the 

            spectral index of all the components in the left lobe. The output 

            from the print statement is erb|[-0.5 0 0 0]| 

 

            cl.addcomponent(shape='point', flux=[1.0, 0.0, 0.0, 0.0], dir='J2000 19h00m00 -20d00m00') 

            cl.setspectrum(which=0, type='tabular', tabularfreqs=[1.0e9, 1.1e9, 1.4e9], tabularflux=[1.0, 0.9, 0.75]) 

            cl.rename('my19hcomp.cl') 

            cl.done() 

             

           In this example a component is created from scratch as a point source 

           The spectrum is set to, say, measured values at 3 frequencies (1GHz, 1.1GHz and 1.4GHz) to 1.0Jy, 0.9Jy, 0.75Jy respectively. 

            Any frequency in between the range 1 to 1.4 GHz the flux will be estimated by interpolation. 

 

 

           

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

                       

        """ 

        return _componentlist.componentlist_setspectrum(self, *args, **kwargs) 

 

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

        """ 

        getfreq(self, which) -> record 

 

        Summary 

                Get the reference frequency {bf (Not implemented yet) } 

 

        Description 

                 

 

            The getfreq function returns, as a frequency measure, the reference 

            frequency for the specified component. At the reference frequency 

            the flux of the component is the value obtained with the 

            getfluxvalue function. The flux may be different at other 

            frequencies, depending on the components spectral shape. 

 

            If the spectral shape is constant then changing the reference 

            frequency will not affect the spectrum of the component. 

 

           

 

        Input Parameters: 

                which            An index specifying which component. An integer between 0 and one less than the list length, inclusively  

                 

        Example: 

                 

             

              include 'componentlist.g' 

              cl := componentlist('centarusA.cl'); 

              f := cl.getfreq(2); 

             

           

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

                       

        """ 

        return _componentlist.componentlist_getfreq(self, *args, **kwargs) 

 

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

        """ 

        getfreqvalue(self, which) -> double 

 

        Summary 

                Get the reference frequency value {bf (Not implemeted yet) } 

 

        Description 

                 

 

            The getfreqvalue function returns as a floating point number the 

            value of the reference frequency. To fully interpret this value 

            you should also use the frequency unit, obtained using the 

            getfrequnit 

            function and the frequency reference frame, obtained using the 

            getfrequnit 

            function 

 

           

 

        Input Parameters: 

                which            An index specifying which component. An integer between 0 and one less than the list length, inclusively  

                 

        Example: 

                 

             

              include 'componentlist.g' 

              cl := componentlist('centarusA.cl'); 

              print 'The reference frequency is ', cl.getfreqvalue(1), ' ',  

                    cl.getfrequnit(1), '(', cl.getfreqframe(1), ')' 

             

           

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

                       

        """ 

        return _componentlist.componentlist_getfreqvalue(self, *args, **kwargs) 

 

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

        """ 

        getfrequnit(self, which) -> string 

 

        Summary 

                Get the reference frequency unit {bf (Not implemeted yet) } 

 

        Description 

                 

 

            The getfrequnit function returns as a string that defines the units 

            of the reference frequency. This unit should be used in 

            conjunction with the 

            getfreqvalue 

            function. 

 

           

 

        Input Parameters: 

                which            An index specifying which component. An integer between 0 and one less than the list length, inclusively  

                 

        Example: 

                 

            See the example for the 

            getfreqvalue function. 

           

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

                       

        """ 

        return _componentlist.componentlist_getfrequnit(self, *args, **kwargs) 

 

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

        """ 

        getfreqframe(self, which) -> string 

 

        Summary 

                Get the reference frequency frame {bf (Not implemeted yet) } 

 

        Description 

                 

            The getfreqframe function returns as a string the reference frame of 

            the reference frequency of the specified component. 

 

            See the measures module for a description of 

            the available frequency reference frames. Common frames are, 

            'LSR', 'TOPO' and 'GEO'. 

 

            The frame string is always returned in upper case. 

 

           

 

        Input Parameters: 

                which            An index specifying which component. An integer between 0 and one less than the list length, inclusively  

                 

        Example: 

                 

            See the example for the 

            getfreqvalue function. 

           

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

                       

        """ 

        return _componentlist.componentlist_getfreqframe(self, *args, **kwargs) 

 

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

        """ 

        setfreq(self, which, value, unit = string("'GHz'"), log = True) -> bool 

 

        Summary 

                Set the reference frequency 

 

        Description 

                 

 

            The setfreq function sets the reference frequency of the specified 

            components to a new value. The frequency is defined by separately 

            specifying the value and its units. Use the 

            setfreqframe 

            function to set the frequency reference frame 

 

           

 

        Input Parameters: 

                which            An index specifying the component to modify An integer between 0 and one less than the list length, inclusively no default  

                value            The new frequency value. A number  

                unit             The units of the frequency. Any string with the same dimensions as the 'Hz' 'GHz'  

                log              Send a message to the logger true  

                 

        Example: 

                 

             

              cl.open('centarusA.cl') 

              cl.setfreq(1, 1.415, 'GHz') 

             

           

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

                       

        """ 

        return _componentlist.componentlist_setfreq(self, *args, **kwargs) 

 

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

        """ 

        setfreqframe(self, which, frame = string("LSRK"), log = True) -> bool 

 

        Summary 

                Set the reference frame for the frequency 

 

        Description 

                 

 

            The setfreqframe function sets the reference frame for the 

            reference frequency of the specified components. 

 

            Currently the reference frame does not include additional 

            information like when are where the observation took place. Hence 

            no conversion between reference frames is available. In the 

            interim I recommend you always use the same frame. 

 

           

 

        Input Parameters: 

                which            An index specifying the component to modify. An integer between 0 and one less than the list length, inclusively  

                frame            The new reference frame, A string like 'LSRK', 'LSRD', 'GEO' or 'TOPO TOPO GEO LSRD LSRK  

                log              Send a message to the logger true  

                 

        Example: 

                 

             

              cl.open('centarusA.cl') 

              cl.setfreqframe(0, 'LSRK') 

             

           

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

                       

        """ 

        return _componentlist.componentlist_setfreqframe(self, *args, **kwargs) 

 

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

        """ 

        convertfrequnit(self, which, unit = string("'GHz'")) -> bool 

 

        Summary 

                Convert the reference frequency to a new unit 

 

        Description 

                 

 

            The convertfrequnit function changes the specified components to use 

            a new unit for the reference frequency. Using this function will 

            change the frequency value also so that the overall reference 

            frequency is not changed. It will affect the values and units 

            obtained with 

            setfreqvalue 

            function. 

 

            Any unit can be used that has the same dimensions as the 'Hz'. 

 

           

 

        Input Parameters: 

                which            An index specifying the component to modify. An integer between 0 and one less than the list length, inclusively  

                unit             The new frequency unit. Any string with the same dimensions as the 'Hz' 'GHz'  

                 

        Example: 

                 

             

              cl.open('centarusA.cl'); 

              cl.convertfrequnit(1, 'kHz'); 

               

             

           

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

                       

        """ 

        return _componentlist.componentlist_convertfrequnit(self, *args, **kwargs) 

 

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

        """ 

        getcomponent(self, which, iknow = False) -> record 

 

        Summary 

                Extract a component from the list. 

 

        Description 

                 

 

            The component function returns a record, showing the current state 

            of the specified component in the list. 

 

            Modifying the record that is returned by this function does not 

            modify the component in the list. To do this you must remove the 

            component from the list, using the 

            remove function, 

            and add the modified component using the 

            add function, or use 

            the replace object 

            function.  This function will be removed in a future release of 

            aips++ and you are urged to use the get functions to extract 

            information about a component. 

 

           

 

        Input Parameters: 

                which            index of which component to extract. integers between 0 and one less than the length of the list, inclusively  

                iknow            Suppress the warning message false  

                 

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

                       

        """ 

        return _componentlist.componentlist_getcomponent(self, *args, **kwargs) 

 

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

        """ 

        add(self, thecomponent, iknow = True) -> bool 

 

        Summary 

                Add a component to the list. 

 

        Description 

                 

            The add function adds a component to the component 

            list. You cannot add components to a list that has been opened 

            read only. To use this function you need to know the details of 

            the record format. however this has been deprecated and you are 

            urged to use the set functions, in conjunction with the simulate 

            function to add a component to the list. 

             

           

 

        Input Parameters: 

                thecomponent     A record that represents a component. any record that contains the required fields  

                iknow            Suppress the warning message true  

                 

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

                       

        """ 

        return _componentlist.componentlist_add(self, *args, **kwargs) 

 

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

        """ 

        replace(self, which, list, whichones = initialize_vector(1, (int)-1)) -> bool 

 

        Summary 

                Replace components in the list. {bf (Not implemented yet) } 

 

        Description 

                 

 

            The replace function replaces the components from the list with 

            the specified components from another list. The source list can be 

            opened readonly and the length of the vectors in the first and 

            third arguments must the the name. 

 

            You cannot replace components in a list that has been opened read 

            only. 

 

           

 

        Input Parameters: 

                which            A vector of indices specifying the components to replace. A vector with indices between 0 and one less than the list length, inclusively  

                list             The list containing the components to copy. A componentlist tool  

                whichones        A vector of indices specifying the components to copy A vector with indices between 1 and the length of the list in the second argument -1  

                 

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

                       

        """ 

        return _componentlist.componentlist_replace(self, *args, **kwargs) 

 

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

        """ 

        summarize(self, which = -1) -> bool 

 

        Summary 

                Summarize the specified component to the logger 

 

        Description 

                 

             The summarize function summarizes the contents of the specified components to the logger. 

           

 

        Input Parameters: 

                which            An index specifying which component. Unset or an integer between 0 and one less than the list length, inclusive -1  

                 

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

                       

        """ 

        return _componentlist.componentlist_summarize(self, *args, **kwargs) 

 

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

        """ 

        iscomponentlist(self, tool) -> bool 

 

        Summary 

                Is the argument a componentlist tool? {bf (Not implemented yet) } 

 

        Description 

                 

            This global function can be used to determine if the supplied 

            argument is a componentlist tool. If so it returns True, otherwise  

            it returns False. 

           

 

        Input Parameters: 

                tool             The variable that you wish to test  

                 

        Example: 

                 

             

              include 'componentlist.g' 

              if (iscomponentlist(cl)) { 

                cl.simulate(2); 

              } else {  

                fail 'Not a componentlist'; 

              } 

             

           

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

                       

        """ 

        return _componentlist.componentlist_iscomponentlist(self, *args, **kwargs) 

 

componentlist_swigregister = _componentlist.componentlist_swigregister 

componentlist_swigregister(componentlist) 

 

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