Coder Social home page Coder Social logo

jwuphysics / galaxy-cnns Goto Github PK

View Code? Open in Web Editor NEW
10.0 5.0 6.0 32.33 MB

Using SDSS imaging to predict galaxy metallicity. Maintained by @jwuphysics @boada

Home Page: https://arxiv.org/abs/1810.12913

License: GNU General Public License v3.0

Jupyter Notebook 99.95% Python 0.05%
machine-learning sdss convolutional-neural-networks galaxy-evolution deep-learning

galaxy-cnns's Introduction

Galaxy-CNNs

Using three-band SDSS imaging to predict gas-phase metallicity

We use convolutional neural networks (CNNs or convnets) to predict galaxy properties using Sloan Digital Sky Survey (SDSS) gri images. Gas-phase metallicity, which is often estimated by using optical spectroscopy, can also be estimated using our CNN.

We describe our methods in a paper: Wu & Boada (2019, MNRAS, 484, 4683; arXiv:1810.12913).

See also a simplified demo of our work.

Table of contents

Usage

Download this repository by running

git clone https://github.com/jwuphysics/galaxy-cnns.git
cd galaxy-cnns

Dependencies

All analysis was performed inside the Jupyter notebooks using a Python3 environment. We use version 0.7.0 of the fastai machine learning framework built atop Pytorch. This can be installed by following the instructions on the Fastai README page. We will soon have working examples for Fastai version 1.0, which can be installed by running:

git clone https://github.com/fastai/fastai.git
cd fastai 
conda env create -f environment.yml

Note that you will need a GPU. If you don't have one, substitute the previous last line with this instead:

conda env create -f environment-cpu.yml

Before executing any code (or running any notebooks), enter the environment by running conda activate fastai (or conda activate fastai-cpu).

If you encounter any errors, please feel free to reach out to me (@jwuphysics) or check this post on the fastai forums.

Data sets

We queried the SDSS DR14 image cutout service using the script ./download_images.py in order to obtain gri images.

We queried the SDSS MPA-JHU DR7 catalog of spectral line and derived galaxy properties using the commands in the SQL script, ./SDSS_sql_query.sql.

Training and testing

To run the our notebooks, make sure that you are in the fastai conda environment first, and then run jupyter notebook and enter the ./notebook directory.

If you wish to reproduce all figures from the paper, run the notebooks in the ./notebook/paper directory. You will first need to have downloaded all of the data and executed the notebooks labeled "06. Predicting stellar mass in addition to metallicity.ipynb" and "10. The effects of resolution.ipynb" first (sorry about this disorganization -- this may be cleaned up in a future update).

Citation

If you would like to reference our paper, please use the following citation, produced by NASA ADS:

@ARTICLE{2019MNRAS.484.4683W,
       author = {{Wu}, John F. and {Boada}, Steven},
        title = "{Using convolutional neural networks to predict galaxy metallicity from three-colour images}",
      journal = {Monthly Notices of the Royal Astronomical Society},
         year = "2019",
        month = "Apr",
       volume = {484},
       number = {4},
        pages = {4683-4694},
          doi = {10.1093/mnras/stz333},
archivePrefix = {arXiv},
       eprint = {1810.12913},
 primaryClass = {astro-ph.GA}
 }

galaxy-cnns's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  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.