Example #1
0
def main():
    data = get_processed_data()
    first_id = get_id(filename)
    models = get_models()

    for i in range(len(models)):
        m = models.pop(0)
        test = ModelTest(m, *data, id_=first_id + i, logfile=filename)

        test.log()
        del m
        del test
Example #2
0
# test for Rabi flop fits

from model_test import ModelTest
from fit_rabi import Rabi

import numpy as np

test = ModelTest(Rabi, 'Rabi')
true_params = [2 * np.pi / (10), 10, 0.05, 0., 0, 0.6]
test.generate_data(0, 30, 300, 0.02, true_params)
test.fit()
test.print_results()
test.plot(fit=True)
Example #3
0
# test for Gaussian fits

from model_test import ModelTest
from fit_gaussian import Gaussian

test = ModelTest(Gaussian, 'Gaussian')
true_params = [130., 4., 5., 0.1]
test.generate_data(100, 200, 200, 0.02, true_params)
test.fit()
test.print_results()
test.plot()
Example #4
0
# test script for Lorentzian fits
from model_test import ModelTest
from fit_bessel import Bessel

test = ModelTest(Bessel, 'Bessel')
true_params = [130., 1., 5., 0.1, 1]
test.generate_data(100, 200, 200, 0.02, 0.5, true_params)
test.fit()
test.print_results()
test.plot()
# test for Rabi flop fits

from model_test import ModelTest
from fit_rabi import Rabi

import numpy as np


test = ModelTest(Rabi, 'Rabi')
true_params = [2*np.pi/(10), 10, 0.05, 0., 0, 0.6]
test.generate_data(0, 30, 300, 0.02, true_params)
test.fit()
test.print_results()
test.plot(fit=True)
Example #6
0
# test for linear fits

from model_test import ModelTest
from fit_linear import Linear

test = ModelTest(Linear, 'Linear')
true_params = [0.3, 4]
test.generate_data(10, 20, 40, 1, true_params)
test.fit()
test.print_results()
test.plot()