Hi @fxpineau . The behaviour of the HashComputer.hash() method for HealpixNested and HealpixNestedFast seems to differ when lonRad<0, though the documentation says
lonRad ... must support reasonably large positive and negative values
Here is a test:
import cds.healpix.Healpix;
public class MbtTest {
public static void checkHash( int depth, double lon, double lat ) {
long h0 = Healpix.getNested( depth ).hash( lon, lat );
long h1 = Healpix.getNestedFast( depth ).hash( lon, lat );
System.out.println( "(" + lon + "," + lat + "):\t-> "
+ h0 + "\t" + h1 + "\t"
+ ( h0 == h1 ? "" : "!!!" ) );
}
public static void main( String[] args ) {
int depth = 3;
for ( int ilon = 1; ilon >= -1; ilon-- ) {
for ( int ilat = 1; ilat >= -1; ilat-- ) {
checkHash( depth, 0.5 * ilon, 0.5 * ilat );
}
}
}
}
Hi @fxpineau . The behaviour of the
HashComputer.hash()
method forHealpixNested
andHealpixNestedFast
seems to differ when lonRad<0, though the documentation saysHere is a test:
which gives me