Skip to content

Instantly share code, notes, and snippets.

@astrofrog
Last active September 15, 2017 12:54
Show Gist options
  • Save astrofrog/4163cfe227c99591c341bcf31cd859e8 to your computer and use it in GitHub Desktop.
Save astrofrog/4163cfe227c99591c341bcf31cd859e8 to your computer and use it in GitHub Desktop.
#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);
}
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);
...
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