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

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

        except ImportError: 

            import _imagepol 

            return _imagepol 

        if fp is not None: 

            try: 

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

            finally: 

                fp.close() 

            return _mod 

    _imagepol = swig_import_helper() 

    del swig_import_helper 

else: 

    import _imagepol 

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

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

    __swig_setmethods__ = {} 

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

    __swig_getmethods__ = {} 

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

    __repr__ = _swig_repr 

    def __init__(self): 

        """__init__(self) -> imagepol""" 

        this = _imagepol.new_imagepol() 

        try: self.this.append(this) 

        except: self.this = this 

    __swig_destroy__ = _imagepol.delete_imagepol 

    __del__ = lambda self : None; 

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

        """ 

        imagepoltestimage(self, outfile = string("imagepol.iquv"), rm = initialize_vector(1, (double)0.0),  

            pa0 = 0.0, sigma = 0.01,  

            nx = 32, ny = 32, nf = 32, f0 = 1.4e9, bw = 128.0e6) -> bool 

 

        Summary 

                Attach the Imagepol tool to a test image file 

 

        Description 

                 

 

        This function can be used to generate a test image and then 

        attach the Imagepol     ool\ to it. 

 

        The test image is 4-dimensional (RA, DEC, Stokes and Frequency).  The 

        Stokes axis holds I,Q,U and V.  The source is just a constant I (if you 

        don't add noise all spatial pixels will be identical) and V.  Q and U 

        vary with frequency according to the specified Rotation Measure 

        components (no attempt to handle bandwidth smearing within channels is 

        made).  The actual values of I,Q,U, and V are chosen arbitrarily 

        otherwise (could be added as arguments if desired).  

 

        You can use this image, in particular, to explore the Rotation Measure 

        algorithms in functions rotationmeasure and 

        fourierrotationmeasure.  

 

        If you don't specify the Rotation Measure, then it is chosen for you so 

        that there is no position angle ambiguity between adjacent channels 

        (the value will be sent to the Logger). 

 

        The noise added to the image is specified as a fraction of the total 

        intensity (constant).  Gaussian noise with a standard deviation of 

        {\stfaf sigma * $I_{max}$} is then added to the image.  

 

 

 

        Input Parameters: 

                outfile          Output image file name imagepol.iquv  

                rm               Rotation Measure (rad/m/m). Default is auto no-ambiguity determine. 0.0  

                pa0              Position angle (degrees) at zero wavelength 0.0  

                sigma            Fractional noise level 0.01  

                nx               Shape of image in x direction 32  

                ny               Shape of image in y direction 32  

                nf               Shape of image in frequency direction 32  

                f0               Reference frequency (Hz) 1.4e9  

                bw               Bandwidth (Hz) 128.0e6  

                 

        Example: 

                 

 

        ''' 

        # 

        print ' ----     imagepoltestimage Ex 1         ----' 

        po.imagepoltestimage(outfile='imagepoltestimage', rm=200) 

        po.rotationmeasure(rm='rm.out',rmmax=250) 

        ia.open('rm.out') 

        ia.statistics() 

        #viewer() 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_imagepoltestimage(self, *args, **kwargs) 

 

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

        """ 

        complexlinpol(self, outfile) -> bool 

 

        Summary 

                Complex linear polarization 

 

        Description 

                  

 

        This function  produces 

        the complex linear polarization; $Q+iU$ and writes 

        it to a disk image file. 

 

        The Image       ool\ cannot yet handle Complex 

        images.  You must therefore write the Complex image to disk.  The  

        Viewer can display Complex images. Also the 

        Table tool can access Complex images. 

 

 

 

        Input Parameters: 

                outfile          Output image file name  

                 

        Example: 

                 

 

        ''' 

        # 

        print ' ----     complexlinpol Ex 1     ----' 

        po.open('stokes.image') 

        po.complexlinpol('cplx') 

        tb.open('cplx') 

        #tb.browse() 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_complexlinpol(self, *args, **kwargs) 

 

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

        """ 

        complexfraclinpol(self, outfile) -> bool 

 

        Summary 

                Complex fractional linear polarization 

 

        Description 

                  

 

        This function produces 

        the complex fractional linear polarization; $(Q+iU)/I$ and writes 

        it to a disk image file. 

 

        The Image       ool\ cannot yet handle Complex 

        images.  You must therefore write the Complex image to disk.  The  

        Viewer can display Complex images. Also the 

        Table tool can access Complex images. 

 

 

 

        Input Parameters: 

                outfile          Output image file name  

                 

        Example: 

                 

 

        ''' 

        # 

        print ' ----     complexfraclinpol Ex 1         ----' 

        po.open('stokes.image') 

        po.complexfraclinpol('cplx2') 

        tb.open('cplx2') 

        #tb.browse() 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_complexfraclinpol(self, *args, **kwargs) 

 

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

        """ 

        depolratio(self, infile, debias = False, clip = 10.0, sigma = -1, outfile = string("")) -> casac::image 

 

        Summary 

                Linear depolarization ratio 

 

        Description 

                  

 

        This function  returns the linear 

        depolarization ratio computed from two frequencies; this is the ratio of 

        the fractional linear polarization at the two frequencies.  Generally 

        this is done when you have generated two images, each at a different frequency 

        (continuum work). Thus if the fractional linear polarization images are 

        $m_{ 

        u 1}$ and $m_{ 

        u 2}$ then the depolarization ratio is  

        $m_{ 

        u 1}/ m_{ 

        u 2}$. 

 

        This function operates with two images; the first (at frequency $ 

        u 1$) 

        is the one attached to your Imagepol    ool.  The second (at 

        frequency $ 

        u 2$) is supplied via the argument {\stfaf infile}, which 

        is  a String holding the name of the 

        \imagefile. 

 

        In generating the depolarization ratio, you may optionally debias the  

        linearly polarized intensity.  This requires the standard deviation of 

        the thermal noise.  You can either supply it if you know it, or it will 

        be worked out for you with outliers from the mean clipped at the 

        specified level.  

 

        You can get the depolarization ratio error image with function 

        sigmadepolratio. 

 

 

 

        Input Parameters: 

                infile           Other image  

                debias           Debias the linearly polarized intensity ? false  

                clip             Clip level for auto-sigma determination 10.0  

                sigma            Standard deviation of thermal noise. Default is auto determined. -1  

                outfile          Output image file name. Default is unset.  

                 

        Example: 

                 

 

        ''' 

        # 

        #print '        ----     depolratio Ex 1        ----' 

        #po.open('stokes.4800') 

        #dpr = po.depolratio(infile='stokes.8300')        # m_4800 / m_8300 

        #edpr = po.sigmadepolratio(infile='stokes.8300'); 

        #dpr.done() 

        #edpr.done() 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_depolratio(self, *args, **kwargs) 

 

    def close(self): 

        """ 

        close(self) -> bool 

 

        Summary 

                Close the image tool 

 

        Description 

                 

 

        This function closes the imagepol tool.  This means that it detaches 

        the tool from its \imagefile\ (flushing all the changes first).  The 

        imagepol tool is ``null'' after this change (it is not destroyed) and 

        calling any     oolfunction\ other than open will result in an 

        error. 

 

 

        Example: 

                 

 

        ''' 

        # 

        print ' ----     close Ex 1     ----' 

        # First create image and attach it to imagepol tool 

        po.imagepoltestimage('myimagepol') 

        po.close()              # Detaches image from Imagepol tool 

        print '!!!EXPECT ERROR HERE!!!' 

        po.summary()            # No image so this results in an error. 

        po.open('myimagepol')   # Image is reattached 

        po.summary()            # No error 

        po.close() 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_close(self) 

 

    def done(self): 

        """ 

        done(self) -> bool 

 

        Summary 

                Close this Imagepol tool 

 

        Description 

                 

 

 

 

        This function is the same as close(). 

 

 

        Example: 

                 

 

        ''' 

        # 

        print ' ----     done Ex 1      ----' 

        po.open('myimagepol') 

        po.done()             # Detaches image from Imagepol tool 

        print '!!!EXPECT ERROR HERE!!!' 

        po.summary()          # No image so this results in an error. 

        po.open('myimagepol') # Image is reattached 

        po.summary()          # No error 

        po.done() 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_done(self) 

 

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

        """ 

        fourierrotationmeasure(self, complex = string(""), amp = string(""), pa = string(""),  

            real = string(""), imag = string(""), zerolag0 = False) -> bool 

 

        Summary 

                Find Rotation Measure (Fourier approach) 

 

        Description 

                 

 

        This function  will only work if 

        you attach the Imagepol         ool\ (using open) to an image containing 

        Stokes Q and U, and a regular frequency axis.  It Fourier transforms 

        the complex linear polarization (Q+iU) over the spectral axis to the 

        rotation measure axis.  Thus, if your input image contained 

        RA/DEC/Stokes/Frequency, the output image would be 

        RA/DEC/RotationMeasure.  The Rotation Measure axis has as many pixels 

        as the spectral axis. 

 

        This method enables you to see the polarization as a function of 

        Rotation Meausure.  Its main use is when searching for large RMs.  See 

        Killeen, Fluke, Zhao and Ekers (1999, preprint) for a description of 

        this method (or http://www.atnf.csiro.au/ erb+~+nkilleen/rm.ps) and its 

        advantages over the traditional method 

        (rotationmeasure) of 

        extracting the Rotation Measure.  

 

        Although you can write out the complex polarization image with the 

        argument {\stfaf complex}, you can't do much with it because Image 

                ools\ cannot handle complex images.  Hence you can 

        also write out the complex linear polarization image in any or all of 

        the other forms.  

 

        The argument {\stfaf zerolag0} allows you to force the zero lag (or 

        central bin) of the Rotation Measure spectrum to zero (effectively by 

        subtracting the mean of Q and U from the Q and U images).  This may 

        avoid Gibbs phenomena from any strong low Rotation Measure signal which 

        would normally fall into the central bin.  

 

 

 

        Input Parameters: 

                complex          Output complex linear polarization image file name. Default is unset.  

                amp              Output linear polarization amplitude image file name Default is unset.  

                pa               Output linear polarization position angle (degrees) image file name Default is unset.  

                real             Output linear polarization real image file name Default is unset.  

                imag             Output linear polarization imaginary angle image file name Default is unset.  

                zerolag0         Force zero lag to 0 ? false  

                 

        Example: 

                 

 

        ''' 

        # 

        print ' ----     fourierrotationmeasure Ex 1    ----' 

        po.imagepoltestimage(outfile='iquv.im', rm=[5.0e5,1e6], nx=8, ny=8, nf=512,  

                             f0=1.4e9, bw=8e6) 

        po.fourierrotationmeasure(amp='amp') 

        ia.open('amp') 

        ia.statistics() 

        #viewer()                     # And reorder to put RM along X-axis  

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_fourierrotationmeasure(self, *args, **kwargs) 

 

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

        """ 

        fraclinpol(self, debias = False, clip = 10.0, sigma = -1, outfile = string("")) -> casac::image 

 

        Summary 

                Fractional linear polarization 

 

        Description 

                 This function  

        returns the fractional linear polarization; $\sqrt{(Q^2+U^2)}/I$. 

 

        You may optionally debias the polarized intensity.  This requires the 

        standard deviation of the thermal noise.  You can either supply it if 

        you know it, or it will be worked out for you with outliers from the 

        mean clipped at the specified level.  

 

 

 

        Input Parameters: 

                debias           Debias the linearly polarized intensity ? false  

                clip             Clip level for auto-sigma determination 10.0  

                sigma            Standard deviation of thermal noise. Default is auto determined. -1  

                outfile          Output image file name Default is unset.  

                 

        Example: 

                 

 

        ''' 

        # 

        print ' ----     fraclinpol Ex 1        ----' 

        po.open('stokes.image') 

        flp = po.fraclinpol() 

        flp.summary() 

        flp.done() 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_fraclinpol(self, *args, **kwargs) 

 

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

        """ 

        fractotpol(self, debias = False, clip = 10.0, sigma = -1, outfile = string("")) -> casac::image 

 

        Summary 

                Fractional total polarization 

 

        Description 

                 This function  

        returns the fractional linear polarization; $\sqrt{(Q^2+U^2+V^2)}/I$. 

 

        You may optionally debias the polarized intensity.  This requires the 

        standard deviation of the thermal noise.  You can either supply it if 

        you know it, or it will be worked out for you with outliers from the 

        mean clipped at the specified level.  

 

        If your image contains only Q and U, or only V, then just 

        those components contribute to the total polarized intensity. 

 

 

 

        Input Parameters: 

                debias           Debias the total polarized intensity ? false  

                clip             Clip level for auto-sigma determination 10.0  

                sigma            Standard deviation of thermal noise. Default is auto determined. -1  

                outfile          Output image file name. Default is unset.  

                 

        Example: 

                 

 

        ''' 

        # 

        print ' ----     fractotpol Ex 1        ----' 

        po.open('stokes.image') 

        ftp = po.fractotpol() 

        ftp.statistics() 

        ftp.done() 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_fractotpol(self, *args, **kwargs) 

 

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

        """ 

        linpolint(self, debias = False, clip = 10.0, sigma = -1, outfile = string("")) -> casac::image 

 

        Summary 

                Linearly polarized intensity 

 

        Description 

                 This function  

        returns the linearly polarized intensity; $\sqrt{(Q^2+U^2)}$.  

 

        You may optionally debias the polarized intensity.  This requires the 

        standard deviation of the thermal noise.  You can either supply it if 

        you know it, or it will be worked out for you with outliers from the 

        mean clipped at the specified level.  

 

 

 

        Input Parameters: 

                debias           Debias the linearly polarized intensity ? false  

                clip             Clip level for auto-sigma determination 10.0  

                sigma            Standard deviation of thermal noise. Default is auto determined. -1  

                outfile          Output image file name. Default is unset.  

                 

        Example: 

                 

 

        ''' 

        # 

        print ' ----     linpolint Ex 1         ----' 

        po.open('stokes.image') 

        lpi = po.linpolint() 

        lpi.statistics() 

        lpi.done() 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_linpolint(self, *args, **kwargs) 

 

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

        """ 

        linpolposang(self, outfile = string("")) -> casac::image 

 

        Summary 

                Linearly polarized position angle 

 

        Description 

                  

 

        This function  returns the linearly 

        polarized position angle image ($0.5    an^{-1}(U/Q)$) in degrees.  

 

 

 

        Input Parameters: 

                outfile          Output image file name. Default is unset.  

                 

        Example: 

                 

 

        ''' 

        # 

        print ' ----     linpolposang Ex 1      ----' 

        po.open('stokes.image') 

        lppa = po.linpolposang() 

        lppa.statistics() 

        lppa.done() 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_linpolposang(self, *args, **kwargs) 

 

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

        """ 

        makecomplex(self, complex, real = string(""), imag = string(""), amp = string(""),  

            phase = string("")) -> bool 

 

        Summary 

                Make a Complex image 

 

        Description 

                  

 

        This function generates a Complex \imagefile\ from either 

        a real and imaginary, or an amplitude and phase pair of images. 

        If you give a linear position angle image for the phase,  

        it will be multipled by two before the real and imaginary 

        parts are formed. 

 

 

 

        Input Parameters: 

                complex          Output complex image file name. Must be specified.  

                real             Input real image file name. Default is unset.  

                imag             Input imaginary image file name. Default is unset.  

                amp              Input amplitude image file name. Default is unset.  

                phase            Input phase image file name. Default is unset.  

                 

        Example: 

                 

 

        ''' 

        # 

        print ' ----     makecomplex Ex 1       ----' 

        po.open('stokes.image') 

        po.complexlinpol('qu.cplx1')         

        q = po.stokesq() 

        u = po.stokesu() 

        q2 = q.subimage('q',overwrite=true) 

        u2 = u.subimage('u',overwrite=true) 

        po.makecomplex('qu.cplx2', real='q', imag='u') 

        po.close() 

        # 

        ''' 

 

        In this example we make two complex linear polarization 

        images which should be identical.    

 

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

                       

        """ 

        return _imagepol.imagepol_makecomplex(self, *args, **kwargs) 

 

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

        """ 

        open(self, image = initialize_variant("")) -> bool 

 

        Summary 

                Open a new image with this imagepol tool 

 

        Description 

                 

 

        Before polarimetric analysis can commence, an \imagefile\ must be 

        attached to the imagepol tool using the open function.  Also, use this 

        function when you are finished analyzing the current \imagefile\ and 

        want to attach to another one.  This function detaches the \imagetoolfrom the current \imagefile, if one exists, and reattaches it (opens) 

        to the new \imagefile. 

 

        The input image file may be in native \casa, its, or Miriad   

        format.  Look \htmlref{here}{IMAGES:FOREIGNIMAGES}  for more 

        information on foreign images. 

 

        The input image must have a Stokes axis. The exact collection of 

        Stokes that the image has, determines what the Imagepol tool can 

        compute. Stokes I, Q, U, and V refer to total intensity, two 

        components of linear polarization, and circular polatization, 

        respectively. Therefore, if you ask for linear polarization and the 

        image only has Stokes I and V, you will get an error. 

 

        The input image may contain data at many frequencies. For example, the 

        image may be a 4D image with axes RA, DEC, Stokes and Frequency (order 

        not important) where the Frequency axis is regularly sampled. However, 

        the image may also contain many frequencies at irregular 

        intervals. Such an image may be created with the Image tool function 

        imageconcat. It enables you to concatenate images along an axis, and 

        it allows irregular coordinate values along that axis. 

 

 

 

 

 

        Input Parameters: 

                image            image file name or image record (generated by ia.torecord())  

                 

        Example: 

                 

 

        ''' 

        # 

        print ' ----     open Ex 1      ----' 

        po.open('stokes.image') 

        po.close() 

        # 

        ''' 

 

        The {\stff open} function first closes the old \imagefile\ if one exists. 

 

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

                       

        """ 

        return _imagepol.imagepol_open(self, *args, **kwargs) 

 

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

        """ 

        pol(self, which, debias = False, clip = 10.0, sigma = -1, outfile = string("")) -> casac::image 

 

        Summary 

                Polarized quantities 

 

        Description 

                 

 

        This function just packages the other specific polarization 

        functions into one where you specify an operation with the 

        argument {\stfaf which} (can be useful for scripts).   

        This argument can take the values: 

 

        egin{itemize} 

        \item 'lpi' - linearly polarized intensity (function  

          linpolint) 

 

        \item 'tpi' - total polarized intensity (function  

           totpolint) 

 

        \item 'lppa' linearly polarized position angle (function  

            linpolposang) 

 

        \item 'flp' - fractional linear polarization (function  

           fraclinpol) 

 

        \item 'ftp' - fractional total polarized intensity (function  

           fractotpol) 

 

        nd{itemize} 

 

 

 

        Input Parameters: 

                which            Specify operation. One of 'lpi', 'tpi', 'lppa', 'flp', 'ftp' (case insensitive)  

                debias           Debias the polarized intensity ? false  

                clip             Clip level for auto-sigma determination 10.0  

                sigma            Standard deviation of thermal noise. Default is auto determined. -1  

                outfile          Output image file name. Default is unset.  

                 

        Example: 

                 

 

        ''' 

        # 

        print ' ----     pol Ex 1       ----' 

        po.open('stokes.image') 

        lpi = po.pol('lpi') 

        lpi.statistics() 

        lpi.done() 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_pol(self, *args, **kwargs) 

 

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

        """ 

        rotationmeasure(self, rm = string(""), rmerr = string(""), pa0 = string(""),  

            pa0err = string(""), nturns = string(""),  

            chisq = string(""), sigma = -1, rmfg = 0.0,  

            rmmax = 0.0, maxpaerr = 1e30, plotter = string(""),  

            nx = 5, ny = 5) -> bool 

 

        Summary 

                Find Rotation Measure (traditional approach) 

 

        Description 

                 

 

        This function generates the rotation 

        measure image from a collection of different frequencies.  It will only 

        work if the Imagepol    ool\ is attached to an image containing 

        Stokes $Q$ and $U$, and a frequency axis (regular or irregular) with at 

        least 2 pixels.  It will work out the position angle images for you. 

 

        See also the fourierrotationmeasure  

        function for a new Fourier-based approach. 

 

        Rotation Measure algorithms that work robustly are not common.  The main 

        problem is in trying to account for the $n- \pi$ ambiguity (see Leahy et 

        al, Astronomy \& Astrophysics, 156, 234 or Killeen et al; 

        http://www.atnf.csiro.au/ erb+~+nkilleen/rm.ps).  

 

        The algorithm that this function uses is that of Leahy et al. (see Appendix A.1).  But as in all 

        these algorithms, the basic process is that for each spatial pixel, a 

        vector of position angles (i.e.  at the different frequencies) is fit to 

        determine the rotation measure and the position angle at zero wavelength 

        (and their errors).   An image containing 

        the number of $n- \pi$ turns that were added to the data 

        at each spatial pixel and for which the best fit was found can be written. 

        The reduced chi-squared image for the fits can also be written. 

 

        Note that no assessment of curvature (i.e. deviation 

        from the simple linear position angle - $\lambda^2$ functional form) 

        is made.   

 

        Any combination of output images can be written. 

 

        The argument {\stfaf sigma} gives the thermal noise in Stokes Q and U. 

        By default it is determined automatically using the image data.  But if it proves  

        to be inaccurate (maybe not many signal-free pixels), it may be specified. 

        This is used for calculating the error in the 

        position angles (propagation of Gaussian errors). 

 

        The argument {\stfaf maxpaerr} specifies the maximum allowable error in 

        the position angle that is acceptable.  The default is an infinite 

        value.  From the standard propagation of errors, the error in the 

        linearly polarized position angle is determined from the Stokes $Q$ and 

        $U$ images (at each spatial pixel for each frequency).  At each spatial 

        pixel we do a fit to the position angle vector (i.e.  at the different 

        frequencies) to determine the rotation measure.  If the position angle 

        error for any pixel in the vector exceeds the specified value, it is 

        dropped from the fit.     The process generates an error for the 

        fit and this is used to compute the errors in the output 

        images.   

 

        Note that {\stfaf maxpaerr} is {\it not} used to specify that any pixel 

        for which the output position angle error exceeds this value 

        should be masked out. 

 

        The argument {\stfaf rmfg} is used to specify a foreground RM value.  For 

        example, you may know the mean RM in some direction out of the Galaxy, 

        then including this can aid the algorithm by reducing ambiguity. 

 

        The argument {\stfaf rmmax} specifies the maximum absolute RM that 

        should be solved for.  This quite an important parameter.  If you leave 

        it at the default, zero, no ambiguity handling will be 

        used.  So some apriori information should be supplied; this 

        is the basic problem with rotation measure algorithms.  

 

 

 

        Input Parameters: 

                rm               Output Rotation Measure image file name. Default is unset.  

                rmerr            Output Rotation Measure error image file name. Default is unset.  

                pa0              Output position angle (degrees) at zero wavelength image file name. Default is unset.  

                pa0err           Output position angle (degrees) at zero wavelength error image file name. Default is unset.  

                nturns           Output number of turns image file name. Default is unset.  

                chisq            Output reduced chi squared image file name. Default is unset.  

                sigma            Estimate of the thermal noise. Default is auto estimate. -1  

                rmfg             Foreground Rotation Measure (rad/m/m) to subtract. 0.0  

                rmmax            Maximum rotation measure (rad/m/m) to solve for. IMPORTANT TO SPECIFY. 0.0  

                maxpaerr         Maximum input position angle error (degrees) to allow 1e30  

                plotter          Name of plotter. Default is none.  

                nx               Number of plots in x direction 5  

                ny               Number of plots in y direction 5  

                 

        Example: 

                 

 

        ''' 

        # 

        print ' ----     rotationmeasure Ex 1   ----' 

        #im = ia.imageconcat(outfile='stokes.image',  

        #                    infiles='im.f1 im.f2 im.f3 im.f4 im.f5', axis=4) 

        po.open('stokes.image') 

        ok = po.rotationmeasure(rm='rm', rmerr='rmerr', rmmax=800, maxpaerr=10) 

        # 

        ''' 

 

 

        Say we have 5 images, each with axes RA, DEC, Stokes, and Frequency in 

        that order.  We use the Image   ool\ to concatenate these images 

        along the frequency axis - you have ordered them in increasing or 

        decreasing frequency order.  We then compute the Rotation Measure 

        and Rotation Measure error images with the traditional method and 

        write them out to disk. 

 

 

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

                       

        """ 

        return _imagepol.imagepol_rotationmeasure(self, *args, **kwargs) 

 

    def sigma(self, clip = 10.0): 

        """ 

        sigma(self, clip = 10.0) -> double 

 

        Summary 

                Find best guess at thermal noise 

 

        Description 

                  

 

        This function returns the standard deviation from V, Q\&U or I in that 

        order of precedence.  It is attempting to give you the best estimate of 

        the thermal noise it can from the data.  Outliers from the mean are 

        clipped at the specified level.  

 

 

 

        Input Parameters: 

                clip             Clip level for auto-sigma determination 10.0  

                 

        Example: 

                 

 

        ''' 

        # 

        print ' ----     sigma Ex 1     ----' 

        po.open('stokes.image') 

        sigma = po.sigma() 

        print 'sigma=', sigma 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_sigma(self, clip) 

 

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

        """ 

        sigmadepolratio(self, infile, debias = False, clip = 10.0, sigma = -1, outfile = string("")) -> casac::image 

 

        Summary 

                Error in linear depolarization ratio 

 

        Description 

                  

 

        This function  returns the error 

        in the linear depolarization ratio computed from two frequencies; this 

        is the ratio of the fractional linear polarization at the two 

        frequencies.  Generally this is done when you have generated two 

        images, each at a different frequency (continuum work). Thus if the 

        fractional linear polarzation images are $m1$ and $m2$ then the 

        depolarization ratio is $m1/m2$. 

 

        This function operates with two images; the first is attached 

        to the Imagepol         ool.  The second is supplied via the 

        argument {\stfaf infile}, which is  a String 

        holding the name of the \imagefile. 

 

        In generating the depolarization ratio, and hence its error, you may 

        optionally debias the  linearly polarized intensity.  This requires the 

        standard deviation of the thermal noise.  You can either supply it if 

        you know it, or it will be worked out for you with outliers from the 

        mean clipped at the specified level.  

 

        You can get the depolarization ratio image with function 

        depolratio. 

 

 

 

        Input Parameters: 

                infile           Other image. Required input.  

                debias           Debias the linearly polarized intensity ? false  

                clip             Clip level for auto-sigma determination 10.0  

                sigma            Standard deviation of thermal noise. Default is auto determined. -1  

                outfile          Output image file name. Default is unset.  

                 

        Example: 

                 

 

 

        ''' 

        # 

        #print '        ----     sigmadepolratio Ex 1   ----' 

        #po.open('stokes.4800') 

        #dpr = po.depolratio('stokes.8300') 

        #edpr = po.sigmadepolratio('stokes.8300'); 

        #dpr.done() 

        #edpr.done() 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_sigmadepolratio(self, *args, **kwargs) 

 

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

        """ 

        sigmafraclinpol(self, clip = 10.0, sigma = -1, outfile = string("")) -> casac::image 

 

        Summary 

                Error in fractional linear polarization 

 

        Description 

                  

 

        This function  returns the 

        error (standard deviation) of the fractional linear polarization. 

        This result comes from standard propagation of errors.  The result is 

        an on-the-fly Image tool as the error is signal-to-noise ratio 

        dependent. 

 

        This function requires the standard deviation of the thermal noise.  You 

        can either supply it if you know it, or it will be worked out for you 

        with outliers from the mean clipped at the specified level.  

 

 

 

        Input Parameters: 

                clip             Clip level for auto-sigma determination 10.0  

                sigma            Standard deviation of thermal noise. Default is auto determined. -1  

                outfile          Output image file name. Default is unset.  

                 

        Example: 

                 

 

 

        ''' 

        # 

        print ' ----     sigmafraclinpol Ex 1   ----' 

        po.open('stokes.image') 

        sigflp = po.sigmafraclinpol() 

        sigflp.statistics() 

        sigflp.done()           # free up resources 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_sigmafraclinpol(self, *args, **kwargs) 

 

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

        """ 

        sigmafractotpol(self, clip = 10.0, sigma = -1, outfile = string("")) -> casac::image 

 

        Summary 

                Error in fractional total polarization 

 

        Description 

                  

 

        This function  returns the 

        error (standard deviation) of the fractional total polarization.  This 

        result comes from standard propagation of errors.  The result is an 

        on-the-fly Image tool as the error is signal-to-noise ratio dependent. 

 

        This function requires the standard deviation of the thermal noise.  You 

        can either supply it if you know it, or it will be worked out for you 

        with outliers from the mean clipped at the specified level.  

 

 

 

        Input Parameters: 

                clip             Clip level for auto-sigma determination 10.0  

                sigma            Standard deviation of thermal noise. Default is auto determined. -1  

                outfile          Output image file name. Default is unset.  

                 

        Example: 

                 

 

 

        ''' 

        # 

        print ' ----     sigmafractotpol Ex 1   ----' 

        po.open('stokes.image') 

        sigftp = po.sigmafractotpol() 

        sigftp.statistics() 

        sigftp.done() 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_sigmafractotpol(self, *args, **kwargs) 

 

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

        """ 

        sigmalinpolint(self, clip = 10.0, sigma = -1, outfile = string("")) -> double 

 

        Summary 

                Error in linearly polarized intensity 

 

        Description 

                  

 

        This function  returns the error (standard 

        deviation) of the linearly polarized intensity; $\sqrt{(Q^2+U^2)}$.  

        This result comes from standard propagation of statistical errors. 

        The result is a float as the error is not signal-to-noise 

        ratio dependent 

 

        This function requires the standard deviation of the thermal noise.  You 

        can either supply it if you know it, or it will be worked out for you 

        with outliers from the mean clipped at the specified level.  

 

 

 

        Input Parameters: 

                clip             Clip level for auto-sigma determination 10.0  

                sigma            Standard deviation of thermal noise. Default is auto determined. -1  

                outfile          Output image file name. Default is unset.  

                 

        Example: 

                 

 

 

        ''' 

        # 

        print ' ----     sigmalinpolint Ex 1    ----' 

        po.open('stokes.image') 

        siglpi = po.sigmalinpolint() 

        print 'siglpi=', siglpi 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_sigmalinpolint(self, *args, **kwargs) 

 

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

        """ 

        sigmalinpolposang(self, clip = 10.0, sigma = -1, outfile = string("")) -> casac::image 

 

        Summary 

                Error in linearly polarized position angle 

 

        Description 

                  

 

        This function  returns the 

        error (standard deviation) of the linearly polarized position angle 

        ($0.5   an^{-1}(U/Q)$$\sqrt{(Q^2+U^2)}$) in degrees.  This result 

        comes from standard propagation of errors.  The result is an 

        on-the-fly Image tool as the error is signal-to-noise ratio dependent. 

 

        This function requires the standard deviation of the thermal noise.  You 

        can either supply it if you know it, or it will be worked out for you 

        with outliers from the mean clipped at the specified level.  

 

 

 

        Input Parameters: 

                clip             Clip level for auto-sigma determination 10.0  

                sigma            Standard deviation of thermal noise. Default is auto determined. -1  

                outfile          Output image file name. Default is unset.  

                 

        Example: 

                 

 

 

        ''' 

        # 

        print ' ----     sigmalinpolposang Ex 1         ----' 

        po.open('stokes.image') 

        siglppa = po.sigmalinpolposang() 

        siglppa.statistics() 

        siglppa.done() 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_sigmalinpolposang(self, *args, **kwargs) 

 

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

        """ 

        sigmastokes(self, which, clip = 10.0) -> double 

 

        Summary 

                Find standard deviation of specified Stokes data 

 

        Description 

                  

 

        This function  returns the standard 

        deviation of the noise for the specified Stokes.  Outliers from the mean 

        are clipped at the specified level.  

 

 

 

        Input Parameters: 

                which            Must specify Stokes parameter. One of 'I', 'Q', 'U', 'V' (case insensitive)  

                clip             Clip level for auto-sigma determination 10.0  

                 

        Example: 

                 

 

        ''' 

        # 

        print ' ----     sigmastokes Ex 1       ----' 

        po.open('stokes.image') 

        sigq = po.sigmastokes('q', 10.0) 

        print 'sigq=', sigq 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_sigmastokes(self, *args, **kwargs) 

 

    def sigmastokesi(self, clip = 10.0): 

        """ 

        sigmastokesi(self, clip = 10.0) -> double 

 

        Summary 

                Find standard deviation of Stokes I data 

 

        Description 

                  

 

        This function  returns the standard deviation of the noise for the 

        Stokes I data.  Outliers from the mean are clipped at the specified 

        level.  

 

 

 

        Input Parameters: 

                clip             Clip level for auto-sigma determination 10.0  

                 

        Example: 

                 

 

        ''' 

        # 

        print ' ----     sigmastokesi Ex 1      ----' 

        po.open('stokes.image') 

        sigi = po.sigmastokesi(10.0) 

        print 'sigi=', sigi 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_sigmastokesi(self, clip) 

 

    def sigmastokesq(self, clip = 10.0): 

        """ 

        sigmastokesq(self, clip = 10.0) -> double 

 

        Summary 

                Find standard deviation of Stokes Q data 

 

        Description 

                  

 

        This function  returns the standard deviation of the noise for the 

        Stokes Q data.  Outliers from the mean are clipped at the specified 

        level.  

 

 

 

        Input Parameters: 

                clip             Clip level for auto-sigma determination 10.0  

                 

        Example: 

                 

 

        ''' 

        # 

        print ' ----     sigmastokesq Ex 1      ----' 

        po.open('stokes.image') 

        sigq = po.sigmastokesq(10.0) 

        print 'sigq=', sigq 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_sigmastokesq(self, clip) 

 

    def sigmastokesu(self, clip = 10.0): 

        """ 

        sigmastokesu(self, clip = 10.0) -> double 

 

        Summary 

                Find standard deviation of Stokes U data 

 

        Description 

                  

 

        This function  returns the standard 

        deviation of the noise for the Stokes U data.  Outliers from the mean 

        are clipped at the specified level.  

 

 

 

        Input Parameters: 

                clip             Clip level for auto-sigma determination 10.0  

                 

        Example: 

                 

 

        ''' 

        # 

        print ' ----     sigmastokesu Ex 1      ----' 

        po.open('stokes.image') 

        sigu = po.sigmastokesu(10.0) 

        print 'sigu=', sigu 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_sigmastokesu(self, clip) 

 

    def sigmastokesv(self, clip = 10.0): 

        """ 

        sigmastokesv(self, clip = 10.0) -> double 

 

        Summary 

                Find standard deviation of Stokes V data 

 

        Description 

                  

 

        This function  returns the standard 

        deviation of the noise for the Stokes V data.  Outliers from the mean 

        are clipped at the specified level.  

 

 

 

        Input Parameters: 

                clip             Clip level for auto-sigma determination 10.0  

                 

        Example: 

                 

 

        ''' 

        # 

        print ' ----     sigmastokesv Ex 1      ----' 

        po.open('stokes.image') 

        sigv = po.sigmastokesv(10.0) 

        print 'sigv=', sigv 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_sigmastokesv(self, clip) 

 

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

        """ 

        sigmatotpolint(self, clip = 10.0, sigma = -1) -> double 

 

        Summary 

                Error in total polarized intensity 

 

        Description 

                  

 

        This function  returns the error (standard 

        deviation) of the total polarized intensity; $\sqrt{(Q^2+U^2+V^2)}$.  

        This result comes from standard propagation of statistical errors. 

        The result is a float as the error is not signal-to-noise 

        ratio dependent 

 

        This function requires the standard deviation of the thermal noise.  You 

        can either supply it if you know it, or it will be worked out for you 

        with outliers from the mean clipped at the specified level.  

 

 

 

        Input Parameters: 

                clip             Clip level for auto-sigma determination 10.0  

                sigma            Standard deviation of thermal noise. Default is auto determined. -1  

                 

        Example: 

                 

 

        ''' 

        # 

        print ' ----     sigmastotpolint Ex 1   ----' 

        po.open('stokes.image') 

        sigtpi = po.sigmatotpolint() 

        print 'sigtpi=', sigtpi 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_sigmatotpolint(self, *args, **kwargs) 

 

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

        """ 

        stokes(self, which, outfile = string("")) -> casac::image 

 

        Summary 

                Stokes 

 

        Description 

                 

 

        This function returns an on-the-fly image tool containing the 

        specified Stokes only.  This interface can be useful for scripts. 

 

 

 

        Input Parameters: 

                which            Must specify Stokes. One of 'I', 'Q', 'U', 'V' (case insensitive)  

                outfile          Output image file name. Default is unset.  

                 

        Example: 

                 

 

        ''' 

        # 

        print ' ----     stokes Ex 1    ----' 

        po.open('stokes.image') 

        q = po.stokes('q') 

        q.statistics() 

        q.done() 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_stokes(self, *args, **kwargs) 

 

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

        """ 

        stokesi(self, outfile = string("")) -> casac::image 

 

        Summary 

                Stokes I 

 

        Description 

                 

        This function returns an on-the-fly image tool containing Stokes I only. 

 

 

        Input Parameters: 

                outfile          Output image file name. Default is unset.  

                 

        Example: 

                 

 

        ''' 

        # 

        print ' ----     stokesi Ex 1   ----' 

        po.open('stokes.image') 

        i = po.stokesi() 

        i.statistics() 

        i.done() 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_stokesi(self, *args, **kwargs) 

 

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

        """ 

        stokesq(self, outfile = string("")) -> casac::image 

 

        Summary 

                Stokes Q 

 

        Description 

                 

        This function returns an on-the-fly image tool containing Stokes Q only. 

 

 

        Input Parameters: 

                outfile          Output image file name. Default is unset.  

                 

        Example: 

                 

 

        ''' 

        # 

        print ' ----     stokesq Ex 1   ----' 

        po.open('stokes.image') 

        q = po.stokesq() 

        q.statistics() 

        q.done() 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_stokesq(self, *args, **kwargs) 

 

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

        """ 

        stokesu(self, outfile = string("")) -> casac::image 

 

        Summary 

                Stokes U 

 

        Description 

                 

        This function returns an on-the-fly image tool containing Stokes U only. 

 

 

        Input Parameters: 

                outfile          Output image file name. Default is unset.  

                 

        Example: 

                 

 

        ''' 

        # 

        print ' ----     stokesu Ex 1   ----' 

        po.open('stokes.image') 

        u = po.stokesu() 

        u.statistics() 

        u.done() 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_stokesu(self, *args, **kwargs) 

 

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

        """ 

        stokesv(self, outfile = string("")) -> casac::image 

 

        Summary 

                Stokes V 

 

        Description 

                 

        This function returns an on-the-fly image tool containing Stokes V only. 

 

 

        Input Parameters: 

                outfile          Output image file name. Default is unset.  

                 

        Example: 

                 

 

        ''' 

        # 

        print ' ----     stokesv Ex 1   ----' 

        po.open('stokes.image') 

        v = po.stokesv() 

        v.statistics() 

        v.done() 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_stokesv(self, *args, **kwargs) 

 

    def summary(self): 

        """ 

        summary(self) -> bool 

 

        Summary 

                Summarise Imagepol tool 

 

        Description 

                 

 

        This function just lists a summary of the Imagepol      ool\ to the logger.  

        Currently it just summarizes the image to which the tool is attached. 

 

 

 

        Example: 

                 

 

        ''' 

        # 

        print ' ----     summary Ex 1   ----' 

        po.open('stokes.image') 

        po.summary() 

        # 

        #Image name       : stokes.image 

        #Object name      : 

        #Image type       : PagedImage 

        #Image quantity   : Intensity 

        #Pixel mask(s)    : None 

        #Region(s)        : None 

        # 

        #Direction reference : J2000 

        #Spectral  reference : TOPO 

        #Velocity  type      : RADIO 

        #Rest frequency      : 1.4e+09 Hz 

        #Telescope           : UNKNOWN 

        #Observer            : UNKNOWN 

        #Date observation    : UNKNOWN 

        # 

        #Axis Coord Type      Name             Proj Shape Tile   Coord value at pixel    Coord incr Units 

        #------------------------------------------------------------------------------------------------ 

        #0    0     Direction Right Ascension   SIN    32   32  00:00:00.000    16.00 -6.000000e+01 arcsec 

        #1    0     Direction Declination       SIN    32   32 +00.00.00.000    16.00  6.000000e+01 arcsec 

        #2    1     Stokes    Stokes                    4    4       I Q U V 

        #3    2     Spectral  Frequency                32   32       1.4e+09    16.00  4.000000e+06 Hz 

        #                     Velocity                                     0    16.00 -8.565499e+02 km/s 

        # 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_summary(self) 

 

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

        """ 

        totpolint(self, debias = False, clip = 10.0, sigma = -1, outfile = string("")) -> casac::image 

 

        Summary 

                Total polarized intensity 

 

        Description 

                 This function  

        returns the total polarized intensity; $\sqrt{(Q^2+U^2+V^2)}$.  

        If your image contains only Q and U, or only V, then just 

        those components contribute to the total polarized intensity. 

 

        You may optionally debias the polarized intensity.  This requires the 

        standard deviation of the thermal noise.  You can either supply it if 

        you know it, or it will be worked out for you with outliers from the 

        mean clipped at the specified level.  

 

 

 

        Input Parameters: 

                debias           Debias the total polarized intensity ? false  

                clip             Clip level for auto-sigma determination 10.0  

                sigma            Standard deviation of thermal noised. Default is auto determined. -1  

                outfile          Output image file name. Default is unset.  

                 

        Example: 

                 

 

        ''' 

        # 

        print ' ----     totpolint Ex 1         ----' 

        po.open('stokes.image') 

        tpi = po.totpolint() 

        tpi.statistics() 

        tpi.done() 

        # 

        ''' 

 

 

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

                       

        """ 

        return _imagepol.imagepol_totpolint(self, *args, **kwargs) 

 

imagepol_swigregister = _imagepol.imagepol_swigregister 

imagepol_swigregister(imagepol) 

 

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