Ejemplo n.º 1
0
 void set_killmask(std::string filename)
 {
   std::ifstream infile;
   std::string str;
   killmask.clear();
   infile.open(filename.c_str(),std::ifstream::in | std::ifstream::binary);
   ErrorChecker::check_file_error(infile,filename);
   
   int ii=0;
   while(!infile.eof()&&ii<filterbank.get_nchans()){
     std::getline(infile, str);
     killmask.push_back(std::atoi(str.c_str()));
     ii++;
   }
   
   if (killmask.size() != filterbank.get_nchans()){
     std::cerr << "WARNING: killmask is not the same size as nchans" << std::endl;
     std::cerr << killmask.size() <<" != " <<  filterbank.get_nchans() <<  std::endl;
     killmask.resize(filterbank.get_nchans(),1);
   } else {
     dedisp_error error = dedisp_set_killmask(plan,&killmask[0]);
     ErrorChecker::check_dedisp_error(error,"set_killmask");
   }
   
 }
Ejemplo n.º 2
0
 void set_killmask(std::vector<int> killmask_in)
 {
   killmask.swap(killmask_in);
   dedisp_error error = dedisp_set_killmask(plan,&killmask[0]);
   ErrorChecker::check_dedisp_error(error,"set_killmask");
 }
Ejemplo n.º 3
0
void DedispPlan::set_killmask(const bool_type* killmask) {
	check_error( dedisp_set_killmask(m_plan, killmask), "dedisp_set_killmask" );
}