Code Monkey home page Code Monkey logo

l1periodogram's Introduction

l1 periodogram

This repository contains a Python implementation of the l1 periodogram as described in Hara, Boué, Laskar, Correia 2017, MNRAS, Vol. 464, Issue 1, p.1220-1246, with a few more features. please cite this paper if you are using the code.

Description

The l1 periodogram is designed to search for periodicities in unevenly sampled time series. It can be used similarly as a Lomb-Scargle periodogram, and retrieves a figure which has a similar aspect but has fewer peaks due to aliasing. It is primarily designed for the search of exoplanets in radial velocity data, but can be also used for other purposes.

The principle of the algorithm is to search for a representation of the input signal as a sum of a small number of sinusoidal components, that is a representation which is sparse in the frequency domain. Here, "small number" means small compared to the number of observations.

The code is based on the Basis Pursuit minimization problem (Chen & Donoho 1998). In the present code, the Basis Pursuit problem can be solved with

  • The LARS algorithm (Efron, Hastie, Johnston, Tibshirani, R. 2004, Ann. Statist., Volume 32, Number 2, 407-499.)
  • The gglasso algorithm (Yang & Zou 2014. Statistics and Computing. 25(6), 1129-1141.) To use the latter, run the following command in the l1periodogram_codes folder.
python -m numpy.f2py -c gglasso.f90 -m gglasso_wrapper

When using a notebook, restart the kernel after running this command.

Necessary inputs

The mandatory inputs are:

  • A time series
  • The epochs of observation of the time series
  • A covariance model for the noise.

The other parameters are set by default, the most critical ones are:

  • The maximum frequency of the frequency grid
  • The unpenalized vectors: linear predictors that are known to be in the data (like offsets, trends, activity models).

Getting started

Download the l1periodogram repository onto your local computer. The notebook l1_periodogram_tutorial_I.pynb will walk you through the different features of the code. The notebook l1_periodogram_tutorial_II.pynb gets deeper into the details of what the code does.

You will also find a notebook dedicated to reproducing the results of Hara, Bouchy, Stalport, Boisse et al. 2020, A&A, 636, L6, called l1_periodogram_HD158259_analysis.ipynb

Credits

Written by Nathan C. Hara, with contributions from Alessandro R. Mari

l1periodogram's People

Contributors

nathanchara avatar kamuish 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.