epraya.Genio#
- Genio(Hamer, Expe, Vara, exper, eps=1e-10, maximal=100, datype='data', mode='p', seed=451, Mr=70)#
Fitting function for the experimental data using the genetic algorithm. Creates a population of 35*N individuals, where N is the number of parameters that will change, that have combinations of the possible values of the parameters. This individuals are evaluated, select and cross to produce a new population.
The algorithm uses a normal distribution for the mutation probability and a the numpy random int generator for the cross probability.
- Parameters:
Hamer (Class) – Container for the hamiltonian parameters.
Expe (Class) – Container for the experimental conditions.
Vara (Class) – Container for the range and parameters to vary.
exper (np.array) – Experimental spectrum data to fit.
eps (float) – Tolerance value for the error. Default is 1e-10
maximal (int) – Max. number of generations to evalue.
datype (str) – Type of data to do the fitting, can be ‘data’, the data as it’s or ‘integral’, its first integral.
mode (str) – Defines the sample type, ‘p’ for powder and ‘c’ for monocristal.
seed (int) – Seed for the uniform distribution
Mr (int) – Number of divisions for the Delaunay grid.
- Returns:
Ham (Class) – Container for the fitted hamiltonian parameters.
fitresult (Class) – Container for the results of the Fitting function.