def make_h5_file(filename,out_dir='./', new_filename = None, max_load = None): ''' Converts file to HDF5 (.h5) format. Default saves output in current dir. ''' fil_file = Waterfall(filename, max_load = max_load) if not new_filename: new_filename = out_dir+filename.replace('.fil','.h5').split('/')[-1] if '.h5' not in new_filename: new_filename = new_filename+'.h5' fil_file.write_to_hdf5(new_filename)
def make_fil_file(filename, out_dir='./', new_filename=None, max_load=None): """ Converts file to Sigproc filterbank (.fil) format. Default saves output in current dir. """ fil_file = Waterfall(filename, max_load=max_load) if not new_filename: new_filename = out_dir + filename.replace('.h5', '.fil').split('/')[-1] if '.fil' not in new_filename: new_filename = new_filename + '.fil' fil_file.write_to_fil(new_filename)
def make_h5_file(filename, out_dir='./', new_filename=None, max_load=None): ''' Converts file to HDF5 (.h5) format. Default saves output in current dir. ''' fil_file = Waterfall(filename, max_load=max_load) if not new_filename: new_filename = out_dir + filename.replace('.fil', '.h5').split('/')[-1] if '.h5' not in new_filename: new_filename = new_filename + '.h5' fil_file.write_to_hdf5(new_filename)
def _initialize(self, n_stages, n_seed, n_traj, batch_size, max_queue): w = Waterfall(n_stages, n_traj, batch_size, max_queue) store = vault.create_db(w) w.store = store logging.basicConfig(level=logging.INFO, filename="Data/Logs/server.log") logger = logging.getLogger(__name__) logger.info("Initializing waterfall.") for state in self.iter_start(): w.add_start_state(state) for _ in range(n_seed): w.add_new_start_task() w.save()
def make_h5_file(filename, out_dir='./', new_filename=None, max_load=None): """ Converts file to HDF5 (.h5) format. Default saves output in current dir. Args: filename (str): Name of filterbank file to read out_dir (str): Output directory path. Defaults to cwd new_filename (None or str): Name of output filename. If not set, will default to same as input, but with .h5 instead of .fil """ fil_file = Waterfall(filename, max_load=max_load) if not new_filename: new_filename = out_dir + filename.replace('.fil', '.h5').split('/')[-1] if '.h5' not in new_filename: new_filename = new_filename + '.h5' fil_file.write_to_hdf5(new_filename)
def bl_scrunch(filename, out_dir='./', new_filename=None, max_load=None, f_scrunch=None): """ Frequency scrunch (lower resolution by averaging) filename Args: filename (str): Name of file to open out_dir (str): """ fil_file = Waterfall(filename, max_load=max_load) if not new_filename: new_filename = out_dir + filename.replace( '.h5', '.scrunched.h5').split('/')[-1] print("Using fscrunch %i" % f_scrunch) fil_file.write_to_hdf5(new_filename, f_scrunch=f_scrunch)