-
-
Couldn't load subscription status.
- Fork 114
Description
Is your feature request related to a problem? Please describe.
I'm currently maintaining a Timeseries <: AbstractDiffEqArray object in my scripts that sometimes collides with what is already provided. For example, DiffEqArray has this opaque name, it's not interpolable, etc. Interpolation objects in SciMLBase use different fields than the InterpolationData in OrdinaryDiffEq.
I feel like there is a need for a standard way to handle (time) series in the SciML ecosystem. ReservoirComputing.jl could use something like this to handle its output, and I'm sure there are other packages that would need it.
Describe the solution you’d like
My proposal is the following.
-
Introduce an
AbstractSeries <: AbstractVectorOfArraythat expects two fields,u,t. Done byAbstractDiffEqArray. -
Rename
AbstractDiffEqArrayto something more generic likeAbstractSeries. -
Require defining
interpolable(::Type) = false/truefor types derived, and define a fallback that errors(ts::AbstractSeries)(t::Number) = error("Interpolation not defined for $(typeof(ts))")
-
What if often used in SciML for interpolation is having a field in the type that holds interpolation information: a cache that usually contains
u, tplus some required parameters. Standardize interpolation cache creation by creatingAbstractSeriesInterpolationthat expects at least the fieldsu,t, replacingAbstractDiffEqInterpolation. -
Provide a unified package for creating the caches from
u, t, merging DataInterpolation and the routines already inside SciMLBase (for Linear and Hermite interpolations). Define also methods for creating interp objects fromu, t, duthat will be used by DifferentialEquation, to decouple further. -
In DifferentialEquations have
interpolationDatabe<: AbstractSeriesInterpolationand have the standard fields. -
Provide
MakieExtroutines to plot the series object appropriately, similar to what is already in place.
Optionally:
- Provide
SubSeries <: AbstractSeriesobject andseriesview(s::AbstractSeries, idxs...)and maybeseriesview(s::AbstractSeries, tspan)to create it. It acts like aviewbut for the series object. This is something I would need often, as I'm always working with large series. It would also streamline plotting.
Additional context
I described my problems in more details in SciML/OrdinaryDiffEq.jl#2750 and SciML/RecursiveArrayTools.jl#415. I intend to merge everything into this issue here, and hopefully describe what I would like fully.
I can't work on this alone in terms of time, expertise and sheer size. Everytime I want to open a PR to change a component, i find that it's interconnected with dozens of other packages. If you find this useful and are a developer of SciML, please let me know what could be a start to this.