NAME

compcorr.c -- A program for calculating values of several different correlation function estimators separately for both transverse and parallel components as seen from origin using given data and random samples.


SYNOPSIS

        # Hamilton estimator
        ./compcorr correlation.dat data.dat random_sample.dat 4
        # Landy-Szalay estimator by default
        ./compcorr correlation.dat data.dat random_sample.dat


ARGUMENTS

The following arguments must be given, in this order: OUT DATA CMP. In addition, METHOD can be given.


FILE FORMATS

All the files are to be in ASCII format, with numerical fields separated by whitespaces and newlines for human readability.

RANDOM SAMPLE

The random sample file should have the following format:

        number of points (N)
        data low bound (3 components, separated by whitespace)
        data high bound (3 components, separated by whitespace)
        point 1 (3 components, separated by whitespace)
        .
        .
        .
        point N (3 components, separated by whitespace)

DATA FILE

The data file should have a format otherwise identical to the random sample file, except that the following rows should be added to the very beginning of the file:

        number of parallel scale bins (N_p)
        bin 1 (2 components, low and high bounds, whitespace separated)
        .
        .
        bin N_p 
        number of transverse scale bins (N_t)
        bin 1 (2 components, low and high bounds, whitespace separated)
        .
        .
        bin N_t

OUTPUT FILE

Result in OUTFILE will have one row for each bin, with the following columns in this order: bin low bound, high bound, value of ksi, Poisson error


AUTHOR

Written in 2006 for the benefit of Tuorla Observatory Cosmological Simulations research group by Pauli Pihajoki.


COPYRIGHT

 Copyright (c) 2006, Pauli Pihajoki
 All rights reserved.
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
     * Redistributions of source code must retain the above copyright
       notice, this list of conditions and the following disclaimer.
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
 THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.