stingraysoftware / notebooks Goto Github PK
View Code? Open in Web Editor NEWTutorial notebooks for Stingray
License: MIT License
Tutorial notebooks for Stingray
License: MIT License
We should make up some docs to show the cospectra significance.
I was looking for the docs for the FAD, and couldn't find either docs nor a notebook, which I think would be useful to add. Or did I miss it somewhere? cc @matteobachetti
We should make sure the notebooks still run, and make sure that any new functionality is implemented, before we release a new version of Stingray
On line 600, the .cs attribute is used instead of .power to calculate the time lag.
e.g. It should be:
lag = np.angle(cross.power)/ (2 * np.pi * cross.freq)
instead of:
lag = np.angle(cross.cs)/ (2 * np.pi * cross.freq)
as it currently is.
Hey guys, just following up on something I spoke to Abbie about. A lot of high energy data has regular gaps due to Earth Occultations and such, I'd love it if there was a feature to account for this, or just a tutorial on how to deal with the gaps so the X-ray folks can still easily do FFTs on their data.
An example: NuSTAR data has regular Earth Occultation gaps, but apart from that, I generally just bin my data evenly - 1s time bins for example. I can just run this data through powspec and it just ignores the gaps (GTIs are in NuSTAR light curves as a separate fits extension, so I think it picks up on that) and does the power spectrum. However, I hate powspec, and want to move to python to have more control over my timing analysis, Stingray is the perfect answer, but it would be nice to be able to deal with gaps if possible :)
Great work on Stingray by the way, it's a really nice set of tools!
We should have a test that compiles the notebook into the Stingray documentation, to check if there are inconsistent titles or other problems that make the sphinx build fail.
Any ideas?
It might be useful to add a Binder integration for this repo so that people can run some code interactively without having to install it locally?
See also https://mybinder.org
When we commit changes with some edits in the notebook, the notebooks tend to generate plots with unnecessary changes in the output, thus flooding the git diff
. This makes it hard to review the changes we initially made.
There is no tutorial notebook for the Covariancespectrum
class! This should get fixed ASAP, but I don't feel qualified to do it myself, because I don't really work with covariance spectra. Any takers?
The cross_correlation_notebook has some error in the code that I am having difficulty understanding. In the Another Example section of the notebook.
The cs = CrossCorrelation() has no input lightcurves.
As a result when the cs.cal_timeshift(dt=0.5) method is invoked it gives the error:
AttributeError: 'NoneType' object has no attribute 'counts'
This maybe because Lightcurve objects are not defined within the cs CrossCorrelation object, resulting in NoneType objects.
I tried using the previously defined lc1 and lc2 lightcurves as input for the CrossCorrelations object.
That worked fine but it gave a timeshift of -4.8125 which is way different than what the notebook shows presently. It created doubts on whether I should do that or not?
Also afterwards when plotting cs, it output an error saying that the dimensions of the self.time_lags and self.corr arrays are not compatible for plotting. They should have the same first dimension, but in this case, they have different shapes: (320) for self.time_lags and (10) for self.corr.
The DynamicalPowerspectrum_tutorial_[real_data]
notebook uses a data file emr_cleaned.fits
that doesn't seem to be part of the repo? If we use data in the notebooks, we should probably keep that data somewhere accessible (in stingray.sampledata
, in this notebook, on Zenodo, somewhere else, ...).
Someone should do an audit of the notebooks and the data files they use, and then make sure all the data is there. My preferred option would be to have a few data sets accessible via stingray.sampledata
or whereever that one GRS 1915 light curve is, but I'm open to other suggestions.
the arrays ps.freq
and res.mfit
have different lengths, thus while running they return ValueError.
After StingraySoftware/stingray#502, we need to add a notebook to show how to load data in Stingray.
I'm poking around the pulsar functionality in stingray, and I realized that with the latest updates, fold_detection_level
has moved from stingray.pulse.pulsar
to stingray.stats
, so that notebook needs an update.
Given the new astropy 4.0 interface to models, I think we need to update both code and docs to run with the new astropy.
The docs check on the GPTool pull request is complaining because of what it considers a broken link, with the following error message:
Warning, treated as error: /home/runner/work/stingray/stingray/docs/notebooks/Spectral Timing/Spectral Timing Exploration.ipynb:233:broken link: https://ui.adsabs.harvard.edu/abs/1992ApJ...391L..21M/abstract (404 Client Error: NOT FOUND for url: https://ui.adsabs.harvard.edu/abs/1992ApJ...391L..21M/abstract)
I don't know if that's a real issue or GitHub Actions doing something weird, but noting it here for future investigation.
This requires a binary pulsar data set which we currently don't have, so this is just a reminder that some time, we should add the new code in PR #255 in the Stingray repo to the notebook.
I've seen notebooks compiled as documentation in a few places recently (e.g. here). This might be a useful thing to do for Stingray, make sure we don't duplicate work (writing both the notebooks and then basically the same again in the docs) and fix one of the comments by the astropy people (that we currently only have fairly barebones API docs).
Comments? Thoughts?
Or maybe it's included somewhere in the PR and I missed it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.