GSoC@Stingray: Final dash! blog#4
Hey everyone,
It is the end of the coding period of GSoC”22. This is going to be my last blog about my project.
After successfully implementing the bexvar method in Stingray (this PR). I and my mentors decided that we can now work to add bexvar as a method to Stingra’s Lightcurve class. This was not a part of my original proposal. The bexvar() method takes lightcurve data in input parameters, so it made sense to provide this facility to users. Stingray’s Lightcurve class facilitates users to create Lightcurve objects and perform several operations useful for time series analysis on them.
The Lightcurve object is created by providing two arrays ( time and counts) as input parameters. Along with these it also has several other optional parameters specifying relevant lightcurve data. Most of these parameters are also attributes of the Lightcurve class. We knew that the Lightcurve class does not have parameters like frac_exp (fractional exposer in each bin),bg_counts (background counts in each bin) and bg_ratio (background ratio in each bin) which are optional parameters of bexvar(). So to add bexvar() a method to theLightcurve class, we also included these parameters in theLightcurve class and declared them as its attributes. I started the work with this PR. However, just adding these parameters was not enough. The Lightcurve class provides some important filtering and sorting methods for Lightcurve objects. These methods did not support these optional parameters as they weren't there initially. It wouldn’t be so great if users create a Lightcurve object with all these parameters, then they may want to truncate the lightcurve or sort it or apply GTIs (Good time intervals) before calling bexvar() and the returned Lightcurve does not have these attributes. We worked on providing support for these new parameters in some of these methods.
In addition to that, the bexvar() method works on the light curves with uneven sampling. Which led us to also investigate if Stingray supports the creation of such lightcurve objects. We found that the support was not very great for such data. While there was no restriction for creating a Lightcurve class with the time resolution parameter dt being an array, many methods of the Lightcurve class did not extend support for such data. We started working on providing this support after that. This led to some serious bug fixing and restless nights but finally, we were able to reach at a point where all of the existing tests are passing.
Apart from this, I also created a jupiter notebook for a tutorial on the bexvar()method (see this PR). This contains examples showcasing how to use the implemented method and also a section on the theoretical explanation of bexvar. This notebook will also be upgraded with examples of how to call bexvar() method implemented in the Lightcurve class once that work is completed.
With this final blog, my journey through GSoC”22 comes to a happy end. You can check out my final report for this project containing rigorous details at this webpage. I will continue working with Stingray, I will continue contributing to OpenAstrnomy and other open source projects as well. I must say that GSoC has been really great it provided me the best opportunity for the beginning of my journey in the open source community. I would like to thank the OpenAstronomy organization for giving me this wonderful opportunity to contribute to open source projects for the Astrophysics community. This means a lot to me as I am one of the users of several projects of the member organizations.
I would like to thank both my mentors Matteo Bachetti and Daniela Huppenkothen for being extremely generous, supportive, and motivating mentors. I am truly grateful to have you both as my mentors.