Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 803
News FAQ
Search Home


next up previous contents
Next: Heuristic editing Up: Data editing Previous: Data editing

Direct (command-based) editing

The flagger tool offers several directed editing (flagging) operations. In general, this involves selecting the data to be flagged (based in indices, timeranges, etc.), then running a flagging operation. The flagging commands all have the option to run them on a trial basis. To flag data from antenna=5, spw=1, field=2, within a timerange:

fg.setantennas(ants=5)                       # Select data including antenna 5
fg.setids(spectralwindowid=1,fieldid=2)      # Select spectral id and field id
fg.settimerange(starttime="24-FEB-2000/10:00:05",  # Select timerange
                  endtime="24-FEB-2000/10:09:37");   
fg.state();                                  # Review data selection   
fg.flag(trial=T);                            # Trial run to see how many rows
                                             #   will be flagged
fg.flag();                                   # Flag it

To reset the data selection, type:

fg.reset();

To flag data from baseline 3-4, spw=2, field=1, within $ \pm$10s of a timestamp:

fg.setbaselines(ants=[3,4])                  # Select data for baseline 3-4
fg.setids(spectralwindowid=2,fieldid=1)      # Select spectral id and field id
fg.settime(centertime="24-FEB-2000/10:00:05",  # Select time and range
           delta="10s");
fg.state();                                  # Review data selection   
fg.flag();                                   # Flag it

The logic in the data selection options is as follows. The two time-related data selection options (set by flagger.settimerange and flagger.settime) are logically OR'd together, and the two antenna-related data selection options (set by flagger.setantennas and flagger.setbaselines are also logically OR'd. The net time selections, net antenna selections, and all other selections are then AND'd together. Note that the data selection persists after the flagging operation flagger.flag is executed. To clear the selection, execute the flagger.reset function, or execute individual selection commands without arguments to clear only that particular selection. For example, to flag all data to antenna 11 for the same spectral window, field, and timestamp as for baseline 3-4 above:

fg.setbaselines();                # Clears baseline selection
fg.setantennas(ants=11);          # Select antenna 11
fg.state();                       # Review data selection
fg.flag();                        # Flag it

To unflag data based on a selection, use the flagger.unflag function. For example, to restore data for baseline 11-15 (that was flagged above):

fg.setantennas();                 # Clears antenna selection
fg.setbaselines(ants=[11,15]);    # Select baseline 11-15
fg.state();                       # Review data selection (note 
                                  #  other selections still in
                                  #  effect)
fg.unflag();                      # undo previous flags

Note that use of flagger.unflag may restore data that had been flagged by other means (e.g., by the on-line system, or by other criteria in previous use of flagger or msplot). In the near future, a flexible means of manipulating flagging versions will be made available in AIPS++.

Consult the flagger tool documentation for more information on the details of data selection.


next up previous contents
Next: Heuristic editing Up: Data editing Previous: Data editing   Contents
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2004-08-28