There may be a way to encapsulate nad speed up the fiber-gal matching.
the package esutil from erin sheldon has a few tools of interest, using a binary tree and a matching function, it might be faster:
gin1,gin2,gd12 = h.match(galRA,galDEC,galRA,galDEC,srad,maxmatch=5000) # match; output is indices of first list that match with indices of second list and the distances between each pair
This has potential not only to speed up, but to standardize/clarify the matching code itself.
#1 Updated by Brian Nord over 7 years ago
- Status changed from New to Assigned
- Assignee changed from Jaime Forero to Ben Hambrecht
- Priority changed from Normal to Immediate
the esutil package with the match function is to be very fast! optimized (I think).
there might be another one out there called something like "close match radec."
Look in Fiber_Allocation_Nord for the IDL versions of this code.So, to get this working I guess we need the following?
- cut the galaxy catalog appropriately before feeding it into match code
- use an efficient matching algorithm (see the IDL code, with close_match_radec)