def write(self, filename, format_='pickle'): """ Writes a transfer function to 'pickle' file. Parameters ---------- format_ : str the format of the file to be saved - accepts 'pickle' """ if format_ == 'pickle': write(self, filename, format_) else: raise KeyError("Format not understood.")
def write(self, filename, format_='pickle'): """ Writes a transfer function to 'pickle' file. Parameters ---------- format\_ : str the format of the file to be saved - accepts 'pickle' """ if format_ == 'pickle': write(self, filename, format_) else: raise KeyError("Format not understood.")
def write(self, filename, format_='pickle'): """ Exports Simulator object. Parameters ---------- filename : str Name of the Simulator object to be created. format_ : str Available options are 'pickle' and 'hdf5'. """ if format_ == 'pickle': write(self, filename) else: raise KeyError("Format not supported.")
def write(self, filename, format_='pickle'): """ Exports Simulator object. Parameters ---------- filename : str Name of the Simulator object to be created. format_ : str Available options are 'pickle' and 'hdf5'. """ if format_ == 'pickle': io.write(self, filename) else: raise KeyError("Format not supported.")
def write(self, filename, format_='pickle', **kwargs): """ Exports LightCurve object. Parameters ---------- filename: str Name of the LightCurve object to be created. format\_: str Available options are 'pickle', 'hdf5', 'ascii' """ if format_ == 'ascii': io.write(np.array([self.time, self.counts]).T, filename, format_, fmt=["%s", "%s"]) elif format_ == 'pickle': io.write(self, filename, format_) elif format_ == 'hdf5': io.write(self, filename, format_) else: utils.simon("Format not understood.")
def write(self, filename, format_='pickle', **kwargs): """ Write a :class:`Lightcurve` object to file. Currently supported formats are * pickle (not recommended for long-term storage) * HDF5 * ASCII Parameters ---------- filename: str Path and file name for the output file. format\_: str Available options are 'pickle', 'hdf5', 'ascii' """ if format_ == 'ascii': io.write(np.array([self.time, self.counts]).T, filename, format_, fmt=["%s", "%s"]) elif format_ == 'pickle': io.write(self, filename, format_) elif format_ == 'hdf5': io.write(self, filename, format_) else: utils.simon("Format not understood.")