Giter Club home page Giter Club logo

pyzogy's Introduction

PyZOGY

PyZOGY is a Python implementation of the image subtraction algorithm published by Zackay, Ofek, and Gal-Yam. The algorithm requires two registered images and their PSF's saved as fits files. One can optionally provide masks, in fits files where every pixel is either 0 (good) or 1 (bad). Alternatively, the code will mask pixels above a user defined threshold (a number) for each image. The code fits the spatially varying background level by dividing the image into a number of stamps provided by the user; the default is 1. The image can be normalized to either the science image or the reference image.

The details of the algorithm can be found at http://iopscience.iop.org/article/10.3847/0004-637X/830/1/27/meta

If you use this code for a publication, please cite the above paper and our Zenodo DOI: DOI

Installation

Clone the repository and run python setup.py install

Usage

The code can be run from the command line or within Python

To run on the command line, type:

pyzogy --science-image "your-science-image" --reference-image "your-reference-image" --science-psf "your-science-psf" --reference-psf "your-reference-psf"

with any of the following options:

--science-mask "your-science-mask"
--reference-mask "your-reference-mask"
--science-saturation number
--reference-saturation number
--n-stamps "number"
--normalization "science" or "reference"
--gain-ratio number
--gain-mask "mask-filename"
--use-pixels
--show
--matched-filter "your-matched-filter-output"

To use in Python, type:

from PyZOGY.subtract import run_subtraction
run_subtraction("your-science-image", "your-reference-image", "your-science-psf", "your-reference-psf")

with any of the following options:

science_mask = "your-science-mask"
reference_mask = "youre-reference-mask"
science_saturation = number
reference_saturation = number
n_stamps = number
normalization = "science" or "reference"
gain_ratio = number
gain-mask = "mask-filename"
use-pixels = boolean
show = boolean
matched-filter = "your-matched-filter-output"

Dependencies

PyZOGY requires numpy, astropy, scipy, sep, matplotlib, and statsmodels

pyzogy's People

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.