Esempio n. 1
0
 def gappy_bank(self, gappy_dir):
     """ init a sbank on the gappy data """
     bank = WaveBank(gappy_dir)
     # make sure index is updated after gaps are introduced
     if os.path.exists(bank.index_path):
         os.remove(bank.index_path)
     bank._index_cache = obsplus.bank.utils._IndexCache(bank, 5)
     bank.update_index()
     return bank
Esempio n. 2
0
 def bank(self, df_index, ta_archive):
     """ return a bank with monkeypatched index """
     sbank = WaveBank(ta_archive)
     sbank.update_index = lambda: None
     sbank._index_cache = lambda *args, **kwargs: df_index
     return sbank