Examples of AngDist()


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

  public void testAngDist() throws Exception {
    Vector3d v1 = new Vector3d(1.5, 1.6, 2.0);
    Vector3d v2 = new Vector3d(1.2, 1.0, 1.5);
    PixTools pt = new PixTools();
    double res1 = pt.AngDist(v1, v2);
    double res2 = v1.angle(v2);
    System.out.println("res1 = " + res1 + " res2=" + res2);
    assertEquals("angular Distance=" + res2, 1.0, res1 / res2, 1e-10);
    /* Check known problem with vecmath for small vector differences */

 
View Full Code Here

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

    assertEquals("angular Distance=" + res2, 1.0, res1 / res2, 1e-10);
    /* Check known problem with vecmath for small vector differences */

    Vector3d v3 = new Vector3d(1.5, 1.6, 0.);
    Vector3d v4 = new Vector3d(1.5, 1.601, 0.);
    double res3 = pt.AngDist(v3, v4);
    double res4 = v3.angle(v4);
    double expected = res4 - Math.PI / 2.;
    System.out.println("res3 = " + res3 + " res4=" + res4);
    assertEquals("angular Distance=" + res4, 1., (Math.PI / 2. + res3)
        / res4, 1e-3);
View Full Code Here

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

    System.out.println("res3 = " + res3 + " res4=" + res4);
    assertEquals("angular Distance=" + res4, 1., (Math.PI / 2. + res3)
        / res4, 1e-3);
    Vector3d v5 = new Vector3d(1.5, 1.6, 0.);
    Vector3d v6 = new Vector3d(-1.5, -1.75, 0.);
    double res5 = pt.AngDist(v5, v6);
    double res6 = v5.angle(v6);
    System.out.println("res5 = " + res5 + " res6=" + res6);
    assertEquals("angular Distance=" + res6, 2.0, res5 / res6, 1e-10);
    System.out.println(" test of AngDist is done");
  }
View Full Code Here

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

        int nlist = pixlist.size();
        for (int i = 0; i < nlist; i++) {
            ipix = ((Long) pixlist.get(i)).longValue();
            Vector3d v = pt.pix2vect_ring(nside,ipix);
            double dist = pt.AngDist(v,vc);
            assertTrue(dist<=2.*radius);
        }
        cpix = pt.ang2pix_nest(nside,theta,phi);
        Vector3d vc1 = pt.pix2vect_nest(nside, cpix);
        long cpixnest= pt.vect2pix_nest(nside,vc1);
View Full Code Here

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

        pixlist1 = pt.query_disc(nside, vc1, radius, nest, inclusive);
        int nlist1 = pixlist1.size();
        for (int i = 0; i < nlist1; i++) {
            ipix = ((Long) pixlist1.get(i)).longValue();
            Vector3d v = pt.pix2vect_nest(nside,ipix);
            double dist = pt.AngDist(v,vc1);
            assertTrue(dist<=2.*radius);
        }
        System.out.println(" test query disc Hi Res is done -------------------");
    }
    public void testGetNside() {
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.