Each type of data file is represented by a class. There are classes for ionization fraction, density, velocity and halos. These are all documented below.
A C2Ray xfrac file.
Use the read_from_file method to load an xfrac file, or pass the filename to the constructor.
Read data from file.
filename (string): the file to read from.
file format.
A CubeP3M density file.
Use the read_from_file method to load a density file, or pass the filename to the constructor.
Some useful attributes of this class are:
Read data from file.
filename (string): the file to read from.
file format.
A CubeP3M velocity/momentum file.
Use the read_from_file method to load a density file, or pass the filename to the constructor.
Some useful attributes of this class are:
To get the velocity in km/s, use get_kms_from_density
Get the velocity in kms. Since the file stores momentum rather than velocity, we need the density for this.
or a file to read the density from.
Read data from file. Sets the instance variables self.raw_velocity and self.kmsrho8
A class that holds information about a large number of halos, as read from a halo list file. Contains methods to select halos based on different criteria. This file is very slow if you need to read a large number of halos.
TODO: write a better implementation of this class.
Read a halo list.
filename (string): The file to read from
Only halos above this mass will be read.
Only halos below this mass will be read. If None, there is no limit.
is no limit.
startline = 0 (int): The line in the file where reading will start.