Last active
June 22, 2016 23:31
-
-
Save ozansener/cecb8a967a875d99d52d0b0a95598055 to your computer and use it in GitHub Desktop.
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 | |
def get_turn_off(alpha): | |
cycle_cnt = (numpy.log(0.4) / numpy.log(1 - alpha) ) | |
return (cycle_cnt * 50)/ (1000 * 60) | |
def get_alpha_from_cut_off(cut_off): | |
alpha = 1 - numpy.exp(numpy.log(0.1) / ((float(cut_off) * 60 * 1000) / float(50))) | |
return alpha | |
cut_off = 10 | |
alpha = get_alpha_from_cut_off(cut_off) | |
print get_turn_off(alpha) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment