SteepestDescentSolver.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef SYNTHESIS_STEEPESTDESCENT_H
00030 #define SYNTHESIS_STEEPESTDESCENT_H
00031
00032
00033 #include <casa/aips.h>
00034
00035 #include <synthesis/MeasurementEquations/VisEquation.h>
00036 #include <synthesis/MeasurementEquations/Iterate.h>
00037 #include <synthesis/MeasurementComponents/EPJones.h>
00038 #include <msvis/MSVis/VisBuffer.h>
00039 #include <casa/Arrays/Vector.h>
00040 #include <casa/OS/Timer.h>
00041
00042 #include <casa/Logging/LogIO.h>
00043 #include <casa/Logging/LogSink.h>
00044 #include <casa/Logging/LogMessage.h>
00045
00046 namespace casa {
00047
00048 class SteepestDescentSolver: public Iterate
00049 {
00050 public:
00051 SteepestDescentSolver(Int nParams, Vector<Int> polMap,
00052 Int nIter=20, Double tol=1E-5);
00053 ~SteepestDescentSolver(){};
00054
00055 void setMaxParams(Int nParams){maxParams=nParams;};
00056
00057 Double solve(VisEquation& ve, EPJones& vj, VisBuffer& vb,
00058 Int nAnt, Int SlotNo);
00059
00060 Double solve2(VisEquation& ve, VisIter& vi, EPJones& epj, Int nAnt, Int SlotNo);
00061
00062 LogIO& logIO() {return logIO_p;};
00063
00064 private:
00065 Vector<Complex> getVj(const VisBuffer& vb, Int NAnt, Int whichAnt, Int whichPol,
00066 Double& sumWt,Int negate=0, Int weighted=1);
00067 Double getGOF(const VisBuffer& residual,Int& whichPol, Double& sumWt,const char *msg="");
00068
00069 Int maxIter,maxParams;
00070
00071 VisBuffer residual_p,gradient0_p,gradient1_p;
00072 Matrix<Bool> flags;
00073
00074 LogIO logIO_p;
00075 Vector<Int> polMap_p;
00076 };
00077 };
00078
00079 #endif