gmatch /

Filename Size Date modified Message
gmatch
testing
98 B
47 B
107 B
34.3 KB
54 B
1.2 KB
723 B

Matching catalogues using Groth method

A Pattern-Matching Algorithm for Two-Dimensional Coordinate Lists Eduard J. Groth 1986 AJ 19, 5

http://adsabs.harvard.edu/abs/1986AJ.....91.1244G

Gmatch is released under the GPL (version 3 or any later version)

Sample usage

>>> from gmatch import gmatch
>>> # load cat1 and cat2 from somewhere
>>> # they are numpy arrays
>>> # N rows, 2 columns
>>> cat1.shape
(20, 2)
>>> cat2.shape
(20, 2)
>>> matches = gmatch(cat1, cat2, eps=1e-3)
>>> # eps is the *relative* tolerance in xy
>>> matches
None
>>> # if the return value is None, the catalogues
>>> # do not match
>>> from gmatch import gmatch
>>> # load cat1 and cat2 from somewhere
>>> # they are numpy arrays
>>> matches = gmatch(cat1, cat2, eps=1e-3)
>>> # eps is the *relative* tolerance in xy
>>> if matches:
...     matches[0]
...     matches[1]
>>> # if the return value is not None
>>> # then is a tuple
>>> # first element matched objects in cat1
>>> # second element matched objects in cat2
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.