casa
$Rev:20696$
|
Go to the source code of this file.
Classes | |
class | casa::MSPlotReset |
This class is provided to TablePlot to be called when someone resets the TablePlot class. More... | |
class | casa::MSPlotMainMSCallBack |
This class is provided to TablePlot to allow MsPlot to do the proper thing when button's are pressed on the plotting GUI. More... | |
class | MSPlotAntennaCallBack |
This class is provided to TablePlot to allow MsPlot to do the proper thing when button's are pressed on the plotting GUI. More... | |
class | MSPlotUVWCallBack |
This class is provided to TablePlot to allow MsPlot to do the proper thing when button's are pressed on the plotting GUI. More... | |
Namespaces | |
namespace | casa |
this file contains all the compiler specific defines | |
Defines | |
#define | LOG0 |
MsPlot to control some of the plotting issues. | |
#define | LOG2 |
Functions | |
casa::MSPlotMainMSCallBack TPGuiCallBackHooks | casa::if (titleString.contains("Ante")) |
MSPlotMainMSCallBack (MeasurementSet *inMS, Vector< String > antNames, Vector< String > fieldNames, Vector< Vector< String > >corrNames, Vector< Double > refFrequencies, String msname, String extendChn, String extendCor, String extendSp, String extendAnts, String extendTm, Bool crossbl, Double avetime, MeasurementSet *aMS) | |
~MSPlotMainMSCallBack () | |
casa::Bool | releasetable (Int, Int, Int, String) |
casa::Bool | createiterplotlabels (Vector< String > iteraxes, Vector< Double > values, String &titleString) |
*log | casa::FnExit (fnname, clname) |
casa::Bool | flagdata (String) |
casa::Bool | flagdisplay (Int direction, Vector< String >, Matrix< Double > infomat, Vector< String > cpol) |
casa::Bool | flagdata (Int direction, Vector< String >, Matrix< Double > infomat, Vector< String > cpol, Bool) |
casa::Bool | printlocateinfo (Vector< String >, Matrix< Double > infomat, Vector< String > cpol) |
Variables | |
return | selected |
cout << "Baseline selected=" << selected << endl; | |
MeasurementSet * | localMS |
MeasurementSet * | aveMS |
Vector< String > | itsAntNames |
Vector< String > | itsFieldNames |
Matrix<Int> itsBaselines;. | |
Vector< Vector< String > > | itsCorrNames |
Vector< Double > | itsRefFrequencies |
String | flagms |
String | extendChan |
String | extendCorr |
String | extendSpw |
String | extendAnt |
String | extendTime |
Bool | aveBl |
Double | aveTime |
SLog * | log |
Message logger. | |
static const String | clname |
#define LOG0 |
MsPlot to control some of the plotting issues.
Definition at line 56 of file MsPlotHooks.h.
#define LOG2 |
Definition at line 57 of file MsPlotHooks.h.
if::~MSPlotMainMSCallBack | ( | ) |
Definition at line 465 of file MsPlotHooks.h.
casa::Bool if::createiterplotlabels | ( | Vector< String > | iteraxes, |
Vector< Double > | values, | ||
String & | titleString | ||
) |
cout << " values=" << values << endl; for (uInt i = 0; i < itsAntNames.nelements(); i++) cout << itsAntNames[i] << " " ; cout << endl;
cout << "main call back createiterplotlabels" << endl;
cout << "iteraxes[axesId]=" << iteraxes[axesId] << endl;
cout << "titleString=" << titleString << endl;
Definition at line 491 of file MsPlotHooks.h.
References String, and casa::vpf::toString().
casa::Bool flagdata | ( | String | ) |
Definition at line 445 of file MsPlotHooks.h.
References clname, casa::log(), String, and casa::True.
casa::Bool flagdata | ( | Int | direction, |
Vector< String > | , | ||
Matrix< Double > | infomat, | ||
Vector< String > | cpol, | ||
Bool | |||
) |
cout << "MSPlotMainMSCallback::flagdata flag=" << direction << endl;
cout << "infomat.shape=[" << mshape[0] << ", " << mshape[1] << "] cpol.size=" << cpol.size() << endl;
this can be commented out if (ave == True) { return flagdisplay(direction, collist, infomat, cpol); } --------------------------------------------------------------
cout << "flagms=" << flagms << endl;
Int maxrows = ms.nrow();
cout << "maxrows=" << maxrows << endl;
flagid.npts = (uInt)infomat(1, i);
cout << "flag aved" << endl;
cout << "ltime=" << ltime << endl; String ntime = MVTime((infomat(5, i) + 0.1)/C::day).string(MVTime::YMD, 7); cout << "ntime=" << ntime << endl; flagid.time = ltime + String("~") + ntime;
cout << "cpol=" << cpol(i) << endl; cout << "cpol.size()=" << cpol(i).size() << endl; cout << "cpol.length()=" << cpol(i).length() << endl;
cout << "sect=" << j << " " << sect << endl;
cout << "corr=" << corr << " chan=" << chan << endl;
cout << "s=" << s << endl;
show flag base flagid.show();
cout << "flagids.size()=" << flagids.size() << endl; for (uInt i = 0; i < flagids.size(); i++) { flagids(i).show(); }
---------------------------------------------------------------
cout << "sizeof(uint)=" << 8 * sizeof(uint) << endl;
cout << "ms=" << ms << endl;
cout << "start=" << start << " nSel=" << nSel << " iCount=" << idCount << endl;
eflg.detach();
cout << "Flagger return: " << ret << endl;
eflg.setSpw("0:3"); eflg.setCorrelation("lr"); eflg.selectdata(); eflg.setmanualflags(False); eflg.run();
Flagger flagger;
flagger.attach(ms);
Bool useoriginalms=True;
String field=""; String spw=""; String array=""; String feed=""; String scan=""; String baseline=""; String uvrange=""; String time=""; String correlation="";
Bool ret = False; ret = flagger.setdata(field, spw, array, feed, scan, baseline, uvrange, time, correlation);
cout << "------setdata=" << ret << endl;
Bool autocorr = False; String clipexpr = ""; Vector<Double> cliprange(0); String clipcolumn = "DATA"; Bool outside = False; Double quackinterval = 0.0; String opmode = "flag";
Bool unflag = False; spw = "0:3"; correlation = "lr";
cout << "useoriginalms=" << useoriginalms << " field=" << field << " spw=" << spw << " array=" << array << " feed=" << feed << " scan=" << scan << " baseline=" << baseline << " uvrange=" << uvrange << " time=" << time << " correlation=" << correlation << endl;
ret = flagger.selectdata(useoriginalms, field, spw, array, feed, scan, baseline, uvrange, time, correlation); cout << "------selectdata=" << ret << endl;
cout << "autocorr=" << autocorr << " unflag=" << unflag << " clipexpr=" << clipexpr << " cliprange=" << cliprange << " clipcolumn=" << clipcolumn << " outside=" << outside << " quackinterval=" << quackinterval << " opmode=" << opmode << endl;
ret = flagger.setmanualflags(autocorr, unflag, clipexpr, cliprange, clipcolumn, outside, quackinterval, opmode); cout << "------setmanualflags=" << ret << endl;
ret = flagger.selectdata(useoriginalms, field, spw, array, feed, scan, baseline, uvrange, time, correlation); cout << "------selectdata=" << ret << endl;
ret = flagger.setmanualflags(False, unflag, clipexpr, cliprange, clipcolumn, outside, quackinterval, "SUMMARY"); cout << "------summary=" << ret << endl;
flagger.run(False, False); cout << "------run=" << ret << endl;
Definition at line 621 of file MsPlotHooks.h.
References aveBl, aveTime, casa::C::day, extendAnt, extendChan, extendCorr, extendSpw, extendTime, flagms, itsAntNames, itsCorrNames, itsFieldNames, localMS, casa::max(), casa::min(), casa::nelements(), casa::s, String, casa::vpf::toString(), casa::True, casa::Table::Update, and casa::MVTime::YMD.
casa::Bool flagdisplay | ( | Int | direction, |
Vector< String > | , | ||
Matrix< Double > | infomat, | ||
Vector< String > | cpol | ||
) |
cout << "MSPlotMainMSCallback::flagdisplay flag=" << direction << endl;
cout << "infomat.shape=[" << mshape[0] << ", " << mshape[1] << "] cpol.size=" << cpol.size() << endl;
cout << "flag display now...." << endl; cout << "aveMS=" << aveMS << endl; cout << "aveMS=" << *aveMS << endl; cout << "collist=" << collist << endl; cout << "infomat=" << infomat << endl; cout << "cpol=" << cpol << endl; --------------------------------------------------------------
Int maxrows = ms.nrow();
cout << "maxrows=" << maxrows << endl;
flagid.npts = (uInt)infomat(1, i);
cout << "flag aved" << endl;
cout << "ltime=" << ltime << endl;
cout << "ntime=" << ntime << endl;
cout << "cpol=" << cpol(i) << endl; cout << "cpol.size()=" << cpol(i).size() << endl; cout << "cpol.length()=" << cpol(i).length() << endl;
cout << "sect=" << j << " " << sect << endl;
cout << "corr=" << corr << " chan=" << chan << endl;
cout << "corr=" << flagid.corr << endl;
cout << "s=" << s << endl;
cout << "chan=" << flagid.chan << endl; show flag base flagid.show();
cout << "flagids.size()=" << flagids.size() << endl;
cout << "spwNumChan=" << spwNumChan << endl; spwNumChan[0] = 4; spwNumChan[1] = 1;
---------------------------------------------------------------
for (Int i = 0; i < flagids.nelements(); i++) { flagids[i].show(); }
cout << "flag display: " << ret << endl;
Definition at line 455 of file MsPlotHooks.h.
References String.
if::MSPlotMainMSCallBack | ( | MeasurementSet * | inMS, |
Vector< String > | antNames, | ||
Vector< String > | fieldNames, | ||
Vector< Vector< String > > | corrNames, | ||
Vector< Double > | refFrequencies, | ||
String | msname, | ||
String | extendChn, | ||
String | extendCor, | ||
String | extendSp, | ||
String | extendAnts, | ||
String | extendTm, | ||
Bool | crossbl, | ||
Double | avetime, | ||
MeasurementSet * | aMS | ||
) |
itsBaselines = baselines;
cout << "itsBaseLines=" << itsBaselines << endl;
fieldNames | Matrix<Int> baselines, |
Definition at line 413 of file MsPlotHooks.h.
casa::Bool printlocateinfo | ( | Vector< String > | , |
Matrix< Double > | infomat, | ||
Vector< String > | cpol | ||
) |
collist never used!
cout << "cpol=" << cpol << endl;
cout << "infomat.shape=[" << mshape[0] << ", " << mshape[1] << "] cpol.size=" << cpol.size() << endl; for(Int i=0; i < mshape[1]; i++) { if ( mshape[0] != 7 ) { warnings += String( "Skipping the " ) + String::toString( i ) + String( " set of data, its not a complete row. " ); break; }
# Put the Row number and the # of points in the row tmp << std::noshowpoint << std::setw( columnWidths[0] ) << String::toString( infomat( 0, i ) ) << " | " << std::noshowpoint << std::setw( columnWidths[1] ) << infomat( 1, i ) << " | ";
# Printout the Baseline, note that the information # we are provided is the antenna IDs, but we want # to display the antenna names. String baseline; if ( infomat(2,i) < 0 || infomat(2,i) > itsAntNames.nelements() ) baseline += String::toString( infomat(2,i) ) + String( "(ID)" ); else baseline += itsAntNames( (uInt)infomat(2,i) ); baseline += String( "/" ); if ( infomat(3,i) < 0 || infomat(3,i) > itsAntNames.nelements() ) baseline += String::toString( infomat(3,i) ) + String( "(ID)" ); else baseline += itsAntNames( (uInt)infomat(3,i) ); baseline += "| "; tmp << std::setw( columnWidths[2] ) << baseline;
# Print out the Field ID, and Field Name String fieldStr = String::toString(infomat(4,i) ) + String( "/" ); if ( infomat(4,i) < itsFieldNames.nelements() ) fieldStr += itsFieldNames[ Int( infomat(4,i) ) ]; else { warnings += String( "Field ID, " ) + String::toString( Int( infomat(4,i) ) ) + String( ", is larger then the" ) + String( " number of field names, " ) + String::toString( itsFieldNames.nelements() ) + String( ". \n" ); fieldStr += "??"; } tmp << std::noshowpoint << std::setw( columnWidths[3] ) << fieldStr << " | ";
Print out the time in YY/MM/DD/hh:mm:ss.s format tmp << std::setw( columnWidths[4] ) << MVTime( infomat(5, i)/C::day).string( MVTime::DMY,7) << " | ";
# spectral window IDs and Ref Frequency Int spwId = dataDescCol.spectralWindowId()( (Int)infomat(6, i ) ); tmp << std::noshowpoint << std::setw( columnWidths[5] ) << spwId << " | ";
if ( spwId < (Int)itsRefFrequencies.nelements() ) tmp << std::showpoint << std::setprecision( columnWidths[6]-7) << std::setw( columnWidths[6] ) << itsRefFrequencies[ spwId ] << " | "; else { warnings += String( "SPW ID, " ) + String::toString( spwId ) + String( ", is larger then the" ) + String( " number of reference frequencies, " ) + String::toString( itsRefFrequencies.nelements() ) + String( ". \n" ); tmp << " ?? " << " | "; }
# Polarization ID and list of polls and chans selected # in this row. # TODO add some check on spw ID here Int polId = dataDescCol.polarizationId()( (Int)infomat(6, i ) ); String polStr = String::toString( polId ) + String( "/" ); if ( itsCorrNames[polId].nelements() > 0 ) for ( Int corrId=0; corrId < (Int)itsCorrNames[polId].nelements(); corrId++ ) { if ( corrId > 0 ) polStr += String( ", " ); polStr += itsCorrNames[polId][corrId]; } else { warnings += String( "Pol ID, " ) + String::toString( polId ) + String( ", is larger then the" ) + String( " number of polarizations, " ) + String::toString( itsCorrNames[polId].nelements() ) + String( ", \n" ); polStr += "??"; } tmp << std::noshowpoint << std::setw( columnWidths[7] ) << polStr << " | ";
tmp << std::setw( columnWidths[8] ) << cpol(i) << "| " << endl;
info += String( tmp ); tmp.str( "" ); }
Print out the time in YY/MM/DD/hh:mm:ss.s format
if (mshape[1] > 0) info += colNames;
log->out(warnings, fnname, clname, LogMessage::WARN);
Definition at line 900 of file MsPlotHooks.h.
References clname, casa::C::day, casa::MVTime::DMY, itsAntNames, itsCorrNames, itsFieldNames, itsRefFrequencies, localMS, casa::log(), casa::nelements(), casa::LogMessage::NORMAL, String, casa::vpf::toString(), casa::True, and casa::LogMessage::WARN.
casa::Bool if::releasetable | ( | Int | , |
Int | , | ||
Int | , | ||
String | |||
) |
Definition at line 475 of file MsPlotHooks.h.
Bool aveBl |
Definition at line 1214 of file MsPlotHooks.h.
Referenced by flagdata(), and casa::MSPlotMainMSCallBack::MSPlotMainMSCallBack().
MeasurementSet* aveMS |
Definition at line 1202 of file MsPlotHooks.h.
Referenced by casa::MSPlotMainMSCallBack::MSPlotMainMSCallBack().
Double aveTime |
Definition at line 1215 of file MsPlotHooks.h.
Referenced by flagdata(), and casa::MSPlotMainMSCallBack::MSPlotMainMSCallBack().
const String clname [static] |
Definition at line 1219 of file MsPlotHooks.h.
Referenced by casa::MSPlotMainMSCallBack::createiterplotlabels(), MSPlotAntennaCallBack::createiterplotlabels(), MSPlotUVWCallBack::createiterplotlabels(), flagdata(), MSPlotAntennaCallBack::flagdata(), MSPlotUVWCallBack::flagdata(), MSPlotAntennaCallBack::MSPlotAntennaCallBack(), casa::MSPlotMainMSCallBack::MSPlotMainMSCallBack(), MSPlotUVWCallBack::MSPlotUVWCallBack(), printlocateinfo(), MSPlotAntennaCallBack::printlocateinfo(), MSPlotUVWCallBack::printlocateinfo(), casa::MSPlotMainMSCallBack::releasetable(), MSPlotAntennaCallBack::releasetable(), MSPlotUVWCallBack::releasetable(), MSPlotAntennaCallBack::~MSPlotAntennaCallBack(), casa::MSPlotMainMSCallBack::~MSPlotMainMSCallBack(), and MSPlotUVWCallBack::~MSPlotUVWCallBack().
String extendAnt |
Definition at line 1212 of file MsPlotHooks.h.
Referenced by flagdata(), and casa::MSPlotMainMSCallBack::MSPlotMainMSCallBack().
String extendChan |
Definition at line 1209 of file MsPlotHooks.h.
Referenced by flagdata(), and casa::MSPlotMainMSCallBack::MSPlotMainMSCallBack().
String extendCorr |
Definition at line 1210 of file MsPlotHooks.h.
Referenced by flagdata(), and casa::MSPlotMainMSCallBack::MSPlotMainMSCallBack().
String extendSpw |
Definition at line 1211 of file MsPlotHooks.h.
Referenced by flagdata(), and casa::MSPlotMainMSCallBack::MSPlotMainMSCallBack().
String extendTime |
Definition at line 1213 of file MsPlotHooks.h.
Referenced by flagdata(), and casa::MSPlotMainMSCallBack::MSPlotMainMSCallBack().
String flagms |
Definition at line 1208 of file MsPlotHooks.h.
Referenced by flagdata(), and casa::MSPlotMainMSCallBack::MSPlotMainMSCallBack().
Vector<String> itsAntNames |
Definition at line 1203 of file MsPlotHooks.h.
Referenced by casa::MSPlotMainMSCallBack::createiterplotlabels(), MSPlotAntennaCallBack::createiterplotlabels(), MSPlotUVWCallBack::createiterplotlabels(), flagdata(), MSPlotAntennaCallBack::MSPlotAntennaCallBack(), casa::MSPlotMainMSCallBack::MSPlotMainMSCallBack(), MSPlotUVWCallBack::MSPlotUVWCallBack(), printlocateinfo(), MSPlotAntennaCallBack::printlocateinfo(), and MSPlotUVWCallBack::printlocateinfo().
Vector< Vector<String> > itsCorrNames |
Definition at line 1206 of file MsPlotHooks.h.
Referenced by flagdata(), casa::MSPlotMainMSCallBack::MSPlotMainMSCallBack(), MSPlotUVWCallBack::MSPlotUVWCallBack(), printlocateinfo(), and MSPlotUVWCallBack::printlocateinfo().
Vector<String> itsFieldNames |
Matrix<Int> itsBaselines;.
Definition at line 1205 of file MsPlotHooks.h.
Referenced by casa::MSPlotMainMSCallBack::createiterplotlabels(), MSPlotAntennaCallBack::createiterplotlabels(), MSPlotUVWCallBack::createiterplotlabels(), flagdata(), MSPlotAntennaCallBack::MSPlotAntennaCallBack(), casa::MSPlotMainMSCallBack::MSPlotMainMSCallBack(), MSPlotUVWCallBack::MSPlotUVWCallBack(), printlocateinfo(), and MSPlotUVWCallBack::printlocateinfo().
Vector<Double> itsRefFrequencies |
Definition at line 1207 of file MsPlotHooks.h.
Referenced by casa::MSPlotMainMSCallBack::MSPlotMainMSCallBack(), MSPlotUVWCallBack::MSPlotUVWCallBack(), printlocateinfo(), and MSPlotUVWCallBack::printlocateinfo().
MeasurementSet* localMS |
Definition at line 1199 of file MsPlotHooks.h.
Referenced by flagdata(), casa::MSPlotMainMSCallBack::MSPlotMainMSCallBack(), MSPlotUVWCallBack::MSPlotUVWCallBack(), printlocateinfo(), and MSPlotUVWCallBack::printlocateinfo().
SLog* log |
Message logger.
Definition at line 1218 of file MsPlotHooks.h.
return selected |
cout << "Baseline selected=" << selected << endl;
Definition at line 587 of file MsPlotHooks.h.