dirac-institute/kbmod-regionsearch

enhancements to PartitionIndexer.observations_to_indices

Opened this issue · 0 comments

  • Use "radius" instead of "fov" as it is more conventional
  • SkyCoord.separation is the haversine angle speed colud be improved. Benchmark. Consider dot product and see Dino comment below.
  • ephemeris.set requires internet connection. Consider alternative (ask Dino).

Dino on SkyCoord.separation
You want to transform to cartesian system and then search a box because .separation is the Haversine distance and is very costly. See how I did it in the example implementation. This is why this same approach works for 80 mil rows for CADC, you round all that down to integers, execute a fast select on indexed integers in the DB, and then you prune on finer shapes. Or in our case, we can skip the integers because there's no slow and fast np.where. You might not intending for this function to do that so this might be fine, or not, but if you were this won't be fast if there are many pointings.