Code Monkey home page Code Monkey logo

catalog_match's Introduction

Catalog Match

Given input ra, dec coordinates, uses the astroquery package to download the same frame from a selected catalog.

Both catalogs are then matched using astropy's match_to_catalog_sky.

Currently, only Vizier catalogs can be queried. To obtain the list of supported catalogs in Vizier, try the following in a Python session (in this example, I search for GAIA2 data):

from astroquery.vizier import Vizier
catalog_list = Vizier.find_catalogs('gaia 2')
print(Vizier.get_catalogs(catalog_list.keys()))

In this case, the GAIA2 data is in the I/345 catalog.

Installation

Requires the conda package manager: https://conda.io/miniconda.html

After conda is installed,create an environment and install the required packages with:

$ conda create -n cat-match matplotlib numpy scipy astropy

Then activate the environment:

$ conda activate cat-match

After a successful activation, the terminal session should look like:

(cat-match) $

Finally, install the astroquery package:

(cat-match) $ conda install -c astropy astroquery

Running

After downloading and extracting the repository, rename the params_input_def.dat to params_input.dat.

Put a file in the /input folder and set the proper parameters in the params_input.dat file.

Run with:

(cat-match) $ python catalog-match.py

Output

The code outputs three .dat files:

  • cluster_match.dat: file with the cross-matched stars.
  • cluster_no_match.dat: file with the stars that could not be cross-matched.
  • cluster_query.dat: file with the queried catalog data.

and one .png file:

  • cluster.png: figures showing the crossed-matched stars and more.

which looks like this:

out

catalog_match's People

Contributors

gabriel-p avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

catalog_match's Issues

Add magnitude condition

If two similar magnitudes can be used (observed and queried), then the magnitudes can be used as a discriminant for bad matches.

If this mag condition is used, when two queried stars are assigned to the same observed stars, and both stars are inside the proximity radius selected, pick the one with the closest magnitude value.

The other condition (the one currently in place) selects whichever star is closest to the observed one.

Fix moved matched stars

Currently matched stars are moved to the coordinates 0., 0. to avoid being matched again without messing with the indexes.

This should be generalized to move stars far away from the field's center.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.