00001 //# FringeJones.h: Declaration of fringe-fitting VisCal 00002 //# Copyright (C) 1996,1997,2000,2001,2002,2003,2011,2016 00003 //# Associated Universities, Inc. Washington DC, USA. 00004 //# 00005 //# This library is free software; you can redistribute it and/or modify it 00006 //# under the terms of the GNU Library General Public License as published by 00007 //# the Free Software Foundation; either version 2 of the License, or (at your 00008 //# option) any later version. 00009 //# 00010 //# This library is distributed in the hope that it will be useful, but WITHOUT 00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00013 //# License for more details. 00014 //# 00015 //# You should have received a copy of the GNU Library General Public License 00016 //# along with this library; if not, write to the Free Software Foundation, 00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00018 //# 00019 //# Correspondence concerning AIPS++ should be adressed as follows: 00020 //# Internet email: aips2-request@nrao.edu. 00021 //# Postal address: AIPS++ Project Office 00022 //# National Radio Astronomy Observatory 00023 //# 520 Edgemont Road 00024 //# Charlottesville, VA 22903-2475 USA 00025 //# 00026 //# 00027 00028 #ifndef SYNTHESIS_FRINGEJONES_H 00029 #define SYNTHESIS_FRINGEJONES_H 00030 00031 #include <casa/aips.h> 00032 #include <synthesis/MeasurementComponents/SolvableVisCal.h> 00033 00034 namespace casa { //# NAMESPACE CASA - BEGIN 00035 00036 // Fringe-fitting (parametrized phase) VisCal 00037 class FringeJones : public SolvableVisJones { 00038 public: 00039 00040 // Constructor 00041 // TBD: MSMetaInfoForCal-aware version; deprecate older ones 00042 FringeJones(VisSet& vs); 00043 FringeJones(String msname,Int MSnAnt,Int MSnSpw); 00044 FringeJones(const MSMetaInfoForCal& msmc); 00045 FringeJones(const Int& nAnt); 00046 00047 virtual ~FringeJones(); 00048 00049 // We have Float parameters 00050 virtual VisCalEnum::VCParType parType() { return VisCalEnum::REAL; }; 00051 00052 // Return the type enum 00053 virtual Type type() { return VisCal::K; }; 00054 00055 // Return type name as string 00056 virtual String typeName() { return "Fringe Jones"; }; 00057 virtual String longTypeName() { return "Fringe Jones (parametrized phase)"; }; 00058 00059 // Type of Jones matrix according to nPar() 00060 virtual Jones::JonesType jonesType() { return Jones::Diagonal; }; 00061 00062 virtual Bool timeDepMat() { return True; }; 00063 00064 // Freq dependence (delays) 00065 virtual Bool freqDepPar() { return False; }; 00066 virtual Bool freqDepMat() { return True; }; 00067 00068 // Local setApply to enforce calWt=F for delays 00069 virtual void setApply(const Record& apply); 00070 using SolvableVisJones::setApply; 00071 virtual void setCallib(const Record& callib, 00072 const MeasurementSet& selms); 00073 00074 // Local setSolve (traps lack of refant) 00075 virtual void setSolve(const Record& solve); 00076 using SolvableVisJones::setSolve; 00077 00078 // This type is not yet accumulatable 00079 // Deprecate? 00080 virtual Bool accumulatable() { return False; }; 00081 00082 // This type is smoothable 00083 // TBD? 00084 virtual Bool smoothable() { return True; }; 00085 00086 // Delay to phase calculator 00087 virtual void calcAllJones(); 00088 00089 // Hazard a guess at parameters (unneeded here) 00090 // TBD? Needed? 00091 virtual void guessPar(VisBuffer& ) {}; 00092 00093 // K now uses generic gather, but solves for itself per solution 00094 virtual Bool useGenericGatherForSolve() { return True; }; 00095 virtual Bool useGenericSolveOne() { return False; } 00096 00097 // Override G here; nothing to do for K, for now 00098 // TBD: refant apply, etc. 00099 virtual void globalPostSolveTinker() {}; 00100 00101 00102 protected: 00103 00104 // phase, delay, rate 00105 // TBD: Need to cater for parameter opt-out (e.g., no rate solve, etc.) 00106 virtual Int nPar() { return 6; }; 00107 00108 // Jones matrix elements are NOT trivial 00109 virtual Bool trivialJonesElem() { return False; }; 00110 00111 // dJ/dp are trivial 00112 // TBD: make this default in SVC? 00113 virtual Bool trivialDJ() { return False; }; 00114 00115 // Initialize trivial dJs 00116 // TBD: make this default in SVC? 00117 virtual void initTrivDJ() {}; 00118 00119 // Local implementation of selfSolveOne (generalized signature) 00120 // **TBD: migration to SolveDataBuffer** 00121 virtual void selfSolveOne(VisBuffGroupAcc& vbga); 00122 00123 // Reference frequencies 00124 Vector<Double> KrefFreqs_; 00125 00126 private: 00127 00128 00129 }; 00130 00131 } //# NAMESPACE CASA - END 00132 00133 #endif