# coding: utf-8

import sherpa.ui as ui
from sherpa.models.template import KNNInterpolator

ui.load_data("custom_interp", "load_template_interpolator-bb_data.dat")
ui.load_template_interpolator('knn', KNNInterpolator, k=2, order=1)
ui.load_template_model('bb1', "bb_index.dat", template_interpolator_name='knn')
ui.set_model("custom_interp", "bb1")
ui.freeze("bb1.dummy")
ui.fit("custom_interp")

# coding: utf-8

import sherpa.ui as ui

ui.load_data("default_interp", "load_template_with_interpolation-bb_data.dat")
ui.load_template_model('bb1', "bb_index.dat")
ui.set_model("default_interp", bb1)
ui.set_method('gridsearch')
ui.set_method_opt('sequence', ui.get_model_component('bb1').parvals)
ui.fit("default_interp")
Exemplo n.º 3
0
# coding: utf-8

import sherpa.ui as ui

ui.load_data("default_interp", "bb_data.dat")
ui.load_template_model('bb1', "bb_index.dat")
ui.load_template_model('bb2', "bb_index.dat")
ui.set_model("default_interp", bb1+bb2)
ui.freeze("bb1.dummy")
ui.freeze("bb2.dummy")
ui.fit("default_interp")