py21cmfast.outputs.PerturbedField.from_file

classmethod PerturbedField.from_file(fname, direc=None, load_data=True, h5_group: Optional[str] = None, arrays_to_load=None)

Create an instance from a file on disk.

Parameters:
  • fname (str, optional) – Path to the file on disk. May be relative or absolute.

  • direc (str, optional) – The directory from which fname is relative to (if it is relative). By default, will be the cache directory in config.

  • load_data (bool, optional) – Whether to read in the data when creating the instance. If False, a bare instance is created with input parameters – the instance can read data with the read() method.

  • h5_group – The path to the group within the file in which the object is stored.