Examples of Vect2Ang()


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

  public void testVec2Ang() {
    double PI = Math.PI;
    Vector3d v = new Vector3d(0.0, 1.0, 0.0);
    PixTools pt = new PixTools();
    double[] ang_tup = { 0., 0. };
    ang_tup = pt.Vect2Ang(v);
    System.out.println(" Theta=" + ang_tup[0] / PI + " Phi=" + ang_tup[1]
        / PI);
    assertEquals("Theta=" + ang_tup[0], 0.5, ang_tup[0] / PI, 1e-10);
    assertEquals("Phi=" + ang_tup[1], 0.5, ang_tup[1] / PI, 1e-10);
    v = new Vector3d(1.0, 0.0, 0.0);
View Full Code Here

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

    System.out.println(" Theta=" + ang_tup[0] / PI + " Phi=" + ang_tup[1]
        / PI);
    assertEquals("Theta=" + ang_tup[0], 0.5, ang_tup[0] / PI, 1e-10);
    assertEquals("Phi=" + ang_tup[1], 0.5, ang_tup[1] / PI, 1e-10);
    v = new Vector3d(1.0, 0.0, 0.0);
    ang_tup = pt.Vect2Ang(v);
    assertEquals("phi=" + ang_tup[1], 0., ang_tup[1] / PI, 1e-10);
    System.out.println(" test Vect2Ang is done");
  }

  public void testAng2Pix() throws Exception {
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.