Mercurial > repos > rv43 > tomo
comparison fit.py @ 65:f31ef7bfb430 draft
"planemo upload for repository https://github.com/rolfverberg/galaxytools commit d55db09b45d0b542f966cef17892858bb55d94f7"
| author | rv43 | 
|---|---|
| date | Thu, 18 Aug 2022 14:57:39 +0000 | 
| parents | 15288e9746e0 | 
| children | fba792d5f83b | 
   comparison
  equal
  deleted
  inserted
  replaced
| 64:15288e9746e0 | 65:f31ef7bfb430 | 
|---|---|
| 6 | 6 | 
| 7 @author: rv43 | 7 @author: rv43 | 
| 8 """ | 8 """ | 
| 9 | 9 | 
| 10 import sys | 10 import sys | 
| 11 import re | |
| 11 import logging | 12 import logging | 
| 12 import numpy as np | 13 import numpy as np | 
| 13 | 14 | 
| 14 from asteval import Interpreter | 15 from asteval import Interpreter | 
| 15 from copy import deepcopy | 16 from copy import deepcopy | 
| 16 #from lmfit import Minimizer | 17 #from lmfit import Minimizer | 
| 17 from lmfit import Model, Parameters | 18 from lmfit import Model, Parameters | 
| 18 from lmfit.models import ConstantModel, LinearModel, QuadraticModel, PolynomialModel,\ | 19 from lmfit.models import ConstantModel, LinearModel, QuadraticModel, PolynomialModel,\ | 
| 19 StepModel, RectangleModel, GaussianModel, LorentzianModel | 20 StepModel, RectangleModel, GaussianModel, LorentzianModel | 
| 20 | 21 | 
| 21 from general import * | 22 from general import is_index, index_nearest, quickPlot | 
| 22 | 23 | 
| 23 # sigma = fwhm_factor*fwhm | 24 # sigma = fwhm_factor*fwhm | 
| 24 fwhm_factor = { | 25 fwhm_factor = { | 
| 25 'gaussian' : f'fwhm/(2*sqrt(2*log(2)))', | 26 'gaussian' : f'fwhm/(2*sqrt(2*log(2)))', | 
| 26 'lorentzian' : f'0.5*fwhm', | 27 'lorentzian' : f'0.5*fwhm', | 
