LCOV - code coverage report
Current view: top level - singledishfiller/Filler - DataRecord.h (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 177 254 69.7 %
Date: 2025-07-23 00:22:00 Functions: 14 21 66.7 %

          Line data    Source code
       1             : /*
       2             :  * DataRecord.h
       3             :  *
       4             :  *  Created on: Jan 27, 2016
       5             :  *      Author: nakazato
       6             :  */
       7             : 
       8             : #ifndef SINGLEDISH_FILLER_DATARECORD_H_
       9             : #define SINGLEDISH_FILLER_DATARECORD_H_
      10             : 
      11             : #include <memory>
      12             : #include <stdlib.h>
      13             : 
      14             : #include <casacore/casa/BasicSL/String.h>
      15             : #include <casacore/casa/Arrays/Matrix.h>
      16             : #include <casacore/casa/Arrays/Vector.h>
      17             : #include <casacore/measures/Measures/Stokes.h>
      18             : #include <singledishfiller/Filler/FillerUtil.h>
      19             : 
      20             : namespace {
      21             : template<class T>
      22           0 : void copyStorage(size_t n, T const *src, T *dst) {
      23           0 :   for (size_t i = n; i < n; ++i) {
      24           0 :     dst[i] = src[i];
      25             :   }
      26           0 : }
      27             : 
      28             : template<class T>
      29           0 : void copyStorage(size_t n, size_t m, size_t stride, T const *src, T *dst) {
      30           0 :   for (size_t i = 0; i < m; ++i) {
      31           0 :     copyStorage(n, src + stride * m, dst + stride * m);
      32             :   }
      33           0 : }
      34             : 
      35             : }
      36             : 
      37             : namespace casa { //# NAMESPACE CASA - BEGIN
      38             : namespace sdfiller { //# NAMESPACE SDFILLER - BEGIN
      39             : 
      40             : using casacore::SHARE;
      41             : 
      42             : struct DataRecord {
      43           4 :   DataRecord() :
      44           4 :       block_size_(16384u), num_data_storage_(block_size_),
      45           4 :       num_tsys_storage_(block_size_), num_tcal_storage_(block_size_),
      46           4 :       data_shape_(1, 0), tsys_shape_(1, 0), tcal_shape_(1, 0),
      47           4 :       data_storage_(new casacore::Float[num_data_storage_]),
      48           4 :       flag_storage_(new casacore::Bool[num_data_storage_]),
      49           4 :       tsys_storage_(new casacore::Float[num_tsys_storage_]),
      50           8 :       tcal_storage_(new casacore::Float[num_tcal_storage_]), direction(2, 2, 0.0),
      51           4 :       direction_slice(casacore::IPosition(2, 2, 1), direction.data(), SHARE),
      52           4 :       direction_vector(direction.column(0)), scan_rate(direction.column(1)),
      53           4 :       data(data_shape_, data_storage_.get(), SHARE),
      54           4 :       flag(data_shape_, flag_storage_.get(), SHARE),
      55           4 :       tsys(tsys_shape_, tsys_storage_.get(), SHARE),
      56           8 :       tcal(tcal_shape_, tcal_storage_.get(), SHARE) {
      57             : //    std::cout << "DataRecord::DataRecord()" << std::endl;
      58           4 :     clear();
      59           4 :   }
      60             : 
      61           4 :   ~DataRecord() {
      62           4 :   }
      63             : 
      64             :   // method
      65           4 :   void clear() {
      66             : //    std::cout << "clear" << std::endl;
      67           4 :     time = -1.0;
      68           4 :     interval = -1.0;
      69           4 :     antenna_id = -1;
      70           4 :     field_id = -1;
      71           4 :     spw_id = -1;
      72           4 :     feed_id = -1;
      73           4 :     scan = -1;
      74           4 :     subscan = -1;
      75           4 :     pol = casacore::Stokes::Undefined;
      76           4 :     intent = "";
      77           4 :     pol_type = "";
      78           4 :     direction = 0.0;
      79           4 :     setDataSize(0);
      80           4 :     setTsysSize(0);
      81           4 :     setTcalSize(0);
      82           4 :     flag_row = true;
      83             : 
      84           4 :     temperature = 0.0f;
      85           4 :     pressure = 0.0f;
      86           4 :     rel_humidity = 0.0f;
      87           4 :     wind_speed = 0.0f;
      88           4 :     wind_direction = 0.0f;
      89           4 :   }
      90             : 
      91         796 :   void setDataSize(size_t n) {
      92         796 :     casacore::Bool redirect = false;
      93         796 :     if (data_shape_[0] != (ssize_t) n) {
      94             : //      std::cout << "resize data to " << n << std::endl;
      95         428 :       data_shape_[0] = n;
      96         428 :       redirect = true;
      97             :     }
      98         796 :     if (num_data_storage_ < n) {
      99           0 :       size_t new_num_storage = num_data_storage_ + block_size_;
     100           0 :       while (new_num_storage < n) {
     101           0 :         new_num_storage += block_size_;
     102             :       }
     103             : //      std::cout << "resize data storage to " << new_num_storage << std::endl;
     104           0 :       casacore::Float *new_data_storage = new casacore::Float[new_num_storage];
     105           0 :       copyStorage(data_shape_[0], data_storage_.get(), new_data_storage);
     106           0 :       data_storage_.reset(new_data_storage);
     107           0 :       casacore::Bool *new_flag_storage = new casacore::Bool[new_num_storage];
     108           0 :       copyStorage(data_shape_[0], flag_storage_.get(), new_flag_storage);
     109           0 :       flag_storage_.reset(new_flag_storage);
     110           0 :       num_data_storage_ = new_num_storage;
     111           0 :       redirect = true;
     112             :     }
     113         796 :     if (redirect) {
     114         428 :       data.takeStorage(data_shape_, data_storage_.get(), SHARE);
     115         428 :       flag.takeStorage(data_shape_, flag_storage_.get(), SHARE);
     116             :     }
     117         796 :   }
     118             : 
     119         796 :   void setTsysSize(size_t n) {
     120         796 :     casacore::Bool redirect = false;
     121         796 :     if (tsys_shape_[0] != (ssize_t) n) {
     122             : //      std::cout << "resize tsys to " << n << std::endl;
     123         164 :       tsys_shape_[0] = n;
     124         164 :       redirect = true;
     125             :     }
     126         796 :     if (num_tsys_storage_ < n) {
     127           0 :       size_t new_num_storage = num_tsys_storage_ + block_size_;
     128           0 :       while (new_num_storage < n) {
     129           0 :         new_num_storage += block_size_;
     130             :       }
     131             : //      std::cout << "resize tsys storage to " << new_num_storage << std::endl;
     132           0 :       casacore::Float *new_tsys_storage = new casacore::Float[new_num_storage];
     133           0 :       copyStorage(tsys_shape_[0], tsys_storage_.get(), new_tsys_storage);
     134           0 :       tsys_storage_.reset(new_tsys_storage);
     135           0 :       num_tsys_storage_ = new_num_storage;
     136           0 :       redirect = true;
     137             :     }
     138         796 :     if (redirect) {
     139         164 :       tsys.takeStorage(tsys_shape_, tsys_storage_.get(), SHARE);
     140             :     }
     141         796 :   }
     142             : 
     143         796 :   void setTcalSize(size_t n) {
     144         796 :     casacore::Bool redirect = false;
     145         796 :     if (tcal_shape_[0] != (ssize_t) n) {
     146             : //      std::cout << "resize tcal to " << n << std::endl;
     147         428 :       tcal_shape_[0] = n;
     148         428 :       redirect = true;
     149             :     }
     150         796 :     if (num_tcal_storage_ < n) {
     151           0 :       size_t new_num_storage = num_tcal_storage_ + block_size_;
     152           0 :       while (new_num_storage < n) {
     153           0 :         new_num_storage += block_size_;
     154             :       }
     155             : //      std::cout << "resize tcal storage to " << new_num_storage << std::endl;
     156           0 :       casacore::Float *new_tcal_storage = new casacore::Float[new_num_storage];
     157           0 :       copyStorage(tcal_shape_[0], tcal_storage_.get(), new_tcal_storage);
     158           0 :       tcal_storage_.reset(new_tcal_storage);
     159           0 :       num_tcal_storage_ = new_num_storage;
     160           0 :       redirect = true;
     161             :     }
     162         796 :     if (redirect) {
     163         428 :       tcal.takeStorage(tcal_shape_, tcal_storage_.get(), SHARE);
     164             :     }
     165         796 :   }
     166             : 
     167             :   DataRecord(DataRecord const &other) :
     168             :       DataRecord() {
     169             :     *this = other;
     170             :   }
     171             :   DataRecord &operator=(DataRecord const &other) {
     172             :     time = other.time;
     173             :     interval = other.interval;
     174             :     antenna_id = other.antenna_id;
     175             :     field_id = other.field_id;
     176             :     spw_id = other.spw_id;
     177             :     feed_id = other.feed_id;
     178             :     scan = other.scan;
     179             :     subscan = other.subscan;
     180             :     pol = other.pol;
     181             :     intent = other.intent;
     182             :     pol_type = other.pol_type;
     183             :     direction = other.direction;
     184             :     direction_slice.takeStorage(direction_slice.shape(), direction.data(),
     185             :         SHARE);
     186             :     direction_vector.reference(direction.column(0));
     187             :     scan_rate.reference(direction.column(1));
     188             :     flag_row = other.flag_row;
     189             :     setDataSize(other.data_shape_[0]);
     190             :     data = other.data;
     191             :     flag = other.flag;
     192             :     setTsysSize(other.tsys_shape_[0]);
     193             :     tsys = other.tsys;
     194             :     setTcalSize(other.tcal_shape_[0]);
     195             :     tcal = other.tcal;
     196             : 
     197             :     temperature = other.temperature;
     198             :     pressure = other.pressure;
     199             :     rel_humidity = other.rel_humidity;
     200             :     wind_speed = other.wind_speed;
     201             :     wind_direction = other.wind_direction;
     202             : 
     203             :     return *this;
     204             :   }
     205             : 
     206             : private:
     207             :   size_t const block_size_;
     208             :   size_t num_data_storage_;
     209             :   size_t num_tsys_storage_;
     210             :   size_t num_tcal_storage_;
     211             :   casacore::IPosition data_shape_;
     212             :   casacore::IPosition tsys_shape_;
     213             :   casacore::IPosition tcal_shape_;
     214             :   std::unique_ptr<casacore::Float[]> data_storage_;
     215             :   std::unique_ptr<casacore::Bool[]> flag_storage_;
     216             :   std::unique_ptr<casacore::Float[]> tsys_storage_;
     217             :   std::unique_ptr<casacore::Float[]> tcal_storage_;
     218             : 
     219             : public:
     220             :   // mandatory
     221             :   casacore::Double time;
     222             :   casacore::Double interval;
     223             :   casacore::Int antenna_id;
     224             :   casacore::Int field_id;
     225             :   casacore::Int spw_id;
     226             :   casacore::Int feed_id;
     227             :   casacore::Int scan;
     228             :   casacore::Int subscan;
     229             :   casacore::Stokes::StokesTypes pol;
     230             :   casacore::String intent;
     231             :   casacore::String pol_type;
     232             :   casacore::Matrix<casacore::Double> direction;
     233             :   casacore::Matrix<casacore::Double> direction_slice;
     234             :   casacore::Vector<casacore::Double> direction_vector;
     235             :   casacore::Vector<casacore::Double> scan_rate;
     236             :   casacore::Vector<casacore::Float> data;
     237             :   casacore::Vector<casacore::Bool> flag;
     238             :   casacore::Bool flag_row;
     239             : 
     240             :   // optional
     241             :   casacore::Vector<casacore::Float> tsys;
     242             :   casacore::Vector<casacore::Float> tcal;
     243             : 
     244             :   casacore::Float temperature;
     245             :   casacore::Float pressure;
     246             :   casacore::Float rel_humidity;
     247             :   casacore::Float wind_speed;
     248             :   casacore::Float wind_direction;
     249             : };
     250             : 
     251             : struct MSDataRecord {
     252           4 :   MSDataRecord() :
     253           4 :       block_size_(131072u),
     254           4 :       num_data_storage_(block_size_),
     255           4 :       num_tsys_storage_(block_size_),
     256           4 :       num_tcal_storage_(block_size_),
     257           4 :       data_shape_(2, 0, 0),
     258           4 :       tsys_shape_(2, 0, 0),
     259           4 :       tcal_shape_(2, 0, 0),
     260           4 :       corr_type_shape_(1, 0),
     261           4 :       corr_type_storage_(4),
     262           4 :       data_storage_(malloc(num_data_storage_ * sizeof(casacore::Complex))),
     263           4 :       flag_storage_(malloc(num_data_storage_ * sizeof(casacore::Bool))),
     264           4 :       tsys_storage_(malloc(num_tsys_storage_ * sizeof(casacore::Float))),
     265           4 :       tcal_storage_(malloc(num_tcal_storage_ * sizeof(casacore::Float))),
     266           4 :       sigma_storage_(new casacore::Float[4]),
     267           4 :       is_float_(false),
     268           4 :       corr_type(corr_type_shape_, corr_type_storage_.storage(), SHARE),
     269           4 :       direction(2, 2, 0.0),
     270           4 :       direction_slice(casacore::IPosition(2, 2, 1), direction.data(), SHARE),
     271           4 :       float_data(data_shape_, reinterpret_cast<casacore::Float *>(data_storage_.get()),
     272             :           SHARE),
     273           4 :       complex_data(data_shape_,
     274           4 :           reinterpret_cast<casacore::Complex *>(data_storage_.get()), SHARE),
     275           4 :       flag(data_shape_, reinterpret_cast<casacore::Bool *>(flag_storage_.get()), SHARE),
     276           4 :       sigma(corr_type_shape_, sigma_storage_.get(), SHARE), weight(sigma),
     277           4 :       tsys(tsys_shape_, reinterpret_cast<casacore::Float *>(tsys_storage_.get()), SHARE),
     278           8 :       tcal(tcal_shape_, reinterpret_cast<casacore::Float *>(tcal_storage_.get()), SHARE) {
     279           4 :     if (!data_storage_ || !flag_storage_ || !tsys_storage_ || !tcal_storage_) {
     280           0 :       throw casacore::AipsError("Failed to allocate memory.");
     281             :     }
     282          20 :     for (size_t i = 0; i < 4; ++i) {
     283          16 :       sigma_storage_[i] = 1.0f;
     284             :     }
     285           4 :     clear();
     286           4 :   }
     287             : 
     288           4 :   ~MSDataRecord() {
     289           4 :   }
     290             : 
     291             :   // method
     292        1764 :   void clear() {
     293        1764 :     time = -1.0;
     294        1764 :     interval = -1.0;
     295        1764 :     antenna_id = -1;
     296        1764 :     field_id = -1;
     297        1764 :     spw_id = -1;
     298        1764 :     feed_id = -1;
     299        1764 :     scan = -1;
     300        1764 :     subscan = -1;
     301        1764 :     intent = "";
     302        1764 :     pol_type = "";
     303        1764 :     num_pol = 0;
     304        1764 :     direction = 0.0;
     305        1764 :     setDataSize(0, 0);
     306        1764 :     setTsysSize(0, 0);
     307        1764 :     setTcalSize(0, 0);
     308        1764 :     flag_row = true;
     309        1764 :     is_float_ = false;
     310             : 
     311        1764 :     temperature = 0.0f;
     312        1764 :     pressure = 0.0f;
     313        1764 :     rel_humidity = 0.0f;
     314        1764 :     wind_speed = 0.0f;
     315        1764 :     wind_direction = 0.0f;
     316        1764 :   }
     317             : 
     318         472 :   casacore::Bool isFloat() const {
     319         472 :     return is_float_;
     320             :   }
     321             : 
     322         472 :   void setFloat() {
     323         472 :     is_float_ = true;
     324         472 :   }
     325             : 
     326           0 :   void setComplex() {
     327           0 :     is_float_ = false;
     328           0 :   }
     329             : 
     330        2236 :   void setDataSize(size_t n, size_t m) {
     331        2236 :     casacore::Bool redirect = false;
     332        2236 :     if (data_shape_[0] != (ssize_t) n) {
     333             : //      std::cout << "resize data to " << n << std::endl;
     334         596 :       data_shape_[0] = n;
     335         596 :       redirect = true;
     336             :     }
     337        2236 :     if (data_shape_[1] != (ssize_t) m) {
     338         756 :       data_shape_[1] = m;
     339         756 :       redirect = true;
     340             :     }
     341        2236 :     if (num_data_storage_ < n * m) {
     342           0 :       size_t new_num_storage = num_data_storage_ + block_size_;
     343           0 :       while (new_num_storage < n * m) {
     344           0 :         new_num_storage += block_size_;
     345             :       }
     346             : //      std::cout << "resize data storage to " << new_num_storage << std::endl;
     347           0 :       void *new_data_storage = malloc(new_num_storage * sizeof(casacore::Complex));
     348           0 :       if (!new_data_storage) {
     349           0 :         throw casacore::AipsError("Failed to allocate memory.");
     350             :       }
     351           0 :       if (is_float_) {
     352           0 :         copyStorage(data_shape_[0], data_shape_[1], 4,
     353           0 :             reinterpret_cast<casacore::Float *>(data_storage_.get()),
     354             :             reinterpret_cast<casacore::Float *>(new_data_storage));
     355             :       } else {
     356           0 :         copyStorage(data_shape_[0], data_shape_[1], 4,
     357           0 :             reinterpret_cast<casacore::Complex *>(data_storage_.get()),
     358             :             reinterpret_cast<casacore::Complex *>(new_data_storage));
     359             :       }
     360           0 :       data_storage_.reset(new_data_storage);
     361           0 :       void *new_flag_storage = malloc(new_num_storage * sizeof(casacore::Bool));
     362           0 :       if (!new_flag_storage) {
     363           0 :         throw casacore::AipsError("Failed to allocate memory.");
     364             :       }
     365           0 :       copyStorage(data_shape_[0], data_shape_[1], 4,
     366           0 :           reinterpret_cast<casacore::Bool *>(flag_storage_.get()),
     367             :           reinterpret_cast<casacore::Bool *>(new_flag_storage));
     368           0 :       flag_storage_.reset(new_flag_storage);
     369           0 :       num_data_storage_ = new_num_storage;
     370           0 :       redirect = true;
     371             :     }
     372        2236 :     if (redirect) {
     373         756 :       corr_type_shape_[0] = data_shape_[0];
     374         756 :       corr_type.takeStorage(corr_type_shape_, corr_type_storage_.storage(),
     375             :           SHARE);
     376         756 :       sigma.takeStorage(corr_type_shape_, sigma_storage_.get(), SHARE);
     377         756 :       float_data.takeStorage(data_shape_,
     378         756 :           reinterpret_cast<casacore::Float *>(data_storage_.get()), SHARE);
     379         756 :       complex_data.takeStorage(data_shape_,
     380         756 :           reinterpret_cast<casacore::Complex *>(data_storage_.get()), SHARE);
     381         756 :       flag.takeStorage(data_shape_,
     382         756 :           reinterpret_cast<casacore::Bool *>(flag_storage_.get()), SHARE);
     383             :     }
     384        2236 :   }
     385             : 
     386        2556 :   void setTsysSize(size_t n, size_t m) {
     387        2556 :     casacore::Bool redirect = false;
     388        2556 :     if (tsys_shape_[0] != (ssize_t) n) {
     389             : //      std::cout << "resize tsys to " << n << std::endl;
     390         924 :       tsys_shape_[0] = n;
     391         924 :       redirect = true;
     392             :     }
     393        2556 :     if (tsys_shape_[1] != (ssize_t) m) {
     394             : //      std::cout << "resize tsys to " << n << std::endl;
     395         904 :       tsys_shape_[1] = m;
     396         904 :       redirect = true;
     397             :     }
     398        2556 :     if (num_tsys_storage_ < n * m) {
     399           0 :       size_t new_num_storage = num_tsys_storage_ + block_size_;
     400           0 :       while (new_num_storage < n * m) {
     401           0 :         new_num_storage += block_size_;
     402             :       }
     403             : //      std::cout << "resize tsys storage to " << new_num_storage << std::endl;
     404           0 :       void *new_tsys_storage = malloc(new_num_storage * sizeof(casacore::Float));
     405           0 :       copyStorage(tsys_shape_[0], tsys_shape_[1], 4,
     406           0 :           reinterpret_cast<casacore::Float *>(tsys_storage_.get()),
     407             :           reinterpret_cast<casacore::Float *>(new_tsys_storage));
     408           0 :       tsys_storage_.reset(new_tsys_storage);
     409           0 :       num_tsys_storage_ = new_num_storage;
     410           0 :       redirect = true;
     411             :     }
     412        2556 :     if (redirect) {
     413         924 :       tsys.takeStorage(tsys_shape_,
     414         924 :           reinterpret_cast<casacore::Float *>(tsys_storage_.get()), SHARE);
     415             :     }
     416        2556 :   }
     417             : 
     418        2556 :   void setTcalSize(size_t n, size_t m) {
     419        2556 :     casacore::Bool redirect = false;
     420        2556 :     if (tcal_shape_[0] != (ssize_t) n) {
     421             : //      std::cout << "resize tcal to " << n << std::endl;
     422         924 :       tcal_shape_[0] = n;
     423         924 :       redirect = true;
     424             :     }
     425        2556 :     if (tcal_shape_[1] != (ssize_t) m) {
     426             : //      std::cout << "resize tcal to " << n << std::endl;
     427         924 :       tcal_shape_[1] = m;
     428         924 :       redirect = true;
     429             :     }
     430        2556 :     if (num_tcal_storage_ < n * m) {
     431           0 :       size_t new_num_storage = num_tcal_storage_ + block_size_;
     432           0 :       while (new_num_storage < n * m) {
     433           0 :         new_num_storage += block_size_;
     434             :       }
     435             : //      std::cout << "resize tcal storage to " << new_num_storage << std::endl;
     436           0 :       void *new_tcal_storage = malloc(new_num_storage * sizeof(casacore::Float));
     437           0 :       copyStorage(tcal_shape_[0], tcal_shape_[1], 4,
     438           0 :           reinterpret_cast<casacore::Float *>(tcal_storage_.get()),
     439             :           reinterpret_cast<casacore::Float *>(new_tcal_storage));
     440           0 :       tcal_storage_.reset(new_tcal_storage);
     441           0 :       num_tcal_storage_ = new_num_storage;
     442           0 :       redirect = true;
     443             :     }
     444        2556 :     if (redirect) {
     445         924 :       tcal.takeStorage(tcal_shape_,
     446         924 :           reinterpret_cast<casacore::Float *>(tcal_storage_.get()), SHARE);
     447             :     }
     448        2556 :   }
     449             : 
     450             :   MSDataRecord(MSDataRecord const &other) :
     451             :       MSDataRecord() {
     452             :     *this = other;
     453             :   }
     454             :   MSDataRecord &operator=(MSDataRecord const &other) {
     455             :     time = other.time;
     456             :     interval = other.interval;
     457             :     antenna_id = other.antenna_id;
     458             :     field_id = other.field_id;
     459             :     spw_id = other.spw_id;
     460             :     feed_id = other.feed_id;
     461             :     scan = other.scan;
     462             :     subscan = other.subscan;
     463             :     intent = other.intent;
     464             :     pol_type = other.pol_type;
     465             :     num_pol = other.num_pol;
     466             :     direction = other.direction;
     467             :     direction_slice.takeStorage(direction_slice.shape(), direction.data(),
     468             :         SHARE);
     469             :     flag_row = other.flag_row;
     470             :     setDataSize(other.data_shape_[0], other.data_shape_[1]);
     471             :     corr_type = other.corr_type;
     472             :     if (other.is_float_) {
     473             :       float_data = other.float_data;
     474             :     } else {
     475             :       complex_data = other.complex_data;
     476             :     }
     477             :     flag = other.flag;
     478             :     setTsysSize(other.tsys_shape_[0], other.tsys_shape_[1]);
     479             :     tsys = other.tsys;
     480             :     setTcalSize(other.tcal_shape_[0], other.tcal_shape_[1]);
     481             :     tcal = other.tcal;
     482             : 
     483             :     temperature = other.temperature;
     484             :     pressure = other.pressure;
     485             :     rel_humidity = other.rel_humidity;
     486             :     wind_speed = other.wind_speed;
     487             :     wind_direction = other.wind_direction;
     488             : 
     489             :     return *this;
     490             :   }
     491             : 
     492             : private:
     493             :   size_t const block_size_;
     494             :   size_t num_data_storage_;
     495             :   size_t num_tsys_storage_;
     496             :   size_t num_tcal_storage_;
     497             :   casacore::IPosition data_shape_;
     498             :   casacore::IPosition tsys_shape_;
     499             :   casacore::IPosition tcal_shape_;
     500             :   casacore::IPosition corr_type_shape_;
     501             :   casacore::Block<casacore::Int> corr_type_storage_;
     502             :   std::unique_ptr<void, sdfiller::Deleter> data_storage_;
     503             :   std::unique_ptr<void, sdfiller::Deleter> flag_storage_;
     504             :   std::unique_ptr<void, sdfiller::Deleter> tsys_storage_;
     505             :   std::unique_ptr<void, sdfiller::Deleter> tcal_storage_;
     506             :   std::unique_ptr<casacore::Float[]> sigma_storage_;
     507             :   casacore::Bool is_float_;
     508             : 
     509             : public:
     510             : // mandatory
     511             :   casacore::Double time;
     512             :   casacore::Double interval;
     513             :   casacore::Int antenna_id;
     514             :   casacore::Int field_id;
     515             :   casacore::Int spw_id;
     516             :   casacore::Int feed_id;
     517             :   casacore::Int scan;
     518             :   casacore::Int subscan;
     519             :   casacore::Int num_pol;
     520             :   casacore::String intent;
     521             :   casacore::String pol_type;
     522             :   casacore::Vector<casacore::Int> corr_type;
     523             :   casacore::Matrix<casacore::Double> direction;
     524             :   casacore::Matrix<casacore::Double> direction_slice;
     525             :   casacore::Matrix<casacore::Float> float_data;
     526             :   casacore::Matrix<casacore::Complex> complex_data;
     527             :   casacore::Matrix<casacore::Bool> flag;
     528             :   casacore::Bool flag_row;
     529             :   casacore::Vector<casacore::Float> sigma;
     530             :   casacore::Vector<casacore::Float> &weight;
     531             : 
     532             :   // optional
     533             :   casacore::Matrix<casacore::Float> tsys;
     534             :   casacore::Matrix<casacore::Float> tcal;
     535             : 
     536             :   casacore::Float temperature;
     537             :   casacore::Float pressure;
     538             :   casacore::Float rel_humidity;
     539             :   casacore::Float wind_speed;
     540             :   casacore::Float wind_direction;
     541             : 
     542             : };
     543             : 
     544             : } //# NAMESPACE SDFILLER - END
     545             : } //# NAMESPACE CASA - END
     546             : 
     547             : #endif /* SINGLEDISH_FILLER_DATARECORD_H_ */

Generated by: LCOV version 1.16