LCOV - code coverage report
Current view: top level - msvis/MSVis - ViColumns2.cc (source / functions) Hit Total Coverage
Test: ctest_coverage.info Lines: 0 50 0.0 %
Date: 2023-11-02 14:27:30 Functions: 0 3 0.0 %

          Line data    Source code
       1             : #include <msvis/MSVis/ViColumns2.h>
       2             : #include <casacore/ms/MeasurementSets.h>
       3             : 
       4             : using namespace casacore;
       5             : namespace casa {
       6             : 
       7             : namespace vi {
       8             : 
       9           0 : ViColumns2::ViColumns2 ()
      10             : : antenna1_p (),
      11             :   antenna2_p (),
      12             :   array_p (),
      13             :   corrVis_p (),
      14             :   dataDescription_p (),
      15             :   exposure_p (),
      16             :   feed1_p (),
      17             :   feed2_p (),
      18             :   field_p (),
      19             :   flagCategory_p (),
      20             :   flagRow_p (),
      21             :   flag_p (),
      22             :   floatVis_p (),
      23             :   modelVis_p (),
      24             :   observation_p (),
      25             :   processor_p (),
      26             :   scan_p (),
      27             :   sigma_p (),
      28             :   state_p (),
      29             :   timeCentroid_p (),
      30             :   timeInterval_p (),
      31             :   time_p (),
      32             :   uvw_p (),
      33             :   vis_p (),
      34             :   weightSpectrum_p (),
      35             :   sigmaSpectrum_p (),
      36             :   weight_p (),
      37           0 :   floatDataFound_p (false)
      38           0 : {}
      39             : 
      40             : 
      41             : void
      42           0 : ViColumns2::attachColumns (const Table & t, bool attachSpecialColumns)
      43             : {
      44           0 :     const ColumnDescSet & cds = t.tableDesc ().columnDescSet ();
      45             : 
      46           0 :     antenna1_p.attach (t, MS::columnName (MS::ANTENNA1));
      47           0 :     antenna2_p.attach (t, MS::columnName (MS::ANTENNA2));
      48             : 
      49           0 :     corrVis_p = ArrayColumn<Complex>();
      50           0 :     if (cds.isDefined ("CORRECTED_DATA")) {
      51           0 :         corrVis_p.attach (t, "CORRECTED_DATA");
      52             :     }
      53             : 
      54           0 :     exposure_p.attach (t, MS::columnName (MS::EXPOSURE));
      55           0 :     feed1_p.attach (t, MS::columnName (MS::FEED1));
      56           0 :     feed2_p.attach (t, MS::columnName (MS::FEED2));
      57           0 :     flag_p.attach (t, MS::columnName (MS::FLAG));
      58           0 :     flagCategory_p.attach (t, MS::columnName (MS::FLAG_CATEGORY));
      59           0 :     flagRow_p.attach (t, MS::columnName (MS::FLAG_ROW));
      60             : 
      61           0 :     floatVis_p = ArrayColumn<Float>();
      62           0 :     if (cds.isDefined (MS::columnName (MS::FLOAT_DATA))) {
      63           0 :         floatVis_p.attach (t, MS::columnName (MS::FLOAT_DATA));
      64           0 :         floatDataFound_p = true;
      65             :     } else {
      66           0 :         floatDataFound_p = false;
      67             :     }
      68             : 
      69           0 :     modelVis_p = ArrayColumn<Complex>();
      70           0 :     if (cds.isDefined ("MODEL_DATA")) {
      71           0 :         modelVis_p.attach (t, "MODEL_DATA");
      72             :     }
      73             : 
      74           0 :     observation_p.attach (t, MS::columnName (MS::OBSERVATION_ID));
      75           0 :     processor_p.attach (t, MS::columnName (MS::PROCESSOR_ID));
      76           0 :     scan_p.attach (t, MS::columnName (MS::SCAN_NUMBER));
      77           0 :     sigma_p.attach (t, MS::columnName (MS::SIGMA));
      78           0 :     state_p.attach (t, MS::columnName (MS::STATE_ID));
      79           0 :     time_p.attach (t, MS::columnName (MS::TIME));
      80           0 :     timeCentroid_p.attach (t, MS::columnName (MS::TIME_CENTROID));
      81           0 :     timeInterval_p.attach (t, MS::columnName (MS::INTERVAL));
      82           0 :     uvw_p.attach (t, MS::columnName (MS::UVW));
      83             : 
      84           0 :     vis_p = ArrayColumn<Complex>();
      85           0 :     if (cds.isDefined (MS::columnName (MS::DATA))) {
      86           0 :         vis_p.attach (t, MS::columnName (MS::DATA));
      87             :     }
      88             : 
      89           0 :     weight_p.attach (t, MS::columnName (MS::WEIGHT));
      90             : 
      91           0 :     weightSpectrum_p = ArrayColumn<Float>();
      92           0 :     if (cds.isDefined (MS::columnName (MS::WEIGHT_SPECTRUM))) {
      93           0 :         weightSpectrum_p.attach (t, MS::columnName (MS::WEIGHT_SPECTRUM));
      94             :     }
      95             : 
      96           0 :     sigmaSpectrum_p = ArrayColumn<Float>();
      97           0 :     if (cds.isDefined (MS::columnName (MS::SIGMA_SPECTRUM))) {
      98           0 :         sigmaSpectrum_p.attach (t, MS::columnName (MS::SIGMA_SPECTRUM));
      99             :     }
     100             : 
     101           0 :     if (attachSpecialColumns){
     102             : 
     103           0 :         array_p.attach (t, MS::columnName (MS::ARRAY_ID));
     104             : 
     105           0 :         dataDescription_p.attach (t, MS::columnName (MS::DATA_DESC_ID));
     106             : 
     107           0 :         field_p.attach (t, MS::columnName (MS::FIELD_ID));
     108             :     }
     109           0 : }
     110             : 
     111             : Bool
     112           0 : ViColumns2::isFloatDataPresent () const
     113             : {
     114           0 :     return floatDataFound_p;
     115             : }
     116             : 
     117             : } // end namespace vi
     118             : 
     119             : using namespace casacore;
     120             : } // end namespace casa

Generated by: LCOV version 1.16