Skip to main content

A Python wrapper for the advanced crossmatching features of STILTS, offering more flexibility than the Topcat frontend and simplifying the process of using STILTS via the command line without the need for complex shell scripts.

Project description

Logo

CatMatcher

A Python wrapper for the advanced table crossmatching features of STILTS, offering more flexibility than the Topcat frontend and simplifying the process of using STILTS via the command line without the need for complex shell scripts.

Requirements

  • The package should provide a fast and intuitive way for python users to access the full functionality of the Starlink Tables Infrastructure Library Tool Set, short STILTS, cross-matching functionalities. Said functionalities are more extensive than what is currently offered by the Topcat GUI, especially concerning the handling of multiple tables at once.
  • The tool should eliminate the need of writing shell scripts and running them in the command line, instead offering access to the STILTS crossmatch functions by providing python wrappers for the source code.
  • The python package should automatically create the required shell scripts, taking into account a number of user-specified parameters (e.g., match radius, match type, dropped columns, column pre- or suffixes, etc.) to get the desired output.
  • The package should allow matches between an arbitrary number of tables, and also incorporate the specific pairmatch functions of STILTS.
  • The package should be able to work with various common input formats, such as .fits and .csvat minimum, which may be provided locally, or accessed via query services like TAP or astroquery.
  • All functions and classes should be documented using common documentation software, e.g., Sphinx and be covered by test functions.

Expected dependencies

  • topcat/STILTS software needs to be installed and accessible via the terminal.
  • Classic python packages such as: numpy, astropy

Green Badge Install instructions for STILTS

  1. Download and install the package:

  2. Important: Within the CatMatcher package, STILTS is executed using the zsh native to MacOS environments.
    To see if that works on your machine, try typing the command stilts into the zsh terminal
    (within the virtual environment of CatMatcher, if it was not installed globally). It should open the software in the terminal and give a basic overview of its parameters.

  3. Depending on system architecture, the STILTS-path may need to be added to the ~\.zshrc source file.
    It will look similar to the example below, depending on where exactly the STILTS (or topcat) source directory is located:

    • export PATH="/Applications/TOPCAT.app/Contents/Resources/app:$PATH"

User Stories

Main functionality

  1. Simultaneous crossmatch of n catalogs
    Alena has 8 different .csv files with stellar coordinates measured on different observation dates. She now needs to perform a cross-match between all the catalogs to establish a time-domain for each measured source. However, the Topcat GUI only allows for a simultaneous matching of 4 tables at the same time, which leads to different match results depending on the specific catalog combinations and match order. Luckily, the STILTS backend is not as limited. So Alena uses the python wrapper for the STILTS tmatchn function to crossmatch all her catalogs at the same time.

  2. Crossmatch of a local table with the Gaia DR3 catalog
    Max has a dataset containing stellar positions in the ICRS frame which he would like to augment with photometric data from the Gaia DR3 survey for further study. To this end, he uses the TAPmatch function, which takes the local table as input, queries the Gaia database for all sources in the user-specified coordinate range, and returns a cross-match table between the local table and the online database.

Extended functionality (Edge cases)

  • Alena has performed many cross-matches of different catalogs for her work during the last months. Now she has to write her results down for publication, but she cannot remember which value she selected for the match radius r. So she provides her catalogs as input to the tmatchn function and tries out different plausible values for r. Afterwards, she compares the number of matches she got for each values to the number of matches in her original catalog and can deduce the right value.

  • Peter has a number of tables, some of which are in .fits format while others are in .csv format, which he would like to cross-match. Before the tmatchn routine is employed, the tables need to be brought into the same format. So the script employs a function that accepts different input formats and transforms them into pd.Dataframes before handing them over to the matching function.

Development plan

The focus (= core functionality) of the package is the STILTS function tmatchn, which allows the simultaneous cross-matching of n catalogs based on various user specifications.

The core functionality will be expanded to other functionalities, e.g., tmatch2 (cross-matching of two catalogs) or the possibility to cross-match a local table with an online table using astroquery. However, the latter functions are already possible via the Topcat GUI and as such present less pressing matters. The key advantage of incorporating them into the package will be the log-option, which stores important crossmatch parameters, such as the matching radius or criteria, in a dedicated log-file.

Logo © 2025 rottenstea. All rights reserved.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

catmatcher-0.1.0.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

catmatcher-0.1.0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file catmatcher-0.1.0.tar.gz.

File metadata

  • Download URL: catmatcher-0.1.0.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for catmatcher-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ccd088e66a00f3d28761f266b9f972d8c80daf65946b4152df9baa53a2f49398
MD5 c126e1a5e818f69e9c57fb7edc80a8a3
BLAKE2b-256 d5606919141f9859031ed2c3835135689b6f0b8b94741032f52e58091892f9c7

See more details on using hashes here.

File details

Details for the file catmatcher-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: catmatcher-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for catmatcher-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f100ac30b244b95201be89e45b26e786cb6f0663d2ffb5e55f160ca7d2f6c23c
MD5 1b9a78a345b6c573c7d88890c49e7365
BLAKE2b-256 9304bf30674472f861e66a8bde8f313d957dcf7c14e24e513b8e7a79847d0b21

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page