def extend(self, minutes=15, **kwargs): """Requests subsequent files from the server. If minutes is negative, retrieve preceding files. """ if len(self.instruments) != 1: raise ValueError instrument = next(iter(self.instruments)) if minutes > 0: data = CallistoSpectrogram.from_range( instrument, self.end, self.end + datetime.timedelta(minutes=minutes)) else: data = CallistoSpectrogram.from_range( instrument, self.start - datetime.timedelta(minutes=-minutes), self.start) data = data.clip_freq(self.freq_axis[-1], self.freq_axis[0]) return CallistoSpectrogram.join_many([self, data], **kwargs)
def extend(self, minutes=15, **kwargs): """Requests subsequent files from the server. If minutes is negative, retrieve preceding files. """ if len(self.instruments) != 1: raise ValueError instrument = next(iter(self.instruments)) if minutes > 0: data = CallistoSpectrogram.from_range( instrument, self.end, self.end + datetime.timedelta(minutes=minutes) ) else: data = CallistoSpectrogram.from_range( instrument, self.start - datetime.timedelta(minutes=-minutes), self.start ) data = data.clip_freq(self.freq_axis[-1], self.freq_axis[0]) return CallistoSpectrogram.join_many([self, data], **kwargs)
def test_entries_from_file_withoutwaveunit(): # does not raise `WaveunitNotFoundError`, because no wavelength information # is present in this file next(entries_from_file(RHESSI_IMAGE)) with pytest.raises(WaveunitNotFoundError): next(entries_from_file(EIT_195_IMAGE))
def to_be_removed(self): """Return the least recently used key and its corresponding value as a tuple. """ return six.next(self.iteritems())