Code Monkey home page Code Monkey logo

stochastic_mean's Introduction

Synopsis

Do you have a stochastic trajectory of math and need to compute math or another arbitrary math ? Then the function in this Python file will be useful for you. Estimating such an ensemble average from a time-trajectory are often used in soft-matter physics, e.g. to investigate diffusion of a particle url.

Usage

Usage is very easy. You can run an example script (which shows a Matplotlib window) by simply running the script, i.e. >>> python ComputeStochasticMean.py. For your own usage, you simply call the function

bins_out, result = compute_stochastic_mean(x,y,bins,func)

Input

Here, x is an instance of numpy.array of N elements and represents the time-like variable and y is also a numpy array of N elements and represents the coordinate-like variable (math in the above description). func is a function which takes two arguments, namely math. There are three possibilities for func pre-defined, namely the identity (url), the MSD (url) and the autocorrelator function (url).

Output

bins_out and result are a numpy array of length len(bins)-1 since the last bin in bins does not have a right edge (and hence we cannot bin the data for the rightmost bin).

Installation

This is a single-file script. Just download and use right away!

License

GPL. When using, please cite C.A.Miermans.

stochastic_mean's People

Watchers

James Cloos avatar Karsten Miermans avatar

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.