Giter Site home page Giter Site logo

kevin218 / least_asymmetry Goto Github PK

View Code? Open in Web Editor NEW

This project forked from natelust/least_asymmetry

0.0 1.0 0.0 1.52 MB

This code is to find the center of a distribution of light in an image using the least asymmetry method. The code also contains center of light and fitting a Gaussian routines as well. All functions are designed to take optional weights

License: Mozilla Public License 2.0

Shell 0.17% Python 7.37% C++ 92.46%

least_asymmetry's Introduction

Least asymmetry

This is a python module for calculating the center of distributions using the method of determining the point of least asymmetry. A description of the algorithm can be found in the docs directory. The description is a stub of a paper demonstrating its use for astrophysical measurements found here.

This module may either be used directly from a clone by running the ./build.sh script to build the c++ extension, or by using the setup.py file to install the module into the site packages directory. The actr routine itself is accessible from the module itself, or from the asym.py file. As a side effect of how the routine works, this module also provides centering by fitting a gaussian (fitgaussian) or finding a weighted average (col) and can thus be used as a general centering package

Module level Example:

# create a demo image
import numpy as np
indy, indx = np.indices((30, 30))
gaus = a.gaussian(15, 14.5, 14.5, 3, 3, 0)
image = gaus(indy, indx)

noise = np.random.normal(0, 2, len(image.flatten()))
noise = noise.reshape(image.shape)
nimage = image+noise

# Use the routine
import least_asymmetry as a
center = a.actr(nimage, [14,14])[0]

least_asymmetry's People

Contributors

exowanderer avatar kevin218 avatar natelust avatar rychallener avatar

Watchers

 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.