Giter Club home page Giter Club logo

classify-galaxies-python-ds9's Introduction

Classify Galaxies with Python and DS9

A Python GUI tool to classify galaxies with the help of DS9 and SExctrator.

This script uses a FITS image and its SExtractor catalog to create cropped images of each galaxy in order to display them in DS9. DS9 allows the user analyze each galaxy in better detail and classify it correctly. Tkinter is used to have a GUI that displays each possible classification, with an option to quit when requested.

The classification data will only be saved in a new file once all images are classified. More classification options can be added easily to the GUI, but may be cumbersome to do so. Some variables (listed below) may be changed within the code to adjust to different needs, e.g. image/catalog destination, file names.

The images and tables created are not deleted after the tool is closed.

Usage

python CGPD.py [image.fits] [catalog]

SExtractor catalog requirements

In the same order, without headers:

# 1 NUMBER - Running object number

# 2 ALPHA_J2000 - Right ascension of barycenter (J2000) [deg]

# 3 DELTA_J2000 - Declination of barycenter (J2000) [deg]

# 4 X_IMAGE - Object position along x [pixel]

# 5 Y_IMAGE - Object position along y [pixel]

# 6 MAG_APER - Fixed aperture magnitude vector [mag]

# 7 KRON_RADIUS - Kron apertures in units of A or B

# 8 FLUX_RADIUS - Fraction-of-light radii [pixel]

# 9 ISOAREA_IMAGE - Isophotal area above Analysis threshold [pixel**2]

# 10 A_IMAGE - Profile RMS along major axis [pixel]

# 11 ELLIPTICITY - 1 - B_IMAGE/A_IMAGE

# 12 THETA_IMAGE - Position angle (CCW/x) [deg]

# 13 BACKGROUND - Background at centroid position [count]

# 14 CLASS_STAR - S/G classifier output

# 15 FLAGS - Extraction flags

Some variables

lim_mag: Magnitude limit for galaxies in catalog (default = 17).

lim_flag: SExtractor flag limit (star = 1, galaxy = 0, default = 0.6).

catalog size limit: The dataframe axis may be changed for testing purposes. It must be commented/removed to use all galaxies possible.

home_dir: Option to change image/catalog directory.

min_area: Minimum area in pixels for galaxy images (default = 60).

coords_table: Name of dataframe that includes image name, pixel and RA/Dec coordinates.

file_out: Name of final table with classifications for each galaxy included.

d.set's: DS9 commands used to help analyze each galaxy.

Some functions

GetSize: Gets galaxy box dimensions, used to create a new FITS image of cropped galaxy.

GetPng: Creates a PNG image of the galaxy, displaying it in DS9 fashion with FK5 coordinates. Using it makes the process slower and can be disabled.

GetFits: Creates cropped image of galaxy using GetSize outputs.

classify-galaxies-python-ds9's People

Contributors

orlandogr15 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.