-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlcsfGtest.py
More file actions
37 lines (30 loc) · 1 KB
/
lcsfGtest.py
File metadata and controls
37 lines (30 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from numpy import *
from lcspot import *
from lcgenerate import *
import lcsinglefit
import lcsinglefitG
import sys
def main():
isteps = int(sys.argv[1]) # def 20-30
nclusters = int(sys.argv[2]) # def 20-30
threshratio = float(sys.argv[3]) # def 2.0
noisefac = float(sys.argv[4]) # def .002
meths = ('Nelder-Mead', 'Powell', 'CG', 'BFGS', 'Newton-CG', 'Anneal')
phase, intesity, tparams = genrandlc(noisefactor=noisefac)
print 'true parameters', tparams
print
print 'L-M :'
print
paramsets = lcsinglefit.vincfit((phase,intesity),[],isteps,nclusters,threshratio,plsprint='all',plsplot=False)
pdists = [paramdist(fps,tparams) for fps in paramsets]
print pdists
print
for meth in meths:
print meth, ':'
print
paramsets = lcsinglefit2.vincfit((phase,intesity),[],isteps,nclusters,threshratio,meth,plsprint='all',plsplot=False)
pdists = [paramdist(fps,tparams) for fps in paramsets]
print pdists
print
if 'lcsf2test.py' in sys.argv:
main()