Changeset 125


Ignore:
Timestamp:
12/10/04 14:54:54 (20 years ago)
Author:
mar637
Message:

Moved to casa namespace.
Adjusted the copyright to be ATNF.

Location:
trunk/src
Files:
26 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/MathUtils.cc

    r81 r125  
    33//#---------------------------------------------------------------------------
    44//# Copyright (C) 2004
    5 //# Malte Marquarding, ATNF
     5//# ATNF
    66//#
    77//# This program is free software; you can redistribute it and/or modify it
     
    3030//#---------------------------------------------------------------------------
    3131
     32#include <casa/aips.h>
    3233#include <casa/Arrays/Vector.h>
    3334#include <casa/Arrays/VectorSTLIterator.h>
    3435
     36#include "MathUtils.h"
     37
     38using namespace casa;
     39//using namespace asap;
     40
    3541template <class T>
    36 void hanning(Vector<T>& out, Vector<Bool>& outmask,
     42void mathutil::hanning(Vector<T>& out, Vector<Bool>& outmask,
    3743             const Vector<T>& in, const Vector<Bool>& mask,
    3844             Bool relaxed, Bool ignoreOther) {
  • trunk/src/MathUtils.h

    r81 r125  
    33//#---------------------------------------------------------------------------
    44//# Copyright (C) 2004
    5 //# Malte Marquarding, ATNF
     5//# ATNF
    66//#
    77//# This program is free software; you can redistribute it and/or modify it
     
    2929//# $Id:
    3030//#---------------------------------------------------------------------------
    31 #ifndef _MATHUTILS_H
    32 #define _MATHUTILS_H
     31#ifndef MATHUTILS_H
     32#define MATHUTILS_H
    3333
    3434#include <casa/aips.h>
    3535#include <casa/Arrays/Vector.h>
    3636
     37namespace mathutil {
     38
    3739template <class T>
    38 void hanning(Vector<T>& out, Vector<Bool>& outmask,
    39              const Vector<T>& in, const Vector<Bool>& mask,
    40              Bool relaxed=False, Bool ignoreOther=False);
     40void hanning(casa::Vector<T>& out, casa::Vector<casa::Bool>& outmask,
     41             const casa::Vector<T>& in, const casa::Vector<casa::Bool>& mask,
     42             casa::Bool relaxed=False, casa::Bool ignoreOther=False);
     43
     44};
    4145
    4246#endif
  • trunk/src/SDContainer.cc

    r104 r125  
    33//#---------------------------------------------------------------------------
    44//# Copyright (C) 2004
    5 //# Malte Marquarding, ATNF
     5//# ATNF
    66//#
    77//# This program is free software; you can redistribute it and/or modify it
     
    2929//# $Id:
    3030//#---------------------------------------------------------------------------
     31#include <casa/aips.h>
    3132#include <casa/Exceptions.h>
    3233#include <tables/Tables/Table.h>
    3334#include <casa/Arrays/IPosition.h>
     35#include <casa/Arrays/Matrix.h>
    3436#include <casa/Arrays/ArrayAccessor.h>
    35 #include <casa/Arrays/Matrix.h>
    3637#include <casa/Quanta/MVTime.h>
    3738
    3839#include "SDContainer.h"
    3940
     41using namespace casa;
    4042using namespace asap;
    4143
     
    195197}
    196198
    197 Array<Float> SDContainer::getSpectrum(uInt whichBeam, uInt whichIF) const {
     199Array<Float> SDContainer::getSpectrum(uInt whichBeam, uInt whichIF) const
     200{
    198201  Matrix<Float> spectra(nChan_, nPol_);
    199202
     
    228231  return spectra.copy();
    229232}
     233
    230234
    231235Array<uChar> SDContainer::getFlags(uInt whichBeam, uInt whichIF) const
  • trunk/src/SDContainer.h

    r104 r125  
    33//#---------------------------------------------------------------------------
    44//# Copyright (C) 2004
    5 //# Malte Marquarding, ATNF
     5//# ATNF
    66//#
    77//# This program is free software; you can redistribute it and/or modify it
     
    2929//# $Id:
    3030//#---------------------------------------------------------------------------
    31 #ifndef _SDCONTAINER_H
    32 #define _SDCONTAINER_H
     31#ifndef SDCONTAINER_H
     32#define SDCONTAINER_H
    3333
    3434#include <vector>
     
    3939#include <casa/Arrays/Vector.h>
    4040
    41 template<class T> class Matrix;
     41template<class T> class casa::Matrix;
    4242
    4343namespace asap {
     
    4545
    4646struct SDHeader {
    47   Int nchan;
    48   Int npol;
    49   Int nif;
    50   Int nbeam;
    51   String observer;
    52   String project;
    53   String obstype;
    54   String antennaname;
    55   Vector<Double> antennaposition;
    56   Float equinox;
    57   String freqref;
    58   Double reffreq;
    59   Double bandwidth;
    60   Double utc;
     47  casa::Int nchan;
     48  casa::Int npol;
     49  casa::Int nif;
     50  casa::Int nbeam;
     51  casa::String observer;
     52  casa::String project;
     53  casa::String obstype;
     54  casa::String antennaname;
     55  casa::Vector<casa::Double> antennaposition;
     56  casa::Float equinox;
     57  casa::String freqref;
     58  casa::Double reffreq;
     59  casa::Double bandwidth;
     60  casa::Double utc;
    6161  void print() const ;
    6262};
     
    6969  virtual ~SDFrequencyTable() {;}
    7070 
    71   Int length() const { return nFreq_;};// # of stored Frequencies
     71  casa::Int length() const { return nFreq_;};// # of stored Frequencies
    7272
    73   Double referencePixel(uInt which) const { return refPix_[which];}
    74   Double referenceValue(uInt which) const { return refVal_[which];}
    75   Double increment(uInt which) const { return increment_[which];}
    76   Float equinox() const { return equinox_; }
    77   String refFrame() const { return refFrame_; }
     73  casa::Double referencePixel(casa::uInt which) const { return refPix_[which];}
     74  casa::Double referenceValue(casa::uInt which) const { return refVal_[which];}
     75  casa::Double increment(casa::uInt which) const { return increment_[which];}
     76  casa::Float equinox() const { return equinox_; }
     77  casa::String refFrame() const { return refFrame_; }
    7878
    7979  // returns the index into the table
    8080  // this creates a new one or returns an existing one
    81   Int addFrequency(Int refPix, Double refVal, Double inc);
    82   void setEquinox(Float eq) { equinox_ = eq; }
    83   void setRefFrame(const String& reff) { refFrame_ = reff; }
     81  casa::Int addFrequency(casa::Int refPix, casa::Double refVal,
     82                         casa::Double inc);
     83  void setEquinox(casa::Float eq) { equinox_ = eq; }
     84  void setRefFrame(const casa::String& reff) { refFrame_ = reff; }
    8485 
    8586private:
    86   Int nFreq_;
    87   Vector<Double> refPix_;
    88   Vector<Double> refVal_;
    89   Vector<Double> increment_;
    90   Float equinox_;
    91   String refFrame_;
     87  casa::Int nFreq_;
     88  casa::Vector<casa::Double> refPix_;
     89  casa::Vector<casa::Double> refVal_;
     90  casa::Vector<casa::Double> increment_;
     91  casa::Float equinox_;
     92  casa::String refFrame_;
    9293};
    9394
     
    9697
    9798public:
    98   SDContainer(uInt nBeam, uInt nIF, uInt nPol, uInt nChan);
    99   SDContainer(IPosition shp);
     99  SDContainer(casa::uInt nBeam, casa::uInt nIF, casa::uInt nPol,
     100              casa::uInt nChan);
     101  SDContainer(casa::IPosition shp);
    100102
    101103  virtual ~SDContainer();
    102104
    103   Bool resize(IPosition shp);
     105  casa::Bool resize(casa::IPosition shp);
    104106
    105   Bool setSpectrum(const Matrix<Float>& spec,
    106                    uInt whichBeam, uInt whichIF);
    107   Bool putSpectrum(const Array<Float>& spec);
     107  casa::Bool setSpectrum(const casa::Matrix<casa::Float>& spec,
     108                   casa::uInt whichBeam, casa::uInt whichIF);
     109  casa::Bool putSpectrum(const casa::Array<casa::Float>& spec);
    108110
    109   Bool setFlags(const Matrix<uChar>& flgs,
    110                 uInt whichBeam, uInt whichIF);
    111   Bool putFlags(const Array<uChar>& spec);
     111  casa::Bool setFlags(const casa::Matrix<casa::uChar>& flgs,
     112                      casa::uInt whichBeam, casa::uInt whichIF);
     113  casa::Bool putFlags(const casa::Array<casa::uChar>& spec);
    112114
    113   Bool setTsys(const Vector<Float>& ts,
    114                uInt whichBeam, uInt whichIF);
    115   Bool putTsys(const Array<Float>& spec);
     115  casa::Bool setTsys(const casa::Vector<casa::Float>& ts,
     116               casa::uInt whichBeam, casa::uInt whichIF);
     117  casa::Bool putTsys(const casa::Array<casa::Float>& spec);
    116118
    117   Bool setDirection(const Vector<Double>& point, uInt whichBeam);
    118   Bool putDirection(const Array<Double>& dir);
     119  casa::Bool setDirection(const casa::Vector<casa::Double>& point,
     120                          casa::uInt whichBeam);
     121  casa::Bool putDirection(const casa::Array<casa::Double>& dir);
    119122
    120   Bool setFrequencyMap(uInt freqslot, uInt whichIF);
    121   Bool putFreqMap(const Vector<uInt>& freqs);
     123  casa::Bool setFrequencyMap(casa::uInt freqslot, casa::uInt whichIF);
     124  casa::Bool putFreqMap(const casa::Vector<casa::uInt>& freqs);
    122125 
    123   Array<Float> getSpectrum(uInt whichBeam, uInt whichIF) const;
    124   Array<uChar> getFlags(uInt whichBeam, uInt whichIF) const;
    125   Array<Float> getTsys(uInt whichBeam, uInt whichIF) const;
    126   Array<Double> getDirection(uInt whichBeam) const;
     126  casa::Array<casa::Float> getSpectrum(casa::uInt whichBeam,
     127                                       casa::uInt whichIF) const;
     128  casa::Array<casa::uChar> getFlags(casa::uInt whichBeam,
     129                                    casa::uInt whichIF) const;
     130  casa::Array<casa::Float> getTsys(casa::uInt whichBeam,
     131                                   casa::uInt whichIF) const;
     132  casa::Array<casa::Double> getDirection(casa::uInt whichBeam) const;
    127133
    128   const Array<Float>& getSpectrum() const { return spectrum_; }
    129   const Array<uChar>& getFlags() const { return flags_; }
    130   const Array<Float>& getTsys() const { return tsys_; }
    131   const Array<Double>& getDirection() const { return direction_; }
     134  const casa::Array<casa::Float>& getSpectrum() const { return spectrum_; }
     135  const casa::Array<casa::uChar>& getFlags() const { return flags_; }
     136  const casa::Array<casa::Float>& getTsys() const { return tsys_; }
     137  const casa::Array<casa::Double>& getDirection() const { return direction_; }
    132138
    133   const Vector<uInt>& getFreqMap() const { return freqidx_; }
     139  const casa::Vector<casa::uInt>& getFreqMap() const { return freqidx_; }
    134140 
    135   Double timestamp;
     141  casa::Double timestamp;
    136142  //Double bandwidth;
    137   String sourcename;
    138   String fieldname;
    139   Double interval;
    140   Int scanid;
    141   Vector<Float> tcal;
    142   String tcaltime;
    143   Float azimuth;
    144   Float elevation;
    145   Float parangle;
    146   Int refbeam;
     143  casa::String sourcename;
     144  casa::String fieldname;
     145  casa::Double interval;
     146  casa::Int scanid;
     147  casa::Vector<casa::Float> tcal;
     148  casa::String tcaltime;
     149  casa::Float azimuth;
     150  casa::Float elevation;
     151  casa::Float parangle;
     152  casa::Int refbeam;
    147153
    148154private:
    149   uInt nBeam_,nIF_,nPol_,nChan_;
     155  casa::uInt nBeam_,nIF_,nPol_,nChan_;
    150156
    151157  // (nBeam,nIF,nPol,nChannel)
    152   Array<Float>    spectrum_; 
    153   Array<uChar>    flags_;
     158  casa::Array<casa::Float>    spectrum_; 
     159  casa::Array<casa::uChar>    flags_;
    154160  // (nBeam,nIF,nPol,[nChannel]) Tsys is not really a function of
    155161  // channel, but this makes it easier to work with at the expense of
    156162  // a little memory
    157   Array<Float>    tsys_;
    158   Array<Float>    tcal_;
     163  casa::Array<casa::Float>    tsys_;
     164  casa::Array<casa::Float>    tcal_;
    159165
    160166  //(nIF) indx into "global" frequency table
    161   Vector<uInt>            freqidx_;
     167  casa::Vector<casa::uInt>    freqidx_;
    162168  //(nBeam,2) maybe use Measures here...
    163   Array<Double>  direction_;
     169  casa::Array<casa::Double>   direction_;
    164170
    165171};
  • trunk/src/SDFitter.cc

    r108 r125  
    33//#--------------------------------------------------------------------------
    44//# Copyright (C) 2004
    5 //# Malte Marquarding, ATNF
     5//# ATNF
    66//#
    77//# This program is free software; you can redistribute it and/or modify it
     
    2929//# $Id:
    3030//#---------------------------------------------------------------------------
     31#include <casa/aips.h>
    3132#include <casa/Arrays/ArrayMath.h>
    3233#include <casa/Arrays/ArrayLogical.h>
     
    4445#include "SDFitter.h"
    4546using namespace asap;
     47using namespace casa;
    4648
    4749SDFitter::SDFitter()
  • trunk/src/SDFitter.h

    r91 r125  
    33//#---------------------------------------------------------------------------
    44//# Copyright (C) 2004
    5 //# Malte Marquarding, ATNF
     5//# ATNF
    66//#
    77//# This program is free software; you can redistribute it and/or modify it
     
    6868private:
    6969    void clear();
    70     Vector<Float> x_;
    71     Vector<Float> y_;
    72     Vector<Bool> m_;
    73     PtrBlock<Function<Float>* > funcs_;
    74     CompoundFunction<Float> cfunc_;
     70    casa::Vector<casa::Float> x_;
     71    casa::Vector<casa::Float> y_;
     72    casa::Vector<casa::Bool> m_;
     73    casa::PtrBlock<casa::Function<casa::Float>* > funcs_;
     74    casa::CompoundFunction<casa::Float> cfunc_;
    7575    //Bool estimateSet_;
    76     Float chisquared_;
    77     Vector<Float> parameters_;
    78     Vector<Bool> fixedpar_;
     76    casa::Float chisquared_;
     77    casa::Vector<casa::Float> parameters_;
     78    casa::Vector<casa::Bool> fixedpar_;
    7979
    80     Vector<Float> error_;
    81     Vector<Float> thefit_;
    82     Vector<Float> residual_;
    83     Vector<Float> estimate_;
     80    casa::Vector<casa::Float> error_;
     81    casa::Vector<casa::Float> thefit_;
     82    casa::Vector<casa::Float> residual_;
     83    casa::Vector<casa::Float> estimate_;
    8484};
    8585
  • trunk/src/SDMath.cc

    r107 r125  
    33//#---------------------------------------------------------------------------
    44//# Copyright (C) 2004
    5 //# Malte Marquarding, ATNF
     5//# ATNF
    66//#
    77//# This program is free software; you can redistribute it and/or modify it
     
    4242#include <casa/Arrays/MaskArrMath.h>
    4343#include <casa/Arrays/MaskArrLogi.h>
     44#include <casa/Arrays/VectorIter.h>
    4445
    4546#include <tables/Tables/Table.h>
     
    6162#include "SDMath.h"
    6263
     64using namespace casa;
    6365using namespace asap;
    6466//using namespace asap::SDMath;
     
    192194
    193195
    194 
    195 bool SDMath::fit(Vector<Float>& thefit, const Vector<Float>& data,
    196                 const Vector<Bool>& mask,
    197                 const std::string& fitexpr) {
    198 
    199   LinearFit<Float> fitter;
    200   Vector<Float> x(data.nelements());
    201   indgen(x);
    202   CompiledFunction<AutoDiff<Float> > fn;
    203   fn.setFunction(String(fitexpr));
    204   fitter.setFunction(fn);
    205   Vector<Float> out,out1;
    206   out = fitter.fit(x,data,&mask);
    207   thefit = data;
    208   fitter.residual(thefit, x);
    209   cout << "Parameter solution = " << out << endl;
    210   return True;
    211 }
    212 
    213 CountedPtr<SDMemTable>
    214 SDMath::baseline(const CountedPtr<SDMemTable>& in,
    215                  const std::string& fitexpr,
    216                  const std::vector<bool>& mask) {
    217 
    218   IPosition ip = in->rowAsMaskedArray(0).shape();
    219   SDContainer sc = in->getSDContainer();
    220   String sname(in->getSourceName());
    221   String stim(in->getTime());
    222   cout << "Fitting: " << String(fitexpr) << " to "
    223        << sname << " [" << stim << "]" << ":" <<endl;
    224   MaskedArray<Float> marr(in->rowAsMaskedArray(0));
    225   Vector<Bool> inmask(mask);
    226   Array<Float> arr = marr.getArray();
    227   Array<Bool> barr = marr.getMask();
    228   for (uInt i=0; i<in->nBeam();++i) {
    229     for (uInt j=0; j<in->nIF();++j) {
    230       for (uInt k=0; k<in->nPol();++k) {
    231         IPosition start(4,i,j,k,0);
    232         IPosition end(4,i,j,k,in->nChan()-1);
    233         Array<Float> subArr(arr(start,end));
    234         Array<Bool> subMask(barr(start,end));
    235         Vector<Float> outv;
    236         Vector<Float> v(subArr.nonDegenerate());
    237         Vector<Bool> m(subMask.nonDegenerate());
    238         cout << "\t Polarisation " << k << "\t";
    239         SDMath::fit(outv, v, m&&inmask, fitexpr);
    240         ArrayAccessor<Float, Axis<0> > aa0(outv);
    241         for (ArrayAccessor<Float, Axis<3> > aa(subArr); aa != aa.end();++aa) {
    242           (*aa) = (*aa0);
    243           aa0++;
    244         }
    245       }
    246     }
    247   }
    248   Array<uChar> outflags(barr.shape());
    249   convertArray(outflags,!barr);
    250   sc.putSpectrum(arr);
    251   sc.putFlags(outflags);
    252   SDMemTable* sdmt = new SDMemTable(*in,True);
    253   sdmt->putSDContainer(sc);
    254   return CountedPtr<SDMemTable>(sdmt);
    255 }
    256 
     196// Start NEBK
     197// SHow how to do above with VectorIterator
     198
     199//   uInt axis = 3;
     200//   VectorIterator<Float> itData(arr, axis);
     201//   ReadOnlyVectorIterator<Bool> itMask(barr, axis);
     202//   Vector<Float> outv;
     203//   while (!itData.pastEnd()) {
     204//     SDMath::fit(outv, itData.vector(), itMask.vector()&&inmask, fitexpr);   // Should have function
     205//     itData.vector() = outv;                                                 // to do in situ
     206// //
     207//     SDMath::fit(itData.vector(), itData.vector(), itMask.vector()&&inmask, fitexpr);   // Or maybe this works
     208// //
     209//     itData.next();
     210//     itMask.next();
     211//   }
     212
     213// End NEBK
    257214
    258215CountedPtr<SDMemTable>
    259216SDMath::hanning(const CountedPtr<SDMemTable>& in) {
    260 
     217 
    261218  //IPosition ip = in->rowAsMaskedArray(0).shape();
    262219  SDMemTable* sdmt = new SDMemTable(*in,True);
    263220  for (uInt ri=0; ri < in->nRow(); ++ri) {
    264 
     221   
    265222    MaskedArray<Float> marr(in->rowAsMaskedArray(ri));
    266223
     
    269226    for (uInt i=0; i<in->nBeam();++i) {
    270227        for (uInt j=0; j<in->nIF();++j) {
    271         for (uInt k=0; k<in->nPol();++k) {
     228          for (uInt k=0; k<in->nPol();++k) {
    272229            IPosition start(4,i,j,k,0);
    273230            IPosition end(4,i,j,k,in->nChan()-1);
     
    278235            Vector<Float> v(subArr.nonDegenerate());
    279236            Vector<Bool> m(subMask.nonDegenerate());
    280             ::hanning(outv,outm,v,m);
     237            mathutil::hanning(outv,outm,v,m);
    281238            ArrayAccessor<Float, Axis<0> > aa0(outv);
    282239            ArrayAccessor<Bool, Axis<0> > ba0(outm);
    283240            ArrayAccessor<Bool, Axis<3> > ba(subMask);
    284             for (ArrayAccessor<Float, Axis<3> > aa(subArr); aa != aa.end();++aa) {
    285             (*aa) = (*aa0);
    286             (*ba) = (*ba0);
    287             aa0++;
    288             ba0++;
    289             ba++;
     241            for (ArrayAccessor<Float, Axis<3> > aa(subArr);
     242                 aa != aa.end();++aa) {
     243              (*aa) = (*aa0);
     244              (*ba) = (*ba0);
     245              aa0++;
     246              ba0++;
     247              ba++;
    290248            }
    291         }
     249          }
    292250        }
    293251    }
     252    //
     253   
     254//     uInt axis = 3;
     255//     VectorIterator<Float> itData(arr, axis);
     256//     VectorIterator<Bool> itMask(barr, axis);
     257//     Vector<Float> outv;
     258//     Vector<Bool> outm;
     259//     while (!itData.pastEnd()) {
     260//       ::hanning(outv, outm, itData.vector(), itMask.vector());
     261//       itData.vector() = outv;                                                 
     262//       itMask.vector() = outm;
     263//       //
     264//       itData.next();
     265//       itMask.next();
     266//    }
     267   
     268    // End NEBK
     269   
     270    //
    294271    Array<uChar> outflags(barr.shape());
    295272    convertArray(outflags,!barr);
     
    403380      Array<Float> tarr(outmarr.getArray());
    404381      Array<Bool> tbarr(outmarr.getMask());
    405       // write averaged pol into all pols - fix up to refrom array
     382      // write averaged pol into all pols - fix up to reform array
    406383      for (uInt k=0; k<in->nPol();++k) {
    407384        IPosition start(4,i,j,k,0);
  • trunk/src/SDMath.h

    r107 r125  
    33//#---------------------------------------------------------------------------
    44//# Copyright (C) 2004
    5 //# Malte Marquarding, ATNF
     5//# ATNF
    66//#
    77//# This program is free software; you can redistribute it and/or modify it
     
    2929//# $Id:
    3030//#---------------------------------------------------------------------------
    31 #ifndef _SDMATH_H
    32 #define _SDMATH_H
     31#ifndef SDMATH_H
     32#define SDMATH_H
    3333
    3434#include <string>
     
    4242namespace SDMath {
    4343  //public:
    44   CountedPtr<SDMemTable> average(const CountedPtr<SDMemTable>& in);
    45   CountedPtr<SDMemTable> quotient(const CountedPtr<SDMemTable>& on,
    46                                          const CountedPtr<SDMemTable>& off);
    47   CountedPtr<SDMemTable> multiply(const CountedPtr<SDMemTable>& in,
    48                                   Float factor);
    49   CountedPtr<SDMemTable> add(const CountedPtr<SDMemTable>& in,
    50                              Float offset);
     44  casa::CountedPtr<SDMemTable> average(const casa::CountedPtr<SDMemTable>& in);
     45  casa::CountedPtr<SDMemTable> quotient(const casa::CountedPtr<SDMemTable>& on,
     46                                         const casa::CountedPtr<SDMemTable>& off);
     47  casa::CountedPtr<SDMemTable> multiply(const casa::CountedPtr<SDMemTable>& in,
     48                                  casa::Float factor);
     49  casa::CountedPtr<SDMemTable> add(const casa::CountedPtr<SDMemTable>& in,
     50                             casa::Float offset);
    5151 
    52   CountedPtr<SDMemTable> baseline(const CountedPtr<SDMemTable>& in,
    53                                          const std::string& fitexpr,
    54                                          const std::vector<bool>& mask);
    55   CountedPtr<SDMemTable> hanning(const CountedPtr<SDMemTable>& in);
     52  casa::CountedPtr<SDMemTable> hanning(const casa::CountedPtr<SDMemTable>& in);
    5653
    57   CountedPtr<SDMemTable>
    58   averages(const Block<CountedPtr<SDMemTable> >& in,
    59            const Vector<Bool>& mask);
     54  casa::CountedPtr<SDMemTable>
     55  averages(const casa::Block<casa::CountedPtr<SDMemTable> >& in,
     56           const casa::Vector<casa::Bool>& mask);
    6057
    61   CountedPtr<SDMemTable>
    62   averagePol(const CountedPtr<SDMemTable>& in, const Vector<Bool>& mask);
     58  casa::CountedPtr<SDMemTable>
     59  averagePol(const casa::CountedPtr<SDMemTable>& in, const casa::Vector<casa::Bool>& mask);
    6360
    64   Float rms(const CountedPtr<SDMemTable>& in,
     61  casa::Float rms(const casa::CountedPtr<SDMemTable>& in,
    6562                   const std::vector<bool>& mask);
    6663 
    67   CountedPtr<SDMemTable> bin(const CountedPtr<SDMemTable>& in,
    68                              Int width);
    69  
    70   bool fit(Vector<Float>& thefit, const Vector<Float>& data,
    71                   const Vector<Bool>& mask, const std::string& fitexpr);
    72  
     64  casa::CountedPtr<SDMemTable> bin(const casa::CountedPtr<SDMemTable>& in,
     65                             casa::Int width);
    7366};
     67
    7468} // namespace
    7569
  • trunk/src/SDMathWrapper.h

    r107 r125  
    33//#---------------------------------------------------------------------------
    44//# Copyright (C) 2004
    5 //# Malte Marquarding, ATNF
     5//# ATNF
    66//#
    77//# This program is free software; you can redistribute it and/or modify it
     
    2929//# $Id:
    3030//#---------------------------------------------------------------------------
    31 #ifndef _SDMATHWRAPPER_H
    32 #define _SDMATHWRAPPER_H
     31#ifndef SDMATHWRAPPER_H
     32#define SDMATHWRAPPER_H
    3333
    3434#include <vector>
     
    5454
    5555  SDMemTableWrapper scale(const SDMemTableWrapper& in,
    56                              Float factor) {
     56                             casa::Float factor) {
    5757    return SDMemTableWrapper(SDMath::multiply(in.getCP(),factor));
    5858  }
    5959
    6060  SDMemTableWrapper add(const SDMemTableWrapper& in,
    61                         Float offset) {
     61                        casa::Float offset) {
    6262    return SDMemTableWrapper(SDMath::add(in.getCP(), offset));
    6363  }
     
    6565  SDMemTableWrapper hanning(const SDMemTableWrapper& in) {
    6666    return SDMemTableWrapper(SDMath::hanning(in.getCP()));
    67   }
    68 
    69   SDMemTableWrapper baseline(const SDMemTableWrapper& in,
    70                              const std::string& fitexpr,
    71                              const std::vector<bool>& mask) {
    72     return SDMath::baseline(in.getCP(), fitexpr, mask);
    7367  }
    7468
  • trunk/src/SDMemTable.cc

    r121 r125  
    33//#---------------------------------------------------------------------------
    44//# Copyright (C) 2004
    5 //# Malte Marquarding, ATNF
     5//# ATNF
    66//#
    77//# This program is free software; you can redistribute it and/or modify it
     
    3030//#---------------------------------------------------------------------------
    3131
    32 
     32#include <casa/aips.h>
    3333#include <casa/iostream.h>
    3434#include <casa/iomanip.h>
     
    5757#include "SDContainer.h"
    5858
     59using namespace casa;
    5960using namespace asap;
    6061
     
    369370    if (rstf.nelements() > 0) {
    370371      if (rstf.nelements() >= nIF())
    371         spc.selectRestFrequency(uInt(IFSel_));
     372        spc.selectRestFrequency(uInt(IFSel_));
    372373      spc.setVelocity(u.getName());
    373374      Vector<Double> wrld;
  • trunk/src/SDMemTable.h

    r105 r125  
    33//#---------------------------------------------------------------------------
    44//# Copyright (C) 2004
    5 //# Malte Marquarding, ATNF
     5//# ATNF
    66//#
    77//# This program is free software; you can redistribute it and/or modify it
     
    2929//# $Id:
    3030//#---------------------------------------------------------------------------
    31 #ifndef _SDMEMTABLE_H
    32 #define _SDMEMTABLE_H
     31#ifndef SDMEMTABLE_H
     32#define SDMEMTABLE_H
    3333
    3434// STL
     
    5959  // Copy Construct a SDMemTable, if clear==True only header and
    6060  // skeleton are copied, otherwise the whole table is copied.
    61   SDMemTable(const SDMemTable& other, Bool clear=False);
     61  SDMemTable(const SDMemTable& other, casa::Bool clear);
    6262
    6363  // Copy Construct a SDMemTable, give a scanid constraint
    6464  // see also getScan()
    65   SDMemTable(const Table& tab, const std::string& expr);
     65  SDMemTable(const casa::Table& tab, const std::string& expr);
    6666
    6767  virtual ~SDMemTable();
     
    7373
    7474  //get the dat wrapped up in a meta container
    75   SDContainer getSDContainer(uInt whichRow=0) const;
     75  SDContainer getSDContainer(casa::uInt whichRow=0) const;
    7676  SDHeader getSDHeader() const;
    7777  SDFrequencyTable getSDFreqTable() const;
    7878  // get spectrum,mask and tsys for the given row, at the selected
    7979  // cursor - all as stl vectors
    80   virtual std::vector<float> getSpectrum(Int whichRow=0) const;
    81   virtual std::vector<bool> getMask(Int whichRow=0) const;
     80  virtual std::vector<float> getSpectrum(casa::Int whichRow=0) const;
     81  virtual std::vector<bool> getMask(casa::Int whichRow=0) const;
    8282
    83   virtual Float getTsys(Int whichRow=0) const;
     83  virtual casa::Float getTsys(casa::Int whichRow=0) const;
    8484  // get all as aips++ Vectors
    85   virtual void getSpectrum(Vector<Float>& spectrum, Int whichRow=0);
     85  virtual void getSpectrum(casa::Vector<casa::Float>& spectrum,
     86                           casa::Int whichRow=0);
    8687
    8788  //virtual void getMask(Vector<Bool>& mask,Int whichRow=0) const;
    8889
    8990  // get info for current row
    90   std::string getTime(Int whichRow=0) const ;
    91   std::string getSourceName(Int whichRow=0) const;
    92   double getInterval(Int whichRow=0) const;
     91  std::string getTime(casa::Int whichRow=0) const ;
     92  std::string getSourceName(casa::Int whichRow=0) const;
     93  double getInterval(casa::Int whichRow=0) const;
    9394
    9495  virtual void setSpectrum(std::vector<float> spectrum, int whichRow=0);
    95   virtual void setRestFreqs(std::vector<double> freqs, const std::string& theunit);
     96  virtual void setRestFreqs(std::vector<double> freqs,
     97                            const std::string& theunit);
    9698  virtual void setCoordInfo(std::vector<string> theinfo);
    9799  // set the current value
    98   virtual bool setIF(Int whichIF=0);
    99   virtual bool setBeam(Int whichBeam=0);
    100   virtual bool setPol(Int whichPol=0);
     100  virtual bool setIF(casa::Int whichIF=0);
     101  virtual bool setBeam(casa::Int whichBeam=0);
     102  virtual bool setPol(casa::Int whichPol=0);
    101103
    102104  //sets the user mask applied to all spectra
     
    106108
    107109  // return the currently selected values
    108   virtual Int getIF() { return IFSel_; }
    109   virtual Int getBeam() { return beamSel_; }
    110   virtual Int getPol() { return polSel_; }
     110  virtual casa::Int getIF() { return IFSel_; }
     111  virtual casa::Int getBeam() { return beamSel_; }
     112  virtual casa::Int getPol() { return polSel_; }
    111113  virtual std::vector<string> getCoordInfo() const;
    112114
    113115  // number of scans in table
    114   virtual Int nScan() const;
     116  virtual casa::Int nScan() const;
    115117
    116118  // print a summary to stdout
     
    121123
    122124  // get a new SDMemTable containing all rows with the same give SCANID
    123   SDMemTable getScan(Int scanID);
     125  SDMemTable getScan(casa::Int scanID);
    124126  SDMemTable getSource(const std::string& source);
    125127
    126   const TableRecord& getHeader() const {return table_.keywordSet();}
     128  const casa::TableRecord& getHeader() const {return table_.keywordSet();}
    127129  // get a handle to the "raw" aips++ table
    128   const Table& table() { return table_; }
     130  const casa::Table& table() { return table_; }
    129131
    130132  // return the number of values
    131   Int nBeam() const;
    132   Int nIF() const;
    133   Int nPol() const;
    134   Int nChan() const;
     133  casa::Int nBeam() const;
     134  casa::Int nIF() const;
     135  casa::Int nPol() const;
     136  casa::Int nChan() const;
    135137
    136138  // return the number of rows (integrations) in the table
    137   Int nRow() const { return table_.nrow(); }
     139  casa::Int nRow() const { return table_.nrow(); }
    138140
    139141  // return a row as a Masked array, internally converting uChar flags
    140142  // to bool mask
    141   MaskedArray<Float> rowAsMaskedArray(uInt whichRow,
    142                                       Bool useSelection = False);
     143  casa::MaskedArray<casa::Float> rowAsMaskedArray(casa::uInt whichRow,
     144                                                  casa::Bool useSelection = casa::False);
    143145
    144   SpectralCoordinate getCoordinate(uInt whichIdx) const;
    145   Bool setCoordinate(const SpectralCoordinate& speccord, uInt whichIdx);
     146  casa::SpectralCoordinate getCoordinate(casa::uInt whichIdx) const;
     147  casa::Bool setCoordinate(const casa::SpectralCoordinate& speccord,
     148                           casa::uInt whichIdx);
    146149
    147   Int nCoordinates() const;
     150  casa::Int nCoordinates() const;
    148151
    149152  std::vector<double> getAbscissa(int whichRow=0);
    150   std::string getAbscissaString(Int whichRow=0);
     153  std::string getAbscissaString(casa::Int whichRow=0);
    151154
    152155private:
    153156  // utility func for nice printout
    154   String formatSec(Double x);
     157  casa::String formatSec(casa::Double x);
    155158  void setup();
    156159  // the current cursor into the array
    157   Int IFSel_,beamSel_,polSel_;
     160  casa::Int IFSel_,beamSel_,polSel_;
    158161  std::vector<bool> chanMask_;
    159162  // the underlying memory table
    160   Table table_;
     163  casa::Table table_;
    161164};
    162165
  • trunk/src/SDMemTableWrapper.h

    r105 r125  
    33//#---------------------------------------------------------------------------
    44//# Copyright (C) 2004
    5 //# Malte Marquarding, ATNF
     5//# ATNF
    66//#
    77//# This program is free software; you can redistribute it and/or modify it
     
    2929//# $Id:
    3030//#---------------------------------------------------------------------------
    31 #ifndef _SDMEMTABLEWRAPPER_H
    32 #define _SDMEMTABLEWRAPPER_H
     31#ifndef SDMEMTABLEWRAPPER_H
     32#define SDMEMTABLEWRAPPER_H
    3333
    3434#include <vector>
     
    4747    table_(new SDMemTable()) {;}
    4848
    49   SDMemTableWrapper(CountedPtr<SDMemTable> cp) : table_(cp) {;}
     49  SDMemTableWrapper(casa::CountedPtr<SDMemTable> cp) : table_(cp) {;}
    5050  //SDMemTableWrapper(SDMemTable* sdmt) : table_(sdmt) {;}
    5151  SDMemTableWrapper(const SDMemTableWrapper& mt) :
     
    5757  SDMemTableWrapper copy() {
    5858    //CountedPtr<SDMemTable> cp = new SDMemTable(*this, False);
    59     return SDMemTableWrapper(new SDMemTable(*(this->getCP()), False));
     59    return SDMemTableWrapper(new SDMemTable(*(this->getCP()), casa::False));
    6060  }
    6161
    6262  SDMemTableWrapper getScan(int scan) {
    63     String cond("SELECT * from $1 WHERE SCANID == ");
    64     cond += String::toString(scan);
     63    casa::String cond("SELECT * from $1 WHERE SCANID == ");
     64    cond += casa::String::toString(scan);
    6565    return SDMemTableWrapper(*this, cond);
    6666  }
    6767
    6868  SDMemTableWrapper getSource(const std::string& source) {
    69     String cond("SELECT * from $1 WHERE SRCNAME == '");
     69    casa::String cond("SELECT * from $1 WHERE SRCNAME == '");
    7070    cond += source;cond += "'";
    7171    return SDMemTableWrapper(*this, cond);
     
    137137  }
    138138
    139   CountedPtr<SDMemTable> getCP() const {return table_;}
     139  casa::CountedPtr<SDMemTable> getCP() const {return table_;}
    140140  std::string summary() { return table_->summary(); }
    141141
    142142private:
    143   CountedPtr<SDMemTable> table_;
     143  casa::CountedPtr<SDMemTable> table_;
    144144};
    145145
  • trunk/src/SDReader.cc

    r110 r125  
    33//#---------------------------------------------------------------------------
    44//# Copyright (C) 2004
    5 //# Malte Marquarding, ATNF
     5//# ATNF
    66//#
    77//# This program is free software; you can redistribute it and/or modify it
     
    2929//# $Id:
    3030//#---------------------------------------------------------------------------
     31#include <casa/Exceptions.h>
    3132#include <atnf/PKSIO/PKSreader.h>
    32 #include <casa/Exceptions.h>
     33
    3334#include "SDReader.h"
    3435
     36using namespace casa;
    3537using namespace asap;
    3638
  • trunk/src/SDReader.h

    r83 r125  
    33//#---------------------------------------------------------------------------
    44//# Copyright (C) 2004
    5 //# Malte Marquarding, ATNF
     5//# ATNF
    66//#
    77//# This program is free software; you can redistribute it and/or modify it
     
    2929//# $Id:
    3030//#---------------------------------------------------------------------------
    31 #ifndef _SDREADER_H
    32 #define _SDREADER_H
     31#ifndef SDREADER_H
     32#define SDREADER_H
    3333
    3434#include <vector>
     
    5252  SDReader();
    5353  SDReader(const std::string& filename);
    54   SDReader(CountedPtr<SDMemTable> tbl);
     54  SDReader(casa::CountedPtr<SDMemTable> tbl);
    5555  virtual ~SDReader();
    5656
     
    5959  int read(const std::vector<int>& seq);
    6060
    61   CountedPtr<SDMemTable> getTable() const { return table_;}
     61  casa::CountedPtr<SDMemTable> getTable() const { return table_;}
    6262
    6363  void reset();
     
    7373
    7474private:
    75   Int nBeam_,nIF_,nPol_,nChan_;
     75  casa::Int nBeam_,nIF_,nPol_,nChan_;
    7676  PKSreader* reader_; 
    7777  SDHeader header_;
    7878  SDFrequencyTable frequencies_;
    79   CountedPtr<SDMemTable> table_;
    80   String filename_;
    81   uInt cursor_;
    82   Double timestamp_;
     79  casa::CountedPtr<SDMemTable> table_;
     80  casa::String filename_;
     81  casa::uInt cursor_;
     82  casa::Double timestamp_;
    8383};
    8484
  • trunk/src/SDReaderWrapper.h

    r83 r125  
    33//#---------------------------------------------------------------------------
    44//# Copyright (C) 2004
    5 //# Malte Marquarding, ATNF
     5//# ATNF
    66//#
    77//# This program is free software; you can redistribute it and/or modify it
     
    2929//# $Id:
    3030//#---------------------------------------------------------------------------
    31 #ifndef _SDREADERWRAPPER_H
    32 #define _SDREADERWRAPPER_H
     31#ifndef SDREADERWRAPPER_H
     32#define SDREADERWRAPPER_H
    3333
    3434#include <vector>
  • trunk/src/SDTemplates.cc

    r93 r125  
    33//#---------------------------------------------------------------------------
    44//# Copyright (C) 2004
    5 //# Malte Marquarding, ATNF
     5//# ATNF
    66//#
    77//# This program is free software; you can redistribute it and/or modify it
     
    2929//# $Id:
    3030//#---------------------------------------------------------------------------
     31#include "SDMemTable.h"
     32
     33#include <casa/aips.h>
     34#include <casa/namespace.h>
    3135#include <casa/Containers/Block.h>
    3236#include <casa/Exceptions/Error.cc>
     
    3539#include <casa/Utilities/CountedPtr2.cc>
    3640#include <casa/Utilities/Copy.cc>
    37 #include "SDMemTable.h"
    3841
    3942namespace asap {
    40   template class CountedConstPtr<SDMemTable>;
    41   template class CountedPtr<SDMemTable>;
    42   template class PtrRep<SDMemTable>;
    43   template class SimpleCountedConstPtr<SDMemTable>;
    44   template class SimpleCountedPtr<SDMemTable>;
    45   template class Block<CountedPtr<SDMemTable> >;
     43  template class casa::CountedConstPtr<SDMemTable>;
     44  template class casa::CountedPtr<SDMemTable>;
     45  template class casa::PtrRep<SDMemTable>;
     46  template class casa::SimpleCountedConstPtr<SDMemTable>;
     47  template class casa::SimpleCountedPtr<SDMemTable>;
     48  template class casa::Block<CountedPtr<SDMemTable> >;
    4649}
    47 template void objcopy(CountedPtr<asap::SDMemTable> *, CountedPtr<asap::SDMemTable> const *, uInt);
    48 template void objmove(CountedPtr<asap::SDMemTable> *, CountedPtr<asap::SDMemTable> const *, uInt);
    49 template void objset(CountedPtr<asap::SDMemTable> *, CountedPtr<asap::SDMemTable>, uInt);
     50
     51template void objcopy<CountedPtr<asap::SDMemTable> >(CountedPtr<asap::SDMemTable> *, CountedPtr<asap::SDMemTable> const *, uInt);
     52template void objmove<CountedPtr<asap::SDMemTable> >(CountedPtr<asap::SDMemTable> *, CountedPtr<asap::SDMemTable> const *, uInt);
     53template void objset<CountedPtr<asap::SDMemTable> >(CountedPtr<asap::SDMemTable> *, CountedPtr<asap::SDMemTable>, uInt);
    5054
    5155#include <casa/Arrays/ArrayLogical.cc>
     
    6165#include <casa/Utilities/PtrHolder.cc>
    6266#include <lattices/Lattices/Lattice.h>
    63 #include "MathUtils.cc"
    6467
    65 template void convertArray(Array<Bool> &, Array<uChar> const &);
    66 template void convertArray(Array<uChar> &, Array<Bool> const &);
    67 template LogicalArray operator!=(Array<Float> const &, Float const &);
    68 template LogicalArray operator==(Array<Float> const &, Float const &);
    69 template LogicalArray operator>(Array<Float> const &, Float const &);
    70 template LogicalArray operator>=(Array<Float> const &, Float const &);
    71 template Array<Float>& operator/=(Array<Float>&, MaskedArray<Float> const&);
    72 template MaskedArray<Float> const& operator*=(MaskedArray<Float> const&, Float const&);
    73 template MaskedArray<Float> operator-(MaskedArray<Float> const&, MaskedArray<Float> const&);
    74 template MaskedArray<Float> const& operator/=(MaskedArray<Float> const&, Float const&);
    75 template Float stddev(MaskedArray<Float> const&);
     68template void convertArray<Bool, uChar>(Array<Bool> &, Array<uChar> const &);
     69template void convertArray<uChar, Bool>(Array<uChar> &, Array<Bool> const &);
     70template LogicalArray operator!=<Float>(Array<Float> const &, Float const &);
     71template LogicalArray operator==<Float>(Array<Float> const &, Float const &);
     72template LogicalArray operator><Float>(Array<Float> const &, Float const &);
     73template LogicalArray operator>=<Float>(Array<Float> const &, Float const &);
     74template Array<Float>& operator/=<Float>(Array<Float>&, MaskedArray<Float> const&);
     75template MaskedArray<Float> const& operator*=<Float>(MaskedArray<Float> const&, Float const&);
     76template MaskedArray<Float> operator-<Float>(MaskedArray<Float> const&, MaskedArray<Float> const&);
     77template MaskedArray<Float> const& operator/=<Float>(MaskedArray<Float> const&, Float const&);
     78template Float stddev<Float>(MaskedArray<Float> const&);
    7679template class CompiledFunction<AutoDiff<Float> >;
    7780template class CompiledParam<AutoDiff<Float> >;
     
    8184template void Array<float>::tovector(vector<float> &) const;
    8285template void Array<Bool>::tovector(vector<bool> &) const;
    83 template void hanning(Vector<Float>&, Vector<Bool>&,
    84                       const Vector<Float>&, const Vector<Bool>&, Bool, Bool);
    8586template void ImageUtilities::bin(MaskedArray<float>&, Coordinate&, MaskedArray<float> const&, Coordinate const&, uInt, uInt);
    8687template class PtrHolder<Lattice<Float> >;
    87 
     88#include "MathUtils.cc"
     89namespace mathutil {
     90  template void hanning(Vector<Float>&, Vector<Bool>&,
     91                        const Vector<Float>&,
     92                        const Vector<Bool>&,
     93                        Bool, Bool);
     94}
  • trunk/src/SDWriter.cc

    r112 r125  
    33//#---------------------------------------------------------------------------
    44//# Copyright (C) 2004
    5 //# Mark Calabretta, ATNF
     5//# ATNF
    66//#
    77//# This program is free software; you can redistribute it and/or modify it
     
    4444#include "SDWriter.h"
    4545
     46using namespace casa;
    4647using namespace asap;
    4748
     
    5051// Default constructor.
    5152
    52 SDWriter::SDWriter(
    53         const std::string &format)
     53SDWriter::SDWriter(const std::string &format)
    5454{
    5555  cFormat = format;
  • trunk/src/SDWriter.h

    r83 r125  
    33//#---------------------------------------------------------------------------
    44//# Copyright (C) 2004
    5 //# Mark Calabretta, ATNF
     5//# ATNF
    66//#
    77//# This program is free software; you can redistribute it and/or modify it
     
    2929//# $Id$
    3030//#---------------------------------------------------------------------------
    31 #ifndef _SDWRITER_H
    32 #define _SDWRITER_H
     31#ifndef SDWRITER_H
     32#define SDWRITER_H
    3333
    3434#include <string>
     
    4949  ~SDWriter();
    5050
    51   Int setFormat(const string &format = "SDFITS");
    52   Int write(const CountedPtr<SDMemTable> table,
     51  casa::Int setFormat(const string &format = "SDFITS");
     52  casa::Int write(const casa::CountedPtr<SDMemTable> table,
    5353            const string &filename);
    5454
  • trunk/src/SDWriterWrapper.h

    r83 r125  
    33//#---------------------------------------------------------------------------
    44//# Copyright (C) 2004
    5 //# Malte Marquarding, ATNF
     5//# ATNF
    66//#
    77//# This program is free software; you can redistribute it and/or modify it
     
    2929//# $Id:
    3030//#---------------------------------------------------------------------------
    31 #ifndef _SDWRITERWRAPPER_H
    32 #define _SDWRITERWRAPPER_H
     31#ifndef SDWRITERWRAPPER_H
     32#define SDWRITERWRAPPER_H
    3333
    3434#include <vector>
    3535#include <string>
    3636
    37 #include "SDMemTableWrapper.h"
    3837#include "SDWriter.h"
    3938
    4039namespace asap {
     40
     41class SDMemTableWrapper;
    4142
    4243class SDWriterWrapper : public SDWriter {
     
    4445  SDWriterWrapper(const string &format = "SDFITS") : SDWriter(format) {;}
    4546
    46   Int write(const SDMemTableWrapper &table, const string &filename) {
     47  casa::Int write(const SDMemTableWrapper &table, const string &filename) {
    4748    return SDWriter::write(table.getCP(), filename);
    4849  }
  • trunk/src/python_SD.cc

    r95 r125  
    33//#---------------------------------------------------------------------------
    44//# Copyright (C) 2004
    5 //# Malte Marquarding, ATNF
     5//# ATNF
    66//#
    77//# This program is free software; you can redistribute it and/or modify it
     
    3131#include <string>
    3232#include <vector>
     33
    3334#include <boost/python.hpp>
    3435#include <boost/python/pyconversions.h>
    3536#include <boost/python/exception_translator.hpp>
    36 #include <casa/Exceptions.h>
     37
     38#include <casa/aips.h>
     39#include <casa/Exceptions/Error.h>
    3740
    3841#include "python_SD.h"
     
    4043namespace asap {
    4144  namespace python {
    42 void translate_ex(AipsError const& e)
     45void translate_ex(const casa::AipsError& e)
    4346{
    4447  // Use the Python 'C' API to set up an exception object
     
    5760  asap::python::python_SDFitter();
    5861
    59   register_exception_translator<AipsError>(&asap::python::translate_ex);
     62  register_exception_translator<casa::AipsError>(&asap::python::translate_ex);
    6063
    6164  std_vector_to_tuple < int > ();
  • trunk/src/python_SD.h

    r92 r125  
    33//#---------------------------------------------------------------------------
    44//# Copyright (C) 2004
    5 //# Malte Marquarding, ATNF
     5//# ATNF
    66//#
    77//# This program is free software; you can redistribute it and/or modify it
     
    2929//# $Id$
    3030//#---------------------------------------------------------------------------
    31 #ifndef _PYTHON_SD_H
    32 #define _PYTHON_SD_H
     31#ifndef PYTHON_SD_H
     32#define PYTHON_SD_H
    3333
    34 class AipsError;
     34class casa::AipsError;
    3535
    3636namespace asap {
    3737  namespace python {
    38     void translate_ex(AipsError const& e);
     38    void translate_ex(const casa::AipsError& e);
    3939    void python_SDMemTable();
    4040    void python_SDReader();
  • trunk/src/python_SDFitter.cc

    r98 r125  
    33//#---------------------------------------------------------------------------
    44//# Copyright (C) 2004
    5 //# Malte Marquarding, ATNF
     5//# ATNF
    66//#
    77//# This program is free software; you can redistribute it and/or modify it
     
    4343        .def("setexpression", &SDFitter::setExpression)
    4444        .def("setdata", &SDFitter::setData)
    45         .def("getresidual", &SDFitter::getResidual)//,
    46              //(boost::python::arg("which")=-1) )
     45        .def("getresidual", &SDFitter::getResidual)
    4746        .def("getfit", &SDFitter::getFit)
    4847        .def("getfixedparameters", &SDFitter::getFixedParameters)
  • trunk/src/python_SDMath.cc

    r107 r125  
    33//#---------------------------------------------------------------------------
    44//# Copyright (C) 2004
    5 //# Malte Marquarding, ATNF
     5//# ATNF
    66//#
    77//# This program is free software; you can redistribute it and/or modify it
     
    3131#include <boost/python.hpp>
    3232
     33#include <casa/aips.h>
     34#include <casa/Containers/Block.h>
     35#include <casa/Utilities/CountedPtr.cc>
     36
    3337#include "SDMathWrapper.h"
    3438
     39using namespace casa;
    3540using namespace boost::python;
    3641
     
    5964      def("scale", &SDMathWrapper::scale);
    6065      def("add", &SDMathWrapper::add);
    61       def("baseline", &SDMathWrapper::baseline);
    6266      def("hanning", &SDMathWrapper::hanning);
    6367      def("averages", &SDMathWrapper::averages);
  • trunk/src/python_SDMemTable.cc

    r122 r125  
    33//#---------------------------------------------------------------------------
    44//# Copyright (C) 2004
    5 //# Malte Marquarding, ATNF
     5//# ATNF
    66//#
    77//# This program is free software; you can redistribute it and/or modify it
     
    3333#include <boost/python.hpp>
    3434#include <boost/python/args.hpp>
     35
    3536#include "SDMemTableWrapper.h"
    3637
  • trunk/src/python_SDReader.cc

    r97 r125  
    33//#---------------------------------------------------------------------------
    44//# Copyright (C) 2004
    5 //# Malte Marquarding, ATNF
     5//# ATNF
    66//#
    77//# This program is free software; you can redistribute it and/or modify it
  • trunk/src/python_SDWriter.cc

    r83 r125  
    33//#---------------------------------------------------------------------------
    44//# Copyright (C) 2004
    5 //# Mark Calabretta, ATNF
     5//# ATNF
    66//#
    77//# This program is free software; you can redistribute it and/or modify it
Note: See TracChangeset for help on using the changeset viewer.