def test_nds2_conversion(self): try: import nds2 except ImportError as e: self.skipTest(str(e)) else: try: conn = nds2.connection(NDSHOST) except Exception as f: self.skipTest(str(f)) else: nds2channel = conn.find_channels(self.channel)[0] new = Channel.from_nds2(nds2channel) self.assertTrue(str(new) == self.channel) self.assertTrue(new.ifo == self.channel.split(':', 1)[0]) self.assertTrue(new.sample_rate == units.Quantity(32768, 'Hz'))
def test_nds2_conversion(self): try: import nds2 except ImportError as e: self.skipTest(str(e)) else: try: conn = nds2.connection(NDSHOST) except Exception as f: self.skipTest(str(f)) else: nds2channel = conn.find_channels(self.channel)[0] new = Channel.from_nds2(nds2channel) self.assertTrue(str(new) == self.channel) self.assertTrue(new.ifo == self.channel.split(':', 1)[0]) self.assertTrue(new.sample_rate == units.Quantity(32768, 'Hz'))
def iterate(start, end, names): if not buffers: return [] return [[ b for b in buffers if Channel.from_nds2(b.channel).ndsname in names ]]