Ignore:
Timestamp:
07/30/07 11:59:36 (17 years ago)
Author:
Malte Marquarding
Message:

merge from alma branch to get alma/GBT support. Commented out fluxUnit changes as they are using a chnaged interface to PKSreader/writer. Also commented out progress meter related code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STFiller.cpp

    r1188 r1391  
    2626
    2727#include <atnf/PKSIO/PKSreader.h>
     28//#include <casa/System/ProgressMeter.h>
     29
    2830
    2931#include "STDefs.h"
     
    134136  }
    135137  // Determine Telescope and set brightness unit
     138
    136139
    137140  Bool throwIt = False;
     
    184187  reader_->select(beams, ifs, start, end, ref, True, haveXPol_[0], False);
    185188  table_->setHeader(*header_);
     189  //For MS, add the location of POINTING of the input MS so one get
     190  //pointing data from there, if necessary.
     191  //Also find nrow in MS
     192  nInDataRow = 0;
     193  if (format == "MS2") {
     194    Path datapath(inName);
     195    String ptTabPath = datapath.absoluteName();
     196    Table inMS(ptTabPath);
     197    nInDataRow = inMS.nrow();
     198    ptTabPath.append("/POINTING");
     199    table_->table().rwKeywordSet().define("POINTING", ptTabPath);
     200    if ((header_->antennaname).matches("GBT")) {
     201      String GOTabPath = datapath.absoluteName();
     202      GOTabPath.append("/GBT_GO");
     203      table_->table().rwKeywordSet().define("GBT_GO", GOTabPath);
     204    }
     205  }
     206     
    186207}
    187208
     
    209230  Complex         xCalFctr;
    210231  Vector<Complex> xPol;
     232  Double min = 0.0;
     233  Double max = nInDataRow;
     234  //ProgressMeter fillpm(min, max, "Data importing progress");
     235  int n = 0;
    211236  while ( status == 0 ) {
    212237    status = reader_->read(scanNo, cycleNo, mjd, interval, fieldName,
     
    220245                          spectra, flagtra, xCalFctr, xPol);
    221246    if ( status != 0 ) break;
     247    n += 1;
     248   
    222249    Regex filterrx(".*[SL|PA]$");
    223250    Regex obsrx("^AT.+");
     
    250277    RecordFieldPtr<String> srcnCol(rec, "SRCNAME");
    251278    RecordFieldPtr<Int> srctCol(rec, "SRCTYPE");
     279    RecordFieldPtr<String> fieldnCol(rec, "FIELDNAME");
     280    *fieldnCol = fieldName;
    252281    // try to auto-identify if it is on or off.
    253282    Regex rx(".*[e|w|_R]$");
     
    340369      row.put(table_->table().nrow()-1, rec);
    341370    }
     371    //fillpm._update(n);
    342372  }
    343373  if (status > 0) {
     
    345375    throw(AipsError("Reading error occured, data possibly corrupted."));
    346376  }
     377  //fillpm.done();
    347378  return status;
    348379}
Note: See TracChangeset for help on using the changeset viewer.