## read spot
spotid <- 1000
y <- readspot(spotid)
## fit data
pconst <- c(g.kim=0.025, g.kmi=0.57, g.mit0=0.05, p.lambda=4)
p0 <- getp0()
pp <- fitmodel(y, p0, pconst)
round(pp, 2)
## plot fitted data
plotfit(spotid, pp)
Run the code above in your browser using DataLab