Changeset 1259 for trunk/src


Ignore:
Timestamp:
09/11/06 15:10:05 (18 years ago)
Author:
mar637
Message:

Merge from Release2.1.0b tag

Location:
trunk/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/LineCatalog.cpp

    r1126 r1259  
    9696      oss << std::left << setw(20) << getName(i);
    9797      oss << setw(12) << setprecision(8) << std::left << getFrequency(i);
     98      oss << setw(12) << setprecision(8) << std::left << getStrength(i);
    9899      oss << endl;
    99100    }
     
    103104        oss << std::left << setw(20) << getName(row);
    104105        oss << setw(12) << setprecision(8) << std::left << getFrequency(row);
     106        oss << setw(12) << setprecision(8) << std::left << getStrength(row);
    105107        oss << endl;
    106108      } else {
     
    127129}
    128130
     131double asap::LineCatalog::getStrength(uint row) const
     132{
     133  ROScalarColumn<Double> col(table_, "Column3");
     134  return col(row);
     135}
     136
    129137
    130138} // namespace
  • trunk/src/LineCatalog.h

    r1126 r1259  
    8585
    8686  /**
     87   * Return the line strength value for a specific row
     88   * @param row the row number
     89   * @return a double rest line strength value
     90   */
     91  double getStrength(uint row) const;
     92
     93  /**
    8794   *
    8895   * @param row
  • trunk/src/Makefile

    r1198 r1259  
    2525
    2626# cfitsio
    27 CFITSIOROOT := /usr
    28 # If aips++ is build with LFS (default) you need to have
    29 # libcfitsio with lfs support
    30 # this is default in cfitsio >= 3.0
     27CFITSIOROOT := /usr/local
    3128CFITSIOINC := -I$(CFITSIOROOT)/include
    32 CFITSIOLIB := -L$(CFITSIOROOT) -lcfitsio
     29CFITSIOLIB := -L$(CFITSIOROOT)/lib -lcfitsio
    3330
    3431#rpfits
     
    3633RPFITSLIB := $(RPFITSROOT)/lib/librpfits.a
    3734
    38 G2CROOT := /usr
    39 G2CLIB := $(G2CROOT)/lib -lg2c
     35G2CROOT := /usr/local
     36G2CARCH := $(G2CROOT)/lib/gcc/i386-apple-darwin8.7.1/4.2.0/libgcc.a
     37G2CARCH := $(G2CROOT)/lib/gcc/powerpc-apple-darwin8.7.0/4.2.0/libgcc.a
     38G2CLIB := $(G2CROOT)/lib/libgfortran.a $(G2CARCH)
    4039
    4140# This assumes all casa libs are static only (*.a)
     
    7978
    8079# has to be build with same g++ version as casa
    81 BOOSTROOT := /usr
     80BOOSTROOT := /usr/local
    8281BOOSTLIB  := -L$(BOOSTROOT)/lib -lboost_python
    8382BOOSTINC  := -I$(BOOSTROOT)/include/boost
     
    9291             RowAccumulator.o \
    9392             Logger.o \
     93             LineCatalog.o \
    9494             STAttr.o \
    9595             STHeader.o \
     
    124124             python_STFitEntry.o \
    125125             python_STWriter.o \
     126             python_LineCatalog.o \
    126127             python_asap.o
    127128
  • trunk/src/STMath.cpp

    r1232 r1259  
    350350  TableRow row(tout);
    351351  ROScalarColumn<Double> offtimeCol(offs, "TIME");
    352 
    353352  ArrayColumn<Float> outspecCol(tout, "SPECTRA");
    354353  ROArrayColumn<Float> outtsysCol(tout, "TSYS");
     
    359358    ROScalarColumn<Double> offtimeCol(offs, "TIME");
    360359    Double mindeltat = min(abs(offtimeCol.getColumn() - ontime));
    361     Table sel = offs( abs(offs.col("TIME")-ontime) <= mindeltat
     360    // Timestamp may vary within a cycle ???!!!
     361    // increase this by 0.5 sec in case of rounding errors...
     362    // There might be a better way to do this.
     363    mindeltat += 0.5;
     364    Table sel = offs( abs(offs.col("TIME")-ontime) <= (mindeltat+0.5)
    362365                       && offs.col("BEAMNO") == Int(rec.asuInt("BEAMNO"))
    363366                       && offs.col("IFNO") == Int(rec.asuInt("IFNO"))
    364367                       && offs.col("POLNO") == Int(rec.asuInt("POLNO")) );
    365368
     369    if ( sel.nrow() < 1 )  {
     370      throw(AipsError("No closest in time found... This could be a rounding "
     371                      "issue. Try quotient instead."));
     372    }
    366373    TableRow offrow(sel);
    367374    const TableRecord& offrec = offrow.get(0);//should only be one row
  • trunk/src/STPolCircular.cpp

    r1189 r1259  
    3535    if ( index == 0 )
    3636      out = Vector<Float>(getSpectrum(0) + getSpectrum(1));
     37    else if ( index == 3 )
     38      out = Vector<Float>(getSpectrum(0) - getSpectrum(1));
    3739  }
    3840  return out;
  • trunk/src/STWriter.cpp

    r1072 r1259  
    298298{
    299299  String poltype = tab.keywordSet().asString("POLTYPE");
    300   if ( poltype != "linear") {
     300  if ( poltype == "stokes") {
    301301    String msg = "poltype = " + poltype + " not yet supported in output.";
    302302    throw(AipsError(msg));
  • trunk/src/python_Scantable.cpp

    r1189 r1259  
    7777         (arg("whichrow")=0, arg("poltype")=std::string("")) )
    7878    .def("poltype", &ScantableWrapper::getPolType )
    79     .def("column_names", &ScantableWrapper::columnNames)
     79    .def("get_column_names", &ScantableWrapper::columnNames)
    8080    .def("_getpollabel", &ScantableWrapper::getPolarizationLabel)
    8181    .def("_setspectrum",&ScantableWrapper::setSpectrum,
Note: See TracChangeset for help on using the changeset viewer.