Giter Club home page Giter Club logo

light_curve_temp_profile's Introduction

Light_Curve_Temp_Profile

Tekano Mbonani

System Docs ๐Ÿ“ƒ

A Python code for fitting time-series data with variability, in this case the flux variability of light-curves to extract flux rising and falling times. This is a public repository containing the project I developed for fitting the light-curves data points with exponential functions, in order to determine the temporal profiles of the variability. The goodness of the fit is assessed via the normalized Chi-squared of the model and data points.

Software Requirements ๐Ÿ”Œ

You will need to install the following software on your system in order to run/edit the Python script.

  • Mac OS/ Ubuntu 18.04 OS
  • Python 3.7
  • Textedit/ IDE - spyder or jupyter-notebook
  • Python libraries
    • Numpy
    • Matplotlib
    • Scipy

About the Data ๐Ÿ’พ

The data used here was obtained from the Fermi Large Area Telescope (LAT) made available to the research public on https://fermi.gsfc.nasa.gov/ssc/data/analysis/scitools/. The data comprise of gamma-ray (0.1-300 GeV) integral flux and photon energies from the blazar 3C 279, between February 16 and April 22, 2017. The data was analysed by myself, following standard unbinned likelihood methods, with standard Fermi science-tools.

Profile Model ๐Ÿงฎ

The fitting model is build with the following exponential function:

$F(t) = F_{c} + 2F_{0} \left( e^{\frac{t_{0} - t}{t_{r}}} + e^{\frac{t - t_{0}}{t_{f}}} \right)^{-1}$,

where $F_{c}$ is a constant baseline flux, $F_{0}$ is a profile amplitude, $t_{0}$ is the approximate maximum time, $t_{f}$ and $t_{r}$ are the profile rise and fall times. The code can fit time-series data with profiles as many as there are in the variability, then combine them with $F_{c}$. The user must provide the code with initial, guess paramaters for the profile to be fit, the user must provide all the $F_{c}$, $F_{0}$, $t_{0}$, $t_{f}$, $t_{r}$ parameters.

Code Output ๐Ÿ“ˆ

When run, the code will produce a visualization of the fitted time-series, as well as the optimized output parameters from scipy.optimize, see below. Additionally, the code makes use of the output rise and fall times to determine the skewness of the exponential profile and flux doubling times, i.e.,

$t_{d} = 24ln(2)t_{r}$ (hrs).

Additionally, the code calculates the Chi-Squared from the model and time-series data points. The Chi-squared is devided by the number of degrees of freedom in the model to determine the normalized Chi-squared. The visualization shows the flux variability as well as the gamma-ray energy that escaped during the flare, the pair of results can be used to determined the gamma-ray emission Doppler factors, the sizes of the gamma-ray emission regions, and their distances from the super-massive black hole of 3C 279.

light_curve_temp_profile's People

Contributors

t3kan0 avatar

Stargazers

 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.