Commit 5746500b authored by Tobias Winchen's avatar Tobias Winchen
Browse files

Remove superfluous init method

parent fc470a17
......@@ -42,12 +42,6 @@ public:
std::size_t clean_windows = 5);
private:
/**
* @brief Initializes the states of the class members for the given data to be processed.
*
* @param(in) data Data stream that has to be processed.
*/
void init(const thrust::device_vector<thrust::complex<float>> &data);
thrust::device_vector<int> _rfi_status;
std::size_t _window_size;
......
......@@ -39,8 +39,17 @@ SKRfiReplacementCuda::~SKRfiReplacementCuda()
BOOST_LOG_TRIVIAL(info) << "Destroying SKRfiReplacementCuda instance..\n";
}
void SKRfiReplacementCuda::init(const thrust::device_vector<thrust::complex<float>> &data)
void SKRfiReplacementCuda::replace_rfi_data(const thrust::device_vector<int> &rfi_status,
thrust::device_vector<thrust::complex<float>> &data,
std::size_t clean_windows)
{
nvtxRangePushA("replace_rfi_data");
_rfi_status = rfi_status;
thrust::device_vector<thrust::complex<float>> replacement_data;
//initialize data members of the class
_nclean_windows_stat = clean_windows; //no. of clean windows used for computing statistics
BOOST_LOG_TRIVIAL(info) << "initializing the states of SKRfiReplacementCuda"
<< " class members for the data to be processed..\n";
_nwindows = _rfi_status.size();
......@@ -89,18 +98,7 @@ void SKRfiReplacementCuda::init(const thrust::device_vector<thrust::complex<floa
BOOST_LOG_TRIVIAL(debug) << "DataStatistics mean = " << _ref_mean
<< " sd = " << _ref_sd;
}
}
void SKRfiReplacementCuda::replace_rfi_data(const thrust::device_vector<int> &rfi_status,
thrust::device_vector<thrust::complex<float>> &data,
std::size_t clean_windows)
{
nvtxRangePushA("replace_rfi_data");
_rfi_status = rfi_status;
thrust::device_vector<thrust::complex<float>> replacement_data;
//initialize data members of the class
_nclean_windows_stat = clean_windows; //no. of clean windows used for computing statistics
init(data);
//RFI present and not in all windows
if(_nclean_windows < _nwindows){
//Replacing RFI
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment