Skip to content

A friends-of-friends (FoF) sky catalog matching Python package

License

Notifications You must be signed in to change notification settings

yymao/FoFCatalogMatching

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FoFCatalogMatching

PyPI Version arXiv:2008.12783

Using friends-of-friends method to iteratively match multiple sky catalogs without the need of specifying the main catalog.

The FoFCatalogMatching package was developed as part of the SAGA Survey. If you use this package in your research, please considering citing SAGA Stage II paper (Mao et al. 2020).

Installation

pip install FoFCatalogMatching

Example

import numpy as np
from astropy.table import Table
import FoFCatalogMatching

n = 100
ra = np.random.uniform(0, 360, n)
dec = np.random.uniform(-90, 90, n)

cat_a = Table({'ra': ra, 'dec': dec})
cat_b = Table({'ra': ra+np.random.normal(0, 0.0002, n), 'dec': dec+np.random.normal(0, 0.0002, n)})
cat_c = Table({'ra': ra+np.random.normal(0, 0.0002, n), 'dec': dec+np.random.normal(0, 0.0002, n)})

results = FoFCatalogMatching.match({'a': cat_a, 'b':cat_b, 'c':cat_c},
                                   {3.0: 3, 2.0: 3, 1: None})