项目作者: jradavenport

项目描述 :
How to generate a stellar Flare Frequency Distribution, and its uncertainties
高级语言: Python
项目地址: git://github.com/jradavenport/FFD.git
创建时间: 2019-10-25T22:13:36Z
项目社区:https://github.com/jradavenport/FFD

开源协议:MIT License

下载


FFD

How to generate a stellar Flare Frequency Distribution, and its uncertainties

ffd package example

Example

A basic example of how to make the cumulative Flare Frequency Distribution plot, with both contours from the Gaussian kernel density estimation, and the standard scatter plot. You should already have detected your flares and computed their durations (used in the S/N estimation of the event energies) and the equivalent durations (integral of the flare in zero-registered relative flux).

  1. from FFD import ffd, FlareKernel
  2. x,y,xe,ye = FFD(EquivDur, dur=Tstop-Tstart, Lum=30.35, TOTEXP=50.4,
  3. fluxerr=np.median(fluxerr)/np.median(flux))
  4. im, xx, yy = FlareKernel(x,y,xe,ye)
  5. plt.contour(xx, yy, im)
  6. plt.errorbar(x,y, xerr=xe, yerr=ye)
  7. plt.xlabel('log Energy (erg)')
  8. plt.ylabel('log Flare Rate (day$^{-1}$)')