GithubHelp home page GithubHelp logo

astrojacobli / mrf Goto Github PK

View Code? Open in Web Editor NEW
17.0 4.0 8.0 45.01 MB

Multi-Resolution Filtering: a method for isolating faint, extended emission in Dragonfly data and other low resolution images

License: MIT License

Python 100.00%

mrf's Introduction

MRF: Multi-Resolution Filtering

Multi-Resolution Filtering: a method for isolating faint, extended emission in Dragonfly data and other low resolution images.

Documentation

Please read the documentation and tutorial at https://mrfiltering.readthedocs.io/en/latest/.

Applications

  • Subtract compact objects from low-resolution images (such as Dragonfly) to reveal low surface brightness features.
  • Characterize and subtract stellar halos in Dragonfly image.
  • Download corresponding high resolution image (HSC, CFHT) of given Dragonfly image.

Examples

This example shows the tidal feature of NGC 5907, described in van Dokkum et al. (2019). The images presented there used this algorithm. Full resolution Dragonfly images and MRF results can be found here. Check this notebook for more details in how to do MRF using this Python package! ๐Ÿš€

MRF on NGC 5907

This example shows how powerful MRF is in revealing low surface brightness features. The ultra-diffuse galaxy M101-DF3 is revealed by MRF after subtracting compact objects and bright star halos according to van Dokkum et al. (2019). Check this notebook for more details.

MRF on M101-DF3

You can also use this script to run the MRF task. Take NGC 5907 as an example:

python mrf-task.py n5907_df_g.fits ngc5907_cfht_g.fits ngc5907_cfht_r.fits ngc5907-task.yaml --galcat='gal_cat_n5907.txt' --output='n5907_g'

Installation

mkdir <install dir>
cd <install dir>
git clone [email protected]:AstroJacobLi/mrf.git
cd mrf
python setup.py install

If you don't have git configured, you can also download the zip file directly from https://github.com/AstroJacobLi/mrf/archive/master.zip, then unzip it and install in the same way.

To test whether mrf is installed successfully, import mrf in Python:

import mrf, os
print(os.path.isfile(os.path.join(mrf.__path__[0], 'iraf/macosx/x_images.e')))

True means you have installed mrf successfully! Bravo!

You must have galsim installed in advance. You will also need unagi to download HSC images. Python>=3 is needed, but you can try whether mrf still works under python2. Check out the dependence of mrf depends from requirements.txt.

Citation

mrf is a free software made available under the MIT License by Pieter van Dokkum (initial development) and Jiaxuan Li (implementation, maintenance, and documentation). If you use this package in your work, please cite van Dokkum et al. (2019).

Acknowledgment

Many scripts and snippets are from kungpao (written by Song Huang). Qing Liu (U Toronto) provided very useful functions for constructing wide-angle PSF, Johnny Greco kindly shared his idea of the code structure. Roberto Abraham found the first few bugs of this package and provided useful solutions. Here we appreciate their help!

This package makes use of numpy, scipy, matplotlib, Astropy, sep, SWarp, GalSim, Photutils, reproject, IRAF, STSDAS. We thank the authors of these tools for their great efforts.

Copyright 2019 Pieter van Dokkum and Jiaxuan Li.

mrf's People

Contributors

astrojacobli avatar cgilhuly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mrf's Issues

urllib Redirect 308 Error

mrf/mrf/download.py

Lines 277 to 280 in 22e7e65

if layer == 'dr8-north':
URL = 'http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr8/north/coadd/{0}/{1}/legacysurvey-{2}-image-{3}.fits.fz'.format(brickname[:3], brickname, brickname, band)
else:
URL = 'http://portal.nersc.gov/project/cosmo/data/legacysurvey/dr8/south/coadd/{0}/{1}/legacysurvey-{2}-image-{3}.fits.fz'.format(brickname[:3], brickname, brickname, band)

In download_decals_brick, urllib throws a 308 error. Changing http://portal.nersc.gov to https://portal.nersc.gov appears to solve the issue.

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.