# Set up the path to SModelS installation folder
import sys,os
sys.path.append(".")
import smodels_paths
from smodels.tools.interactivePlots import makePlots
import smodels
smodelsOutput = os.path.join(os.path.dirname(smodels.__file__), '../inputFiles/scanExample/smodels-output')
slhaFiles = os.path.join(os.path.dirname(smodels.__file__), '../inputFiles/scanExample/slha')
parameters = os.path.join(os.path.dirname(smodels.__file__), '../iplots_parameters.py')
outputFolder = './iplots'
npoints = -1 #If negative will use all the points in the folders
plotsOutput = makePlots(smodelsOutput,slhaFiles,outputFolder,parameters,npoints,verbosity='info')
from IPython.core.display import display,HTML
#Main page (to open the plots go to the plots output folder and open them with the browser)
mainFile = open(plotsOutput + '/index.html','r')
display(HTML(mainFile.read()))
mainFile.close()