12 int main(
int argc,
char *argv[])
22 <<
"This is mtumedian: Apply a median filter to Phoenix time series"
24 cout <<
" Usage: mtumedian infilename " << endl;
25 cout <<
" Ending '.med' will be automatically assigned to outfilename"
27 cout <<
" This is Version: " <<
version << endl << endl;
28 cout <<
" Mtu-Filename: ";
32 cout <<
"Segment length for Median: ";
39 for (
size_t i = seglength / 2; i < datalength - seglength / 2; ++i)
41 const size_t startindex = i - seglength / 2;
42 const size_t endindex = i + seglength / 2;
std::iterator_traits< InputIterator >::value_type Median(InputIterator begin, InputIterator end)
Calculate the median for a vector style container.
std::vector< double > & GetData()
Access for data vector, for ease of use and efficiency we return a reference.
TimeSeries & GetData()
return a reference to the actual object stored in the pointer
TimeSeriesComponent & GetEx()
TimeSeriesComponent & GetHy()
void WriteAsMtu(std::string filename_base)
Write data to file in Phoenix MTU format.
TimeSeriesData stores a pointer to the different components of magnetotelluric data and provides func...
TimeSeriesComponent & GetEy()
TimeSeriesComponent & GetHx()
Access function for Hx, returns reference for efficiency.