StingraySoftware / stingray

Anything can happen in the next half hour (including spectral timing made easy)!
https://stingray.science/stingray
MIT License
176 stars 144 forks source link

A quicklook dashboard with Stingray #794

Open matteobachetti opened 10 months ago

matteobachetti commented 10 months ago

When analyzing a new astronomical dataset, it is often convenient to have some quicklook visualization with basic information. For X-ray astronomy, the usual information is a light curve (a time series showing the flux of the source), a periodogram, spectral colors (the ratio of fluxes in different energy bands of the X-rays).

This project leverages Stingray's flexibility to create a quicklook dashboard with basic interactivity. The principle is simple: given an event list, one calculates a light curve, a power spectrum with default options, maybe a Lomb-Scargle periodogram, color-color or HID diagrams, maybe power-color and color hue-rms diagrams. It should be somewhat configurable, so that one can apply a set of custom options to a series of observations with ease.

Each plot kind should be a separate plugin, with configurable options. The dashboard should display the plugins that the user requests with a custom JSON configuration file.

The dashboard could work as an interactive visualization web page (just for zooming in and out), or just make a PDF or image with the plots.

A bonus could be making it the start for an interactive analysis interface (not just plotting, but also recalculate the quantities with different parameters and refresh the plots)

kr-2003 commented 9 months ago

@matteobachetti I am interested in doing this project. Can you guide me through this?

kr-2003 commented 9 months ago

We can start with the tech stacks that can be used for building the dashboard.

matteobachetti commented 9 months ago

To my understanding, there are two main candidate libraries with sufficient maturity: plotly/dash and bokeh, but if you know about other libraries your opinion is welcome. A cost/benefit analysis can be part of the GSoC proposal

kr-2003 commented 9 months ago

Certainly. Let me familiarize myself with this repository first. By the way, do you have any slack channel for communication?

matteobachetti commented 9 months ago

We have a slack badge in the README!

AnonymousCodes911 commented 9 months ago

Greetings! @matteobachetti,

I am intrigued by this project and have always wanted to learn more about astronomy and data science. This project offers the best of both worlds, therefore I would love to work on it. I will really appreciate being guided towards my first PR. However, I have some questions about this project:

  1. How do you plan to ensure that the dashboard is flexible and configurable, allowing users to apply custom options to different observations with ease?
  2. Can we also explore seaborn/grafana or streamlit libraries, or should we stick to plotly/dash and bokeh?
  3. How will we integrate the dashboard into existing data analysis pipelines? Are there any specific deployment considerations or requirements we should be aware of?
  4. Can we start by designing a basic Figma representation of the dashboard? and then code it as per our requirements?

Thank you for your time and consideration.

matteobachetti commented 9 months ago

@AnonymousCodes911 quick answers:

  1. My best bet would be a configurable JSON/YAML file containing all non-default parameters, but I'm happy to evaluate better options
  2. As I said, if there are alternative options we can certainly explore them.
  3. The dashboard should be easy to call as a script/command line for standalone use, and from the API to be integrated elsewhere. There are no specific requirements (e.g., existing infrastructure in which the dashboard should be plugged in)
  4. I had never heard about Figma 😅 but sure, whatever is your workflow, write it in your application.

In general, there can be a thousand different approaches to the task. Your proposal should show that your workflow, whatever that is, will help achieving the goal.

AnonymousCodes911 commented 9 months ago

Greetings @matteobachetti, ! Thank you so much for these answers. Further, (1)are there some objectives (first PR) that we need to cover before we create our proposal? In your opinion, (2)what would be some good first issues to understand more about the codebase?

Thank you for your time.

matteobachetti commented 9 months ago

1) There should be a PR in one of our main repositories (stingray, HENDRICS, notebooks), or one of the Openastronomy participants (astropy, sunpy, etc.), yes 2) One thing that is not in the Issues but it is very useful: run the notebooks in the notebooks repository with the git version of the code and test whether all notebooks work as expected. There will surely be something not working anymore. You might start from the ones that did not receive an update in the last year. I will actually open an issue about it, so that you can link to that.

AnonymousCodes911 commented 9 months ago

Sure thing!, Thank you!

kartikmandar commented 9 months ago

Hello @matteobachetti, When discovering the stingray child repos, I came across DAVE. So what we are trying to do with Quicklook dashboard is something like DAVE lite? Why was DAVE shutdown and why does it still not work?

capy-on-caffeine commented 8 months ago

Hi @matteobachetti , I'm interested to work on this. Just for clarification, what you're expecting is a webpage where we upload the data and it displays the results? Or is it something like, change a configurable json according to needs -> run shell command -> webapp opens?