GridBackend

class beast.physicsmodel.helpers.gridbackends.GridBackend(*args, **kwargs)[source]

Bases: object

How the content of a grid is handled. The idea is to provide enough flexibility that low-memory footprint can be achieved if needed

This class is a generic implementation that will be derived into more classes

Attributes Summary

header

nbytes

return the number of bytes of the object

Methods Summary

keys()

returns the grid keys

write(fname[, append])

Save the file in a format based on the filename extension

writeFITS(fname[, overwrite])

Save to fits file

writeHDF(fname[, append])

Save to HDF file

Attributes Documentation

header
nbytes

return the number of bytes of the object

Methods Documentation

keys()[source]

returns the grid keys

write(fname, append=False)[source]

Save the file in a format based on the filename extension

fname: str

filename (incl. path)

writeFITS(fname, overwrite=False)[source]

Save to fits file

Parameters:
fname: str

filename (incl. path) to export to

overwritebool, optional

Set to overwrite the fits file

writeHDF(fname, append=False)[source]

Save to HDF file

Parameters:
fnamestr

filename (incl. path)

appendbool, optional (default False)

if set, it will append data to each Array or Table