Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for time series #27

Open
PierreRaybaut opened this issue Jan 8, 2024 · 3 comments
Open

Add support for time series #27

PierreRaybaut opened this issue Jan 8, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@PierreRaybaut
Copy link
Contributor

DataLab currently supports 1D signals (curves) and 2D images. It would be interesting to add support for timeseries (1D signals with a time axis).

This would require to add:

  • A new 'Time series' panel in the main window,
  • And a new TimeSeriesObj class in the data model.

With this new feature, it would be possible to display and process timeseries, and to save them in HDF5 files.

The question is: are there enough use cases to justify the development of this feature?
If you think so, please let us know by adding a comment to this issue.

@PierreRaybaut PierreRaybaut added the enhancement New feature or request label Jan 8, 2024
@aspitarl
Copy link

My group analyzes time-series experimental data and I have been scoping out DataLab recently. Amazing project!

I think with time-series support we would be able to use DataLab in our analysis. We are often analyzing data by defining a group of time-based ROIs which are used to chop up data and do further analysis. Often, these ROIs correspond to a window of time our experimental system was brought to a given 'test case', and often I take the average of the independent variable time-signals during these time windows and assign them as xarray coordinates. See slide 14 here for a published example result.

I've actually written a simple pyqt-based program to edit/define these ROIs interactively and output a CSV representation (event name, start time, stop time) which is then loaded into other python scripts for automated analysis. Being able to do something similar in Datalab (and take advantage of the rest of the platform) would be great.

  • Pull in time-series data and define time-based ROIs
  • Export the ROIs to a CSV
  • Being able to easily scan around, zoom in/out in time to explore the history. I use pyqtgraph for plotting and the interactive scroll wheel/drag functionality along the axis is really great for this.

I made a quick fork of DataLab and started playing around with altering the loading functions be able to load in a csv file with a timestamp column (see here). This was just hacky experimenting out of curiosity and to learn about the datamodel a bit (vs intending to contribute), but just sharing FYI. I was able to load the data into the normal SignalObj class with the x axis converted to integer timestamp.

@PierreRaybaut
Copy link
Contributor Author

Thanks for your kind words on DataLab and for taking time to assess the project.

The good thing about this new "time series" feature is that it could be implemented almost independently from the rest of the project. Of course it would probably require some adaptations on the current data model to be able to derive from it and implement the TimeSeriesObj class, but apart from this, the new "Time series" panel and view would be easy to implement one step at a time.

So, if you're interested in this feature, maybe I could start a basic implementation to show how I would do it for a smooth integration in the current infrastructure.

@aspitarl
Copy link

Great. Yes, I'm interested in this feature and happy to test it out once you've made the basic infrastructure. I've got DataLab running through VS Code as well by the way. The approach you outline sounds great to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants