py21cmfast.outputs.InitialConditions.read

InitialConditions.read(direc: ~typing.Optional[~typing.Union[str, ~pathlib.Path]] = None, fname: ~typing.Union[str, ~pathlib.Path, None, <MagicMock id='140644178599600'>, <MagicMock id='140644178603392'>] = None, keys: ~typing.Optional[~typing.Sequence[str]] = None)

Try find and read existing boxes from cache, which match the parameters of this instance.

Parameters:
  • direc – The directory in which to search for the boxes. By default, this is the centrally-managed directory, given by the config.yml in ~/.21cmfast/.

  • fname – The filename to read. By default, use the filename associated with this object. Can be an open h5py File or Group, which will be directly written to.

  • keys – The names of boxes to read in (can be a subset). By default, read everything.