Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Created on Tue Sep 30 14:20:54 2014 | |
@author: tillsten | |
""" | |
import cassowary # can be installed via pip, pure python. | |
import matplotlib.pyplot as plt | |
import matplotlib.textpath |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "SVD on data with a peak-shift" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
This modul build a kinetic matrix from given transtions between | |
compartments. | |
""" | |
import sympy, cython | |
import numpy as np | |
class Transition(object): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import random as r | |
import matplotlib.pyplot as plt | |
def layers(n, m): | |
'function to generate some data' | |
def bump(a): | |
x = 1 / (.1 + r.random()) | |
y = 2 * r.random() - .5 | |
z = 10 / (.1+ r.random()) | |
for i in range(m): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make test data | |
t=np.linspace(0,20,200) | |
decays = np.array([2.3,9]) | |
x=np.linspace(-1,1, 32) | |
amp1 = 10*np.exp(-(x+0.5)**2/0.3) | |
amp2 = -8*np.exp(-(x-0.5)**2/0.4) | |
amps=np.column_stack((amp1,amp2)) | |
d=amps.dot(np.exp(-t/decays[:,None])) | |
#Add Noise |
NewerOlder