Feature: correlated time series#973
Open
SethHtes wants to merge 13 commits intoStingraySoftware:mainfrom
Open
Conversation
…ingray simulator model strings; theoretical std feature removed; docstrings reformatted to match Stingray standards
…ethods, and errors
…se not implemented
…sSpectrumSimulator
…SethHtes/stingray into features/correlated-time-series
Member
|
@SethHtes thanks for your PR. A simulator lilke this is really useful, and a great addition to stingray! Would you mind sending me the draft paper at name . surname at inaf.it?
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for simulating pairs correlated time series with user-specified cross spectral properties
Implementation
Adds a new class
CrossSpectrumSimulatortostingray.simulator. This class subclasses the stingray.simulator.Simulator class and retains most of the same parameters. The main addition is inCrossSpectrumSimulator.CS_simulate, which allows for the specification of two power spectrum shapes and cross spectral information. It then returns twostingray.Lightcurveinstances which have the specified power spectral shapes and cross spectral information.This is done via extension to the widely used Timmer and Koenig implementation of simulating time series which is currently implemented in stingray.
CS_simulatesupports specifying power spectral information by power law index, pre-defined model, user-provided spectrum, or stingray model string, much likestingray.simulator.simulate().Cross-spectral information can be specified in much the same way, either by providing a phase lag profile and coherence profile or by providing a real and imaginary part of the cross spectrum.
Tests
Tests for the new class can be found under
TestCrossSpectrumSimulatorinstingray.simulator.testsOther notes:
The full derivation of this method is described in a paper I have submitted and which is currently under review in RASTI. I am happy to provide a draft copy upon request.