Giter VIP home page Giter VIP logo

shearshear's Introduction

shearshear

GPU shear-shear code

/* Authors: Miguel Cardenas-Montes (1) Ignacio Sevilla (2) Christopher Bonnett (3) Rafael Ponce (4)

(1): [email protected] (2): [email protected] (3): [email protected] (4): [email protected]

NOTE: This code has been successfully tested on NVIDIA GTX295, C1060, C2050, C2070 and GT555M. */

/* For Ubuntu with Cuda Libraries you have to do once:

user@user:yourpath$ nvcc -c -arch=sm_20 GP2SSCF_GPU_v0.2.cu
user@user:yourpath$ g++ -lcudart GP2SSCF_GPU_v0.2.o -o GP2SSCF_GPU

NOTE: Sometimes could be necesary to do: (m value depends on your architecture, 32 bits or 64 bits)
    nvcc -c -m=32 -arch=sm_20 GP2SSCF_GPU_v0.2.cu   or
    nvcc -c -m=64 -arch=sm_20 GP2SSCF_GPU_v0.2.cu


    If you have to indicate where the libraries are you will have to do something like that:

    nvcc -arch=sm_20 GP2SSCF_GPU_v0.2.cu
    g++ -lcudart -lpthread -L/usr/local/cuda/lib64 GP2SSCF_GPU_v0.2.o -o GP2SSCF_GPU

You can also try

user@user:yourpath$ nvcc -arch=sm_20 -lcudart -lpthread -L/usr/local/cuda5.0/lib64  -o GP2SSCF_GPU GP2SSCF_GPU_v0.2.cu

Now, if everything went well, you just created a binary file called "GP2SSCF_GPU" */

                                        /* TO RUN */

/* This program calculates the shear-shear angular correlation function by brute force using a GPU, in the flat-sky approximation The program receives as input parameters the following:

Catalog: The path of your galaxy catalog, usually is a galaxy catalog for a specific redshift bin 
Output_correlation_file: The path of your output file 

The input files must have only five columns:

RA: Right Ascension in degrees 
DEC: Declination also in degrees
e1: Ellipticity 1 or Shear 1
e2: Ellipticity 2 or Shear 2
W: Weight corresponding to each galaxy

The output will be:

theta: angle(degrees, in logscale)
Xi+/DD: Xi+ divided by the number of pairs separated an angular distance theta
Xi-/DD: Xi- divided by the number of pairs separated an angular distance theta
Xix/DD: Xix divided by the number of pairs separated an angular distance theta
DD: the number of pairs separated an angular distance theta
DD_wight: the number of pairs separated an angular distance theta taking into account 
          the galaxies weight

To run the program:

In order to calculate the shear-shear correlation function you must do:

    ./GP2SSCF_GPU Catalog.txt output.txt

EXAMPLES TO CALL THE FUNCTION:

    ./GP2SSCF_GPU test.cat Shear_CF.txt

IMPORTANT:

1.- We are not giving a test catalog but our results have been compared to the athena results, so we encourage you to try our code using the athena input file.

2.- In order to compare the athena results to our results you will take into account that the athena input data set, specifically RA and DEC, are in arcseconds, so you will have to divide both by 3600.0 in order to get them in degrees.

3.- You can download the athena code from

http://www2.iap.fr/users/kilbinge/athena/

and the input data file from

http://www2.iap.fr/users/kilbinge/athena/athena_1.52-testdata.tgz

*/

shearshear's People

Contributors

nsevilla avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.