initial commit, draft
This commit is contained in:
commit
a39eb6d870
5 changed files with 195 additions and 0 deletions
19
lib/reliability.py
Executable file
19
lib/reliability.py
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env python3
|
||||
import numpy as _np
|
||||
|
||||
C_YEARS_TO_BLN_HOURS = (365.24 * 24) / 1_000_000_000
|
||||
|
||||
def to_fits(reliability, time_yrs=5):
|
||||
time_hrs = time_yrs*C_YEARS_TO_BLN_HOURS
|
||||
return _np.log(reliability)/-time_hrs
|
||||
|
||||
def to_rel(FITs, time_yrs=5):
|
||||
time_hrs = time_yrs*C_YEARS_TO_BLN_HOURS
|
||||
return _np.exp(-time_hrs * FITs)
|
||||
|
||||
def to_urel(FITs, time_yrs=5):
|
||||
time_hrs = time_yrs*C_YEARS_TO_BLN_HOURS
|
||||
return 1-_np.exp(-time_hrs * FITs)
|
||||
|
||||
from_fits=to_rel
|
||||
from_rel=to_fits
|
Loading…
Add table
Add a link
Reference in a new issue