Examples of pix2vect_ring()


Examples of gov.fnal.eag.healpix.PixTools.pix2vect_ring()

    v = pt.pix2vect_ring(nside, pix);
    z = v.z;
    nring = (int) pt.RingNum(nside, z);
    assertEquals("z=" + z, 10, nring, 1e-10);
    pix = 151;
    v = pt.pix2vect_ring(nside, pix);
    z = v.z;
    nring = (int) pt.RingNum(nside, z);
    assertEquals("z=" + z, 11, nring, 1e-10);
    pix = 167;
    v = pt.pix2vect_ring(nside, pix);
View Full Code Here

Examples of gov.fnal.eag.healpix.PixTools.pix2vect_ring()

    v = pt.pix2vect_ring(nside, pix);
    z = v.z;
    nring = (int) pt.RingNum(nside, z);
    assertEquals("z=" + z, 11, nring, 1e-10);
    pix = 167;
    v = pt.pix2vect_ring(nside, pix);
    z = v.z;
    nring = (int) pt.RingNum(nside, z);
    assertEquals("z=" + z, 12, nring, 1e-10);
    pix = 169;
    v = pt.pix2vect_ring(nside, pix);
View Full Code Here

Examples of gov.fnal.eag.healpix.PixTools.pix2vect_ring()

    v = pt.pix2vect_ring(nside, pix);
    z = v.z;
    nring = (int) pt.RingNum(nside, z);
    assertEquals("z=" + z, 12, nring, 1e-10);
    pix = 169;
    v = pt.pix2vect_ring(nside, pix);
    z = v.z;
    nring = (int) pt.RingNum(nside, z);
    assertEquals("z=" + z, 13, nring, 1e-10);
    pix = 180;
    v = pt.pix2vect_ring(nside, pix);
View Full Code Here

Examples of gov.fnal.eag.healpix.PixTools.pix2vect_ring()

    v = pt.pix2vect_ring(nside, pix);
    z = v.z;
    nring = (int) pt.RingNum(nside, z);
    assertEquals("z=" + z, 13, nring, 1e-10);
    pix = 180;
    v = pt.pix2vect_ring(nside, pix);
    z = v.z;
    nring = (int) pt.RingNum(nside, z);
    assertEquals("z=" + z, 14, nring, 1e-10);
    System.out.println("End test RingNum");
  }
View Full Code Here

Examples of gov.fnal.eag.healpix.PixTools.pix2vect_ring()

    double TWOPI = 2.0 * Math.PI;
    int nside = 2;
    int ipix = 0;
    PixTools pt = new PixTools();
    Vector3d v1 = new Vector3d(0., 0., 0.);
    v1 = pt.pix2vect_ring(nside, ipix);
    assertEquals("v1.z = " + v1.z, 1.0, v1.z, 1e-1);

    ipix = 20;
    Vector3d v2 = new Vector3d(0., 0., 0.);
    v2 = pt.pix2vect_ring(nside, ipix);
View Full Code Here

Examples of gov.fnal.eag.healpix.PixTools.pix2vect_ring()

    v1 = pt.pix2vect_ring(nside, ipix);
    assertEquals("v1.z = " + v1.z, 1.0, v1.z, 1e-1);

    ipix = 20;
    Vector3d v2 = new Vector3d(0., 0., 0.);
    v2 = pt.pix2vect_ring(nside, ipix);
    assertEquals("v2.x = " + v2.x, 1.0, v2.x, 1e-1);
    assertEquals("v2.z = " + v2.z, 0.0, v2.z, 1e-1);
    ipix = 22;
    Vector3d v3 = new Vector3d();
    v3 = pt.pix2vect_ring(nside, ipix);
View Full Code Here

Examples of gov.fnal.eag.healpix.PixTools.pix2vect_ring()

    v2 = pt.pix2vect_ring(nside, ipix);
    assertEquals("v2.x = " + v2.x, 1.0, v2.x, 1e-1);
    assertEquals("v2.z = " + v2.z, 0.0, v2.z, 1e-1);
    ipix = 22;
    Vector3d v3 = new Vector3d();
    v3 = pt.pix2vect_ring(nside, ipix);
    assertEquals("v3.y = " + v3.y, 1.0, v3.y, 1e-1);
    assertEquals("v3.z = " + v3.z, 0.0, v3.z, 1e-1);
    //    System.out.println("Vector3 x="+v3.x+" y="+v3.y+" z="+v3.z);
    ipix = 95;
    nside = 4;
View Full Code Here

Examples of gov.fnal.eag.healpix.PixTools.pix2vect_ring()

    assertEquals("v3.y = " + v3.y, 1.0, v3.y, 1e-1);
    assertEquals("v3.z = " + v3.z, 0.0, v3.z, 1e-1);
    //    System.out.println("Vector3 x="+v3.x+" y="+v3.y+" z="+v3.z);
    ipix = 95;
    nside = 4;
    v1 = pt.pix2vect_ring(nside, ipix);
    v1.normalize();
    double phi1 = Math.atan2(v1.y, v1.x);
    double[] tetphi = new double[2];
    tetphi = pt.pix2ang_ring(nside, ipix);
    assertEquals("phi = " + phi1, 0.0, Math.abs(phi1 - tetphi[1]), 1e-10);
View Full Code Here

Examples of gov.fnal.eag.healpix.PixTools.pix2vect_ring()

    double[] tetphi = new double[2];
    tetphi = pt.pix2ang_ring(nside, ipix);
    assertEquals("phi = " + phi1, 0.0, Math.abs(phi1 - tetphi[1]), 1e-10);
    ipix = 26;
    nside = 4;
    v1 = pt.pix2vect_ring(nside, ipix);
    v1.normalize();
    phi1 = Math.atan2(v1.y, v1.x);
    if (phi1 < 0.)
      phi1 += TWOPI;
    tetphi = new double[2];
View Full Code Here

Examples of gov.fnal.eag.healpix.PixTools.pix2vect_ring()

    int nside = 4;
    int ipix = 83;
    int respix = 0;
    PixTools pt = new PixTools();
    Vector3d v1 = new Vector3d(0., 0., 0.);
    v1 = pt.pix2vect_ring(nside, ipix);
    respix = (int) pt.vect2pix_ring(nside, v1);
    assertEquals("respix = " + respix, 83, respix, 1e-10);

    System.out.println("------------------------------------------");
    System.out.println(" test vect2pix_ring is done");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.