Overview

The main class that is responsible for handling the data statistics, as well as the covariance matrix used during parameter estimation, is the pyRSD.rsdfit.data.PowerData class.

Information about the parameters that are needed to initialize the PowerData class can be found by using the PowerData.help() function,

In [1]: from pyRSD.rsdfit.data import PowerData

# print out the help message for the parameters needed
In [2]: PowerData.help()
Initialization Parameters for PowerData
--------------------------------------------------
covariance :

        The string specifying the name of the file holding the covariance matrix.
        
covariance_Nmocks :

        The number of mocks that was used to measure the covariance matrix.

        If this is non-zero, then the inverse covariance matrix will
        be rescaled to account for noise due to the finite number of mocks
        

	Default: 0.0

covariance_rescaling :

        Rescale the covariance matrix read from file by this amount.
        

	Default: 1.0

data_file :

        The string specifying the name of the file holding the data measurements.
        
ells :

        A list of integers specifying multipole numbers for each statistic
        in the final analysis.

        This must be supplied when the :attr:`mode` is ``poles``
        

	Default: None

fitting_range :

        The :math:`k` fitting range for each statistics.

        This can either be a tuple of (kmin, kmax), which will be
        used for each statistic or a list of tuples of (kmin, kmax)
        
grid_file :

        A string specifying the name of the file holding a
        :class:`pyRSD.rsd.transfers.PkmuGrid` to read.
        

	Default: None

max_ellprime :

        When convolving a multipole of order ``ell``, include contributions
        up to and including this number.
        

	Default: 4

mode :

        The type of data, either ``pkmu`` or ``poles``
        
mu_bounds :

        A list of tuples specifying the edges of the :math:`\mu` bins.

        This should have (mu_min, mu_max), corresponding
        to the edges of the bins for each statistic in the final analysis

        This must be supplied when the :attr:`mode` is ``pkmu``
        

	Default: None

statistics :

        A list of the string names for each statistic that will be read from file

        These strings should be of the form:

        >> ['pole_0', 'pole_2', ...]
        >> ['pkmu_0.1', 'pkmu_0.3', ...]
        
usedata :

        A list of the statistic numbers that will be included in the final
        analysis.

        This allows the user to exclude certain statistics read from file. By
        default (``None``), all statistics are included
        

	Default: None

window_file :

        A string specifying the name of the file holding the correlation
        function multipoles of the window function.

        The file should contain columns of data, with the first column
        specifying the separation array :math:`s`, and the other columns
        giving the even-numbered correlation function multipoles of the window
        

	Default: None

window_kmax :

        Default kmax value to use on the grid when convolving the model.
        

	Default: 0.7

window_kmin :

        Default kmin value to use on the grid when convolving the model.
        

	Default: 0.0001

These parameters should be specified in the parameter file that is passed to the rsdfit executable and the names of the parameters should be prefixed with the data. prefix. In our example parameter file discussed previously, we specify multipoles data to read from file as

#-------------------------------------------------------------------------------
# data params
#-------------------------------------------------------------------------------
data.covariance = '$(PYRSD_DATA)/examples/runPB_poles_gaussian_cov.dat'
data.covariance_Nmocks = 0
data.covariance_rescaling = 1.0
data.data_file = '$(PYRSD_DATA)/examples/runPB_galaxy_poles.dat'
data.ells = [0, 2, 4]
data.fitting_range = [(0.02, 0.4), (0.02, 0.4), (0.02, 0.4)]
data.grid_file = '$(PYRSD_DATA)/examples/runPB_pkmu_grid.dat'
data.mode = 'poles'
data.mu_bounds = None
data.statistics = ['pole_0', 'pole_2', 'pole_4']
data.usedata = range(0, 3)
data.window_file = None
#-------------------------------------------------------------------------------

These parameters allow the user to specify which type of data is being used by specifying the mode parameter, either pkmu for \(P(k,\mu)\) data or poles for \(P_\ell(k)\) data. The user can also specify the desired \(k\) ranges to use when fitting the data, via the fitting_range parameter.

The data itself must be read in from a plaintext file. Similarly, the covariance matrix and grid file must also be read from a plaintext file. See the next section File Formats for Data Files for more specifics on the format of these plaintext files.