GithubHelp home page GithubHelp logo

mgomezastro / photfit Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 472 KB

Photometry fitting (photFit) package. This package fit the spectral energy distribution (SED) of one and two body system using a theoretical atmosphere model, using a handfull of photometric bands, for hot and cool stars.

Python 100.00%
astronomy-astrophysics

photfit's Introduction

photFit

Photometry fitting python pckage. This package is intended to fit the spectral energy distribution of any one- or two-body system using a theoretial atmopshere models, for a plenty of photmetric bands, of hot and cool stars (e.g., TLUSTY, NEXTGEN, etc...). It also includes a visualization tool to inspect the best fitting parameters (TODO).

Usage

This is a main.py example.

import numpy as np
from sedfit import FitSED, estimate_ML

mags = np.asarray([19.854, 21.4608, 20.18, 20.27, 20.58, 20.26])
merr = np.asarray([0.157, 0.2887, 0.03, 0.05, 0.12, 0.09])

fs = FitSED(mags=mags,
            err_mags=merr,
            passbands=["GALEX_GALEX.FUV",
                       "GALEX_GALEX.NUV",
                       "INT_WFC.Gunn_g",
                       "INT_IPHAS.gR",
                       "INT_IPHAS.Ha",
                       "INT_IPHAS.gI"],
            kernel_model="indexes",
            pn_name=object_name))

# Initial values
pars, mod = fs.prepare_run(thot=90000., tcool=7500., is_binary=True, vary_ebv=True, ebv=0.2, ebv_p=[0.0, 0.62], beta=10.)

res1 = fs.run_fit(pars, mod, emcee_kws=dict(steps=7000, burn=500, nwalkers=100, progress=True, workers=5), use_weights=True)

best_res = estimate_ML(res1)

This will print the best fitting values as well as the ML estimation.

Available kernels

  • Indexes

where . This definition is for a two-body SED in the colour A-B filters. In case of one star .

  • Pogson

where , with D the distance to the star.

To do list

  • Creating a githug repository.
  • First release.
  • Adding a visualization tool.
  • Refactoring.
  • Public the first release.

photfit's People

Contributors

mgomezastro avatar

Stargazers

 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.