data_visibility Class Reference

Defines a class containing a collection of visibility datum objects with simple I/O. More...

#include "data/data_visibility.h"

Public Member Functions

 data_visibility ()
 Defines a default, empty data_visibility object.
 
 data_visibility (std::string file_name, const std::string time_type="HHMM", bool read_frequency=false)
 
 data_visibility (std::vector< std::string > file_name, const std::vector< std::string > time_type=std::vector< std::string >())
 
void add_data (std::string file_name, const std::string time_type="HHMM", bool read_frequency=false)
 Adds data from the file <file_name>.
 
void add_data (datum_visibility &d)
 Adds data from a datum object.
 
size_t size () const
 Returns the number of data points.
 
datum_visibilitydatum (size_t i) const
 Provides access to the atomic datum element.
 

Private Attributes

std::vector< datum_visibility * > _visibilities
 

Detailed Description

Collections of visibility data are defined in data_visibility, which includes simple I/O tools and provides access to a list of appropriately constructed datum_visibility objects.

Warning
Currently assumes a fixed data file format.
Todo:
Once data file formats crystalize, implement more generic or multi-format I/O options.

Constructor & Destructor Documentation

data_visibility ( std::string  file_name,
const std::string  time_type = "HHMM",
bool  read_frequency = false 
)

Defines a default, data_visibility filled by data in file <file_name>. time_type specifies the format of the time field in the importated data. Currently two formats are implemented:

  • HHMM e.g. 1230
  • HH e.g. 12.5

Here is the call graph for this function:

data_visibility ( std::vector< std::string >  file_name,
const std::vector< std::string >  time_type = std::vector<std::string> () 
)

Defines a default, data_visibility filled by data in the collection of files in the vector <file_name>. time_type specifies the format of the time field in the importated data. Currently two formats are implemented:

  • HHMM e.g. 1230
  • HH e.g. 12.5 If no time_type is specified it assumes all the data files are using "HHMM".

Here is the call graph for this function:


The documentation for this class was generated from the following files: