Examples of Ang2Vec()


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

    try {
      pix =  pt.ang2pix_ring(nside,theta, phi);
    } catch (Exception e) {
      e.printStackTrace();
    }
    Vector3d v = pt.Ang2Vec(theta,phi);
    long pix1 =  pt.vect2pix_ring(nside,v);
    assertEquals("pix=" + pix, pix1, pix, 1e-10);
    assertEquals("pix=" + pix, 76, pix, 1e-10);

    long pix2 =  pt.ang2pix_nest(nside,theta,phi);
View Full Code Here

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

    System.out.println(" Start test Ang2Vect----------------");
    double PI = Math.PI;
    double theta = PI / 2.;
    double phi = PI / 2;
    PixTools pt = new PixTools();
    Vector3d v = pt.Ang2Vec(theta, phi);
    System.out.println("Vector x=" + v.x + " y=" + v.y + " z=" + v.z);
    assertEquals("x=" + v.x, 0., v.x, 1e-10);
    assertEquals("y=" + v.y, 1., v.y, 1e-10);
    assertEquals("z=" + v.z, 0., v.z, 1e-10);
    System.out.println(" test Ang2Vect 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.