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

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

        except ImportError: 

            import _tableplot 

            return _tableplot 

        if fp is not None: 

            try: 

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

            finally: 

                fp.close() 

            return _mod 

    _tableplot = swig_import_helper() 

    del swig_import_helper 

else: 

    import _tableplot 

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

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

    __swig_setmethods__ = {} 

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

    __swig_getmethods__ = {} 

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

    __repr__ = _swig_repr 

    def __init__(self): 

        """__init__(self) -> tableplot""" 

        this = _tableplot.new_tableplot() 

        try: self.this.append(this) 

        except: self.this = this 

    __swig_destroy__ = _tableplot.delete_tableplot 

    __del__ = lambda self : None; 

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

        """ 

        open(self, tabnames = std::vector< string >(1, "")) -> bool 

 

        Summary 

                Specify list of tables to operate on. 

 

        Description 

                 

        Specify a list of table names to open for plotting.  All plots will 

        operate on these tables until open is called again to change the list 

        of tables. Returns true if tables are valid, false otherwise. 

 

 

        Input Parameters: 

                tabnames         List of strings identifying Table names  

                 

        Example: 

                 

 

         # set the list of tables to plot from. 

         tp.open(tabnames=['3c273.ms','3c48.ms']) 

 

 

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

                       

        """ 

        return _tableplot.tableplot_open(self, *args, **kwargs) 

 

    def setgui(self, gui = False): 

        """ 

        setgui(self, gui = False) -> bool 

 

        Summary 

                 

          Set the GUI on or off. Can be done only once !! 

 

 

        Description 

                  

          Set the GUI on or off. Can be done only once !! 

 

 

        Input Parameters: 

                gui              gui=False to turn off gui false  

                 

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

                       

        """ 

        return _tableplot.tableplot_setgui(self, gui) 

 

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

        """ 

        savefig(self, filename = string(""), dpi = -1, orientation = string(""),  

            papertype = string(""), facecolor = string(""),  

            edgecolor = string("")) -> bool 

 

        Summary 

                 

             Save the currently plotted image. 

            

 

        Description 

                 

            Store the contents of the plot window in a file.  The file format (type) 

            is based on the file name, ie. the file extension given determines the 

            format the file is saved as. The accepted formats are eps, 

            ps, png, pdf, and svg. 

 

            Internally, this function uses the matplotlib pl.savefig function. 

 

            Note that if a full path is not given that the files will be saved in 

            the current working directory. 

            

 

        Input Parameters: 

                filename         Name the plot image is to be saved to.  

                dpi              Number of dots per inch (resolution) to save the image at. -1  

                orientation      Either landscape or portrait. Supported by the postscript format only.  

                papertype        Valid values are: letter, legal, exective, ledger, a0-a10 and b0-b10. This option is supported byt the postscript format only.  

                facecolor        Color of space between the plot and the edge of the square. Valid values are the same as those accepted by the plotcolour option of tp.plotdata().  

                edgecolor        Color of the outer edge. Valid values are the same as those accepted by the plotcolour option of tp.plotdata().  

                 

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

                       

        """ 

        return _tableplot.tableplot_savefig(self, *args, **kwargs) 

 

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

        """ 

        selectdata(self, taqlstring = string("")) -> bool 

 

        Summary 

                  

            Perform a TaQL based subtable selection for subsequent plots.  

            

 

        Description 

                  

        Specify a TaQL select string. A subtable will be generated, and passed to the plotter. 

 

 

        Input Parameters: 

                taqlstring       TaQL string for selection  

                 

        Example: 

                 

 

        # set the list of tables to plot from. 

          tp.open(tabnames=['3c273.ms','3c48.ms']) 

          tp.selectdata(taqlstring='ANTENNA1==5')  

 

 

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

                       

        """ 

        return _tableplot.tableplot_selectdata(self, *args, **kwargs) 

 

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

        """ 

        plotdata(self, poption = initialize_record("1 1 6 0.8 1.0"), labels = std::vector< string >(1, ""),  

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

 

        Summary 

                 

            Plot the result of a general TaQL expression. 

            

 

        Description 

                 

        This function evaluates the specified TaQL expressions for the X and Y 

        axes of a two-dimensional plot,extracts the resulting columns, and 

        plots them. 

        egin{enumerate} 

        \item TaQL expressions resulting in scalars are plotted as a single 

               X-Y plot.  Expressions involving Array-Columns can result in 

               arrays which are then plotted as overlays. 

        \item The default mode of operation is to plot one expression against 

               another.  In the case of Array-Columns (ex. DATA column of a 

               measurement set with each row containing an array of shape 

               NColumns x NPolarzations), a Cross-plot mode allows plots with 

               the x-axis representing one axes of the 

               Array-Column. (ex. X-axis is channel number or polarization 

               number). 

        \item If multiple tables are specified in tp.open(), then the TaQL 

               expressions are applied to all tables and overlay plots are 

               generated. 

        \item Plots can be made to separate panels whose locations on the plot 

               window are user specified as a 3-tuple [nrows, ncolumns, 

               panelnumber]. 

        \item Multiple plots can be stacked upon each other on a panel 

               (overplot mode). 

        \item Plotter options can be specifed to control appearance, 

               plot-style, labels, etc. 

        nd{enumerate} 

 

        Valid TaQL strings must satisfy the following conditions. 

        egin{enumerate} 

        \item Each TaQL string must result in a Double scalar or array.\ 

        {       t 'AMPLITUDE(DATA[1,1])'} results in a Double scalar (valid). \ 

        {       t 'AMPLITUDE(DATA[1:2,1])'} results in a Double array (valid).\ 

        {       t 'MEAN(AMPLITUDE(DATA[1:2,1]))'} results in a Double scalar (valid).\ 

        {       t 'DATA[1,1]'} results in a Complex scalar (NOT valid).\ 

        {       t 'AMPLITUDE(DATA[1,1])\<10'} results in a Bool scalar (NOT valid). 

        \item All TaQL functions resulting in Double Scalars/Arrays are allowed, 

        except for those involving an explicit collapse axis (means,sums,etc..). 

        Note that these functions are different from mean,sum,etc.. which 

        are supported. 

        \item TaQL strings must be provided as pairs of strings, with the 

        X-TaQL first, followed by the Y-TaQL. There are 3 cases.\ 

        X-TaQL $-$ Scalar, Y-TaQL $-$ Scalar (one-to-one single plot)\ 

        X-TaQL $-$ Scalar, Y-TaQL $-$ Array (one-to-many overlay plot)\ 

        X-TaQL $-$ Array, Y-TaQL $-$ Array (if the shapes are 

        the same, then a one-to-one mapping is done, otherwise only the first 

        X-TaQL result is used for a one-to-many mapping with the Y-TaQL Array.) 

        \item For cross plots (for example amplitude vs channel plots in an MS), 

        the X-TaQL must be a string containing 'CROSS'. The Y-TaQL is used to 

        read out the data from the table, and the x-values are the column indices 

        (channel numbers) chosen by the Y-TaQL. 

        nd{enumerate} 

 

        Plotting options ('poption' entries) are listed below. 

 

            Default values are indicated within [ ] when present. 

            nrows [ 1 ] :            Number of rows of panels 

            ncols [ 1 ] :            Number of columns of panels 

            panel [ 1 ] :            Panel index. Must be in [1,nrows x ncols] 

            plotcolour [ 1 ] :       Plot colour. Codes for matplotlib are  

                                     [0:black, 1:red, 2:green, 3:blue, 4:cyan, 5:yellow] 

                                     [magenta is reserved for plotting flagged  

                                         values if showflags = 1 , and cannot be set 

                                           by the user as a plot colour] 

                                     If the plotcolour field is left out from 'poption', 

                                     colours are chosen automatically. 

            multicolour [ False ] :  True -\> Each channel,pol appears in a different colour. 

                                     False -\> Data from all pols and channels appear   

                                     in the same colour. Different colours 

                                     appear for different layers (overplot).  

                                     or data from different tables. 

            timeplot [ False ] :     True -\> Turn on date/time formatting for the x-axis. 

            overplot [ False ] :     True -\> Overlay on an existing plot. All layers will 

                                     remain active for data editing via flagging. Labels  

                                     will be those of the top-most layer. 

                                     False -\> Replace an existing plot with a new one. 

                                     In the case of an existing stack of plots, the 

                                     top-most layer is replaced. For example, this can be 

                                     used to modify the colour of the top-most layer 

                                     without creating an additional layer. 

            py\_plotsymbol [ , ] :    Plot markers. Options for matplotlib are 

                                     [[,]:pixel, [.]:point, [o]:circle, [x]:cross,  

                                     [+]:plus, [\^]:triangle up, [v]:triangle down, 

                                     [\<]:triangle left, [\>]:triangle right, 

                                     [-]:solid line, [--]:dashed line, [-.]:dash-dot line, 

                                     [:]:dotted line, [s]:square, [D]:diamond,  

                                     [d]:thin diamond, [1]:tripod down, [2]:tripod up, 

                                     [3]:tripod left, [4]:tripod right, [h]:hexagon, 

                                     [H]:rotated hexagon, [p]:pentagon,  

                                     [|]:vertical line symbol, [\_]:horizontal line symbol. 

            markersize [ 10.0 ] :    The size (in pixels) of the markers being plotted.   

                                     Markers are specified by the py\_plotsymbol option. 

                                     For example, '+', 'o', and 'd' 

            linewidth [ 2.0 ]        The width of the lines that are drawn, lines are 

                                     if the py\_plotsymbol chosen is a line.  For example, 

                                     '-', '--', and ':'. 

            plotrange [ ]  :         Only data within this specific range of values  

                                     [xmin,xmax,ymin,ymax] will be plotted.  

                                     Default is the data range. 

            showflags [ 0 ] :        True -\> Plot only unflagged data. 

                                     False -\> Plot only flagged data. 

            crossdirection [ False ] : Applies only with CROSS-plots on table ArrayColumns. 

                                     False -\> use column number as the x-axis (ex. channel no.). 

                                     True -\> use row number as the x-axis (ex. polarization no.). 

            pointlabels [ ] :        Data points can be annotated by supplying a 

                                     list of labels. If N labels are supplied, the 

                                     first N data points plotted will be annotated. 

                                     (Note that if data is edited via flagging,the   

                                     points are relabeled to label the first N points.) 

            windowsize [ 8.0 ] :     horizontal size of plot window (inches) 

            aspectratio [ 0.8 ] :    aspect-ratio of the plot window (dx/dy) 

            fontsize [ 12.0 ] :      Font size of title text. 

                                     Font size of x,y labels are 80% of this. 

             

 

 

        Returns true if plotting is successful, false otherwise. 

 

            

 

        Input Parameters: 

                poption          Record of plot options 1 1 6 0.8 1.0  

                labels           List of strings : Title,Xlabel,Ylabel  

                datastr          List of TaQL strings : X,Y  

                 

        Example: 

                 

        Plot data amplitude vs uv-distance for two Measurement set tables as a 

        single panel plot.  Operate on channel 1 for Stokes 1 and 2 using the 

        DATA column. 

            

 

         tp.open(tabnames=['3c273.ms','3c48.ms']) 

         pop = { 'nrows':1, 'ncols':1,'panel':1} 

         labels = ['Amplitude vs UVdist','uvdist','amplitude'] 

         xystr = ['SQRT(SUMSQUARE(UVW[1:2]))','AMPLITUDE(DATA[1,1:2])'] 

         tp.plotdata(poption=pop,labels=labels,datastr=xystr) 

 

 

        TaQL strings for the above example can also be written as follows. 

 

          xystr = ['SQRT(UVW[1]*UVW[1]+UVW[2]*UVW[2])','AMPLITUDE(DATA[1,1:2])'] 

 

 

 

        Example: 

                        

        Multi-panel plotting 

            

 

         # uvdist for pol 1 and chan 1,2 on panel 211 

         pop = { 'nrows':2, 'ncols':1,'panel':1} 

         labels = ['Amplitude vs UVdist','uvdist','amplitude'] 

         xystr = ['SQRT(SUMSQUARE(UVW[1:2]))','AMPLITUDE(DATA[1,1:2])'] 

         tp.plotdata(poption=pop,labels=labels,datastr=xystr) 

               

         # uvdist for pol 2 and chan 1,2 (overplot=1) on panel 211 

         pop = { 'nrows':2, 'ncols':1,'panel':1, 'overplot':True} 

         labels = ['Amplitude vs UVdist','uvdist','amplitude'] 

         xystr = ['SQRT(SUMSQUARE(UVW[1:2]))','AMPLITUDE(DATA[2,1:2])'] 

         tp.plotdata(poption=pop,labels=labels,datastr=xystr) 

               

         # uv coverage on panel 223 

         pop = { 'nrows':2, 'ncols':2,'panel':3, 'plotcolour':4} 

         labels = ['UV Coverage','u','v'] 

         xystr = ['UVW[1]','UVW[2]','-UVW[1]','-UVW[2]'] 

         tp.plotdata(poption=pop,labels=labels,datastr=xystr) 

               

         # amp(data[1:2,1:10]) vs channel number on panel 224 

         pop = { 'nrows':2, 'ncols':2,'panel':4, 'plotcolour':1} 

         labels = ['Amplitude vs Baseline number','baseline number','amplitude'] 

         xystr = ['28*ANTENNA1+ANTENNA2-(ANTENNA1-1)*(ANTENNA1+2)/2', 

                   'AMPLITUDE(DATA[1:2,1:10])'] 

         tp.plotdata(poption=pop,labels=labels,datastr=xystr) 

 

 

        Example: 

                 

        Plotting with time formatting 

 

         # vistime for 10 chans (timeplot=1)    

         pop = { 'nrows':1, 'ncols':1,'panel':1,'timeplot':True} 

         labels = ['Timeplot','time','amplitude'] 

         xystr = ['TIME','AMPLITUDE(DATA[1:2,1:10])'] 

         tp.plotdata(poption=pop,labels=labels,datastr=xystr) 

 

 

        Example: 

                 

        Cross-plots - take in a single TaQL expression involving an ArrayColumn, 

        and use the column numbers of each Array per row of the table as the x-axis. 

        In a measurement set, the DATA ArrayColumn contains 2D Arrays, each with  

        NCHAN columns and NPOL rows. Plotting with 'CROSS' as the X-TaQL, uses  

        channel numbers as the x-axis. The option 'crossdirection=True' can be used  

        to plot with polarization on the x-axis. 

 

 

            

         pop = { 'nrows':2, 'ncols':1,'panel':1, 'plotcolour':2} 

         labels = ['Amplitude vs Channel number','chan','amplitude'] 

         xystr = ['CROSS','AMPLITUDE(DATA[1:2,1:10])'] 

         tp.plotdata(poption=pop,labels=labels,datastr=xystr) 

         pop = { 'nrows':2, 'ncols':1,'panel':1, 'plotcolour':2, 'crossdirection':True} 

         labels = ['Amplitude vs Polarization number','pol','amplitude'] 

         xystr = ['CROSS','AMPLITUDE(DATA[1:2,1:10])'] 

         tp.plotdata(poption=pop,labels=labels,datastr=xystr) 

 

 

        Example: 

                 

        Individual points can be annotated by specifying the 'pointlabels' parameter.  

        If N labels are specified, the first N data points to be plotted, are annotated. 

 

            

         pop = {'nrows':1,'ncols':1, 'panel':1, 'plotcolour':1,'py_plotsymbol':'o', 

                'pointlabels':[' A1',' A2',' A3',' A4',' A5',' A6',' A7',' A8', 

                               ' A9',' B1',' B2',' B3',' B4',' B5',' B6',' B7', 

                               ' B8',' B9',' C1',' C2',' C3',' C4',' C5',' C6', 

                               ' C7',' C8',' C9',' D1',' D2',' D3',' D4']} 

         xystr = ['POSITION[1]','POSITION[2]'] 

         labels = ['Antenna positions','x','y'] 

         tp.plotdata(poption=pop,labels=labels,datastr=xystr) 

 

 

        Example: 

                 

        To plot with multiple colours for each channel and polarization of an MS. 

 

 

         #(multicolour=1, plotcolour > 5) 

         pop = { 'nrows':1, 'ncols':1,'panel':1, 'plotcolour':6, 

                 'showflags':0, 'multicolour':True} 

         labels = ['Amplitude vs UVdist','uvdist','amplitude'] 

         xystr = ['SQRT(SUMSQUARE(UVW[1:2]))','AMPLITUDE(DATA[1:2,1:2])'] 

         tp.plotdata(poption=pop,labels=labels,datastr=xystr) 

 

 

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

                       

        """ 

        return _tableplot.tableplot_plotdata(self, *args, **kwargs) 

 

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

        """ 

        iterplotstart(self, poption = initialize_record("1 1 6 0.8 1.0"), labels = std::vector< string >(1, ""),  

            datastr = std::vector< string >(1, ""),  

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

 

        Summary 

                 Initialize plotting with an iteration axis 

 

 

        Description 

                  

        Begin a series of plots using subtables constructed via an iteration axes. 

        In addition to plotdata parameters, set a list of iteration axes 

        (Table column names) and use iterplotnext() to step through. 

        Only forward step through is allowed. 

 

 

        Input Parameters: 

                poption          Record of plot options default is nxpanels=1, nypanels=1, windowsize=6, aspectratio=0.8, fontsize=1.0 1 1 6 0.8 1.0  

                labels           List of strings : Title,Xlabel,Ylabel  

                datastr          List of TaQL strings : X,Y  

                iteraxes         List of strings : Iteration axes  

                 

        Example: 

                 

 

         # Open a list of MS tables to plot from,  

         # and initialize a plot of Amplitude vs UV distance for  

         # channel 1 and stokes 1, iterating over Antenna1 

         tp.open(tabnames=['3c273.ms','3c48.ms']) 

         pop = { 'nrows':3, 'ncols':1,'panel':1, 'plotcolour':1, 

                 'aspectratio':1.6} 

         iteraxes = ['ANTENNA1'] 

         labels = ['Amplitude vs UVdist','uvdist','amplitude'] 

         xystr = ['SQRT(SUMSQUARE(UVW[1:2]))','AMPLITUDE(DATA[1,1:2])'] 

         tp.iterplotstart(poption=pop, labels=labels, datastr=xystr, 

                          iteraxes=iteraxes) 

         tp.iterplotnext() 

 

 

        Example: 

                 

        To iterate over baseline and plot Amplitude vs time, for stokes 1, channel 1. 

 

         pop = { 'nrows':4, 'ncols':1 } 

         labels = ['Amplitude vs UVdist (iterating over Baseline)', 

                    'uvdist','amplitude'] 

         xystr = ['SQRT(SUMSQUARE(UVW[1:2]))','AMPLITUDE(DATA[1,1])'] 

         iteraxes = ['ANTENNA1','ANTENNA2'] 

         tp.iterplotstart(poption=plotopts,labels=labels, 

                          datastr=xystr,iteraxes=iteraxes) 

 

 

 

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

                       

        """ 

        return _tableplot.tableplot_iterplotstart(self, *args, **kwargs) 

 

    def replot(self): 

        """ 

        replot(self) -> bool 

 

        Summary 

                 

            Replot all existing panels and layers. 

            

 

        Description 

                  

            Replot all existing panels and layers. 

            To be used after a change of flag version, to get all 

              visible plots to reflect the changed flags. 

 

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

                       

        """ 

        return _tableplot.tableplot_replot(self) 

 

    def iterplotnext(self): 

        """ 

        iterplotnext(self) -> int 

 

        Summary 

                 

        Start/Continue plotting 

             

 

        Description 

                  

        Start/Continue plotting by stepping through the iteration axes.  

        Call after tp.iterplotstart().  

        Returns 1 if additional iteration steps remain , 

        0 if last iteration has completed. 

 

        Example: 

                 

 

         # iterate through the data 

           

         tp.open(tabnames=['3c273.ms','3c48.ms']) 

         plotopts = {'aspectratio': 1.2, 'ncols': 2, 'nrows': 1} 

         labels = ['Amplitude vs UVdist (iterating over Antenna1)', 

                   'uvdist','amplitude'] 

         xystr = ['SQRT(SUMSQUARE(UVW[1:2]))','AMPLITUDE(DATA[1,1])'] 

         iteraxes = ['ANTENNA1'] 

         tp.iterplotstart(poption=plotopts,labels=labels, 

                          datastr=xystr,iteraxes=iteraxes) 

         ret = tp.iterplotnext() 

         ret = tp.iterplotnext() 

         ret = tp.iterplotnext() 

        ... 

 

 

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

                       

        """ 

        return _tableplot.tableplot_iterplotnext(self) 

 

    def iterplotstop(self, rmplotter = False): 

        """ 

        iterplotstop(self, rmplotter = False) -> bool 

 

        Summary 

                 Stop plot iterations. 

            

 

        Description 

                  

        To be called at the end of the plot iterations, or in between if desired. 

        Okay if ignored. 

 

 

        Input Parameters: 

                rmplotter        Indicates whether the plot window should be removed (true) from the display or left (false) false  

                 

        Example: 

                 

 

         # iterate through and stop after 5 iterations of 2 plots per page 

           

         tp.open(tabnames=['3c273.ms','3c48.ms']) 

         plotopts = {'ncols': 2, 'nrows':1 } 

         labels = ['Amplitude vs UVdist (iterating over Antenna1)', 

                   'uvdist','amplitude'] 

         xystr = ['SQRT(SUMSQUARE(UVW[1:2]))','AMPLITUDE(DATA[1,1])'] 

         iteraxes = ['ANTENNA1'] 

         tp.iterplotstart(poption=plotopts,labels=labels, 

                          datastr=xystr,iteraxes=iteraxes) 

         ret = tp.iterplotnext() 

         ret = tp.iterplotnext() 

         ret = tp.iterplotnext() 

         ret = tp.iterplotnext() 

         ret = tp.iterplotnext() 

         tp.iterplotstop() 

 

 

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

                       

        """ 

        return _tableplot.tableplot_iterplotstop(self, rmplotter) 

 

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

        """ 

        markregions(self, nrows = 0, ncols = 0, panel = 1, region = initialize_vector(1, (double)0.0)) -> bool 

 

        Summary 

                 Mark a rectangular region to flag 

            

 

        Description 

                  

 

        Mark or specify a rectangular region to flag.  Call without arguments 

        to enable mouse based interactive region marking.  Marked regions can 

        be discarded via the 'Alt' key.  Command-line region marking can be 

        done by setting panel and region parameters.  After marking flag 

        regions, call tp.flagdata() or tp.unflagdata(). 

 

 

 

 

 

        Input Parameters: 

                nrows            Number of rows of panels 0  

                ncols            Number of columns of panels 0  

                panel            Panel number 1  

                region           [xmin,ymin,xmax,ymax] bounding box 0.0  

                 

        Example: 

                 

 

          tp.markregions(nrows=2,ncols=1,panel=1,region=[300.0,400.0,0.090,0.095]) 

 

 

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

                       

        """ 

        return _tableplot.tableplot_markregions(self, *args, **kwargs) 

 

    def flagdata(self): 

        """ 

        flagdata(self) -> bool 

 

        Summary 

                 

        Flag Data for selected flag regions 

            

 

        Description 

                  

        Set flags for all regions marked using {        t tp.markregions()}.  The 

        plot is automatically redrawn after applying flags. 

 

 

 

        If reduction TaQL functions such as {   t sum,mean} are used, flags 

        corresponding to all accessed values will be modified. For example, with 

        a measurement set table, flagging on the mean amplitude of stokes 1 and 

        channels 1 to 5, given by 'MEAN(AMPLITUDE(DATA[1,1:5]))' results in flags 

        being set for all 5 accessed channels. 

 

        For a measurement set, by default, flags are set only for accessed channels 

        and stokes when the DATA column is used. However all channels/stokes can be 

        flagged for the marked flag regions by setting the corresponding row flag. 

 

 

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

                       

        """ 

        return _tableplot.tableplot_flagdata(self) 

 

    def unflagdata(self): 

        """ 

        unflagdata(self) -> bool 

 

        Summary 

                  

            Unset flags for all regions marked using {tt tp.markregions()}.  

            

 

        Description 

                  

            Unset flags for all regions marked using {  t tp.markregions()}.  

            This is similar to the tp.flagdata() function in all other respects. 

 

 

            

 

        Example: 

                 

 

        # mark 2 flag regions on a multi-panel plot, one in panel 1 and one 

        # in panel 2. Then apply the flags and write to disk. 

          tp.markregions(panel=1) 

          tp.markregions(panel=2) 

          tp.unflagdata() 

 

 

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

                       

        """ 

        return _tableplot.tableplot_unflagdata(self) 

 

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

        """ 

        locatedata(self, columnlist = std::vector< string >(1, "")) -> bool 

 

        Summary 

                 

            Print info about data selected using tp.markregions().  

            

 

        Description 

                  

            Print info about data selected using tp.markregions().  

 

 

        Input Parameters: 

                columnlist       List of strings : Column names (or TaQL expressions !)  

                 

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

                       

        """ 

        return _tableplot.tableplot_locatedata(self, *args, **kwargs) 

 

    def clearflags(self, roottable = False): 

        """ 

        clearflags(self, roottable = False) -> bool 

 

        Summary 

                  Clear all flags in the table. 

             

 

        Description 

                  

            

        Clear all flags from the table. This may eventually be modified 

        to allow for selective un-flagging of previously flagged regions (specified by 

        indexing into a stored history of marked flag-regions).  

 

 

        Input Parameters: 

                roottable        false : clear flags for the current sub-selection; true : clear flags for root table false  

                 

        Example: 

                 

 

        # clear all flags from two measurement set tables 

           

          tp.open(tabnames=['3c273.ms','3c48.ms']) 

          tp.clearflags() 

          tp.done() 

 

 

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

                       

        """ 

        return _tableplot.tableplot_clearflags(self, roottable) 

 

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

        """ 

        saveflagversion(self, versionname = string(""), comment = string(""), merge = string("")) -> bool 

 

        Summary 

                  Save current flags with a version name.  

                                  

 

        Description 

                  

          Save current flags with a version name. This applies to the last opened Tables  

 

 

        Input Parameters: 

                versionname      Version name  

                comment          Comment for this flag table  

                merge            merge type  

                 

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

                       

        """ 

        return _tableplot.tableplot_saveflagversion(self, *args, **kwargs) 

 

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

        """ 

        restoreflagversion(self, versionname = std::vector< string >(1, ""), merge = string("")) -> bool 

 

        Summary 

                Restore flags from a saved flag_version.  

                                    

 

        Description 

                  Restore flags from a saved flag\_version.  

         This applies to the last opened Tables 

 

 

         versionname : name of flag version to restore to main table 

         merge : Type of operation to perform during restoration. 

                merge = replace  : replaces the main table flags. 

                merge = and   : logical AND with main table flags 

                merge = or    : logical OR with main table flags 

                Default : replace. 

 

 

 

        Input Parameters: 

                versionname      Version name  

                merge            merge type  

                 

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

                       

        """ 

        return _tableplot.tableplot_restoreflagversion(self, *args, **kwargs) 

 

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

        """ 

        deleteflagversion(self, versionname = std::vector< string >(1, "")) -> bool 

 

        Summary 

                  Delete a saved flag_version.  

                                    

 

        Description 

                   Delete a saved flag\_version.  

                                 This applies to the last opened Tables 

 

 

        Input Parameters: 

                versionname      Version name  

                 

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

                       

        """ 

        return _tableplot.tableplot_deleteflagversion(self, *args, **kwargs) 

 

    def getflagversionlist(self): 

        """ 

        getflagversionlist(self) -> bool 

 

        Summary 

                  Print out a list of saved flag_versions.  

                                    

 

        Description 

                  

          Print out a list of saved flag\_versions.  

                                 This applies to the last opened Tables 

 

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

                       

        """ 

        return _tableplot.tableplot_getflagversionlist(self) 

 

    def clearplot(self, nrows = 0, ncols = 0, panel = 0): 

        """ 

        clearplot(self, nrows = 0, ncols = 0, panel = 0) -> bool 

 

        Summary 

                  Clear a plot. 

 

 

        Description 

                  

        Clear a plot.  An empty argument list (i.e., clearplot()) or 

        clearplot(0) clears all plots currently visible whereas 

        clearplot(nrows,ncols,panel) clears a plot on a specified panel. 

 

 

        Input Parameters: 

                nrows            Number of rows of panels 0  

                ncols            Number of columns of panels 0  

                panel            Panel number (index) 0  

                 

        Example: 

                 

 

        # clear all flags from two measurement set tables 

           

          tp.open(tabnames=['3c273.ms','3c48.ms']) 

          tp.clearflags() 

          tp.done() 

 

 

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

                       

        """ 

        return _tableplot.tableplot_clearplot(self, nrows, ncols, panel) 

 

    def done(self): 

        """ 

        done(self) -> bool 

 

        Summary 

                  Clean up the tableplot tool 

            

 

        Description 

                   Clean up the tableplot tool, and make it ready for tp.open() again. 

 

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

                       

        """ 

        return _tableplot.tableplot_done(self) 

 

tableplot_swigregister = _tableplot.tableplot_swigregister 

tableplot_swigregister(tableplot) 

 

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