Code Monkey home page Code Monkey logo

trajectories.jl's Introduction

Trajectories

A trajectory in the sense of this package is a vector of time points t and a corresponding vector of spatial points x, which are though as locations x[i] of an object at times t[i].

A key decision which has to be made for a time series object, is whether iteration is used to iterate values, pairs or is leveraged for destruction. See issue #1. At the moment, all iteration and destructuring is explicit.

To iterate values xᵢ, pairs (tᵢ, xᵢ) or components (t, x), use values, pairs or Pair

tᵢ in keys(X)
xᵢ in values(X)
(tᵢ, xᵢ) in pairs(X)

t, x = Pair(X)

A second key decision is what constitutes indexing. Also here this package is agnostic: Only key look-up with get is implemented so far.

Trajectories support Tables.jl with columns being a named tuple (t = X.t, x = X.x).

trajectories.jl's People

Contributors

mschauer avatar github-actions[bot] avatar

Stargazers

ebigram avatar Felix Kastner avatar Chad Scherrer avatar Cédric St-Jean avatar Carl Morris avatar Yakir Luc Gagnon avatar

Watchers

James Cloos avatar Felix Kastner avatar  avatar Marcin Mider avatar  avatar

trajectories.jl's Issues

Interpolation

Thanks Moritz for this!

Interpolation is a huge subject, I understand your choices (Left, Right, and Linear), but it might be better to use the Interpolations.jl package for this kind of work? Alternatively, you could make sure it works in Interpolations.jl, show an example, but exclude the code from your package to keep it light...

Interpolations in trajectories is tightly coupled with smoothing as well: if you want to interpolate you might want to smooth as well. So you can see how this becomes much larger (with splines or a Kalman filter). I think you might run the risk of including everything but the kitchen sink... So again, it might be better to include an example with Dierckx and your Kalman filter, but exclude the actual packages from your dependencies.

Just some thoughts.

Destructuring and iteration

In Julia, destructuring defaults to iteration.

Unfortunately that means

t, x = X

and

collect(X) = [t1 => x1, t2=>x2]

or collect(X) = [x1, x2, ...] cannot coexist. Current workaround is to demand explicit

t, x = Pair(X)
collect(pairs(X))
collect(values(X))

Tag a release? (Compat with Tables 1.0)

I am planning to use Kalman.jl in a project which uses Tables.jl v1.0, and the released version of Trajectories.jl prevents that from being installed.

(Works with #master installed)

Scope of `@unroll1`

The @unroll1 macro does not introduce a new scope. Example:

function only(x)
    Trajectories.@unroll1 for z in x
         if !$first
               throw(ArgumentError("too many elements"))
           end
    end
    return z
end

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.