##in bash shell on ds machines: source /utils/anaconda-setup.sh

import eROSITA_LS

## eSASS LC file, mandatory input parameter (output from SRCTOOL)

lcfil="sine_am0.497_pe5.9_040_LightCurve_source_1.fits"

##optional period search input parameters (default: pe_min=0.4,pe_max=11.0,nper=1e5)
pe_min=0.6
pe_max=12.
nper=2e5

#evaluation of confidence levels, optional (default: "yes")
with_cl="yes"

#nb of simulations for CL measurements when with_cl="yes", optional  (default: 100)
nbsim=100  

bestper,std,zzz=eROSITA_LS.eLS(lcfil,pe_min=pe_min,pe_max=pe_max,nper=nper,with_cl=with_cl,nbsim=nbsim)

print 'Best period (s):', bestper
print 'std of gaussian (s):', std
print 'Confidence levels:',zzz
