Last active
September 15, 2017 12:54
-
-
Save astrofrog/4163cfe227c99591c341bcf31cd859e8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "bl.h" | |
#include "healpix-utils.h" | |
int main() { | |
il* hps = il_new(256); | |
double ra, dec, radius; | |
int Nside; | |
ra = 10.; | |
dec = 20.; | |
radius = 100.; | |
Nside = 4; | |
healpix_rangesearch_radec(ra, dec, radius, Nside, hps); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static il* hp_rangesearch(const double* xyz, double radius, int Nside, il* hps, anbool approx) { | |
int hp; | |
double hprad = arcmin2dist(healpix_side_length_arcmin(Nside)) * sqrt(2); | |
il* frontier = il_new(256); | |
il* bad = il_new(256); | |
if (!hps) | |
hps = il_new(256); | |
printf("hprad=%f\n", hprad); | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: debug | |
OBJS = healpix-utils.o healpix.o starutil.o permutedsort.o mathutil.o bl.o qsort_reentrant.o | |
HEADERS = healpix-utils.h healpix.h | |
$(OBJS): %.o: %.c $(HEADERS) | |
$(CC) -o $@ -c $< | |
%.o: %.c | |
$(CC) -o $@ -c $< | |
debug: debug.c $(OBJS) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment