hyperspy.tests.model package

Submodules

hyperspy.tests.model.test_chi_squared module

class hyperspy.tests.model.test_chi_squared.TestChiSquared

Bases: object

setUp()
test_chisq()
test_chisq_in_range()
test_chisq_with_fit()
test_chisq_with_inactive_components()
test_dof_with_fit()
test_dof_with_inactive_components()
test_dof_with_p0()
test_red_chisq()
test_red_chisq_with_fit()

hyperspy.tests.model.test_component module

class hyperspy.tests.model.test_component.TestCallMethods

Bases: object

setUp()
test_call()
test_plotting_active_component_binned()
test_plotting_active_component_notbinned()
test_plotting_active_component_out_of_range()
test_plotting_not_active_component()
class hyperspy.tests.model.test_component.TestGeneralMethods

Bases: object

setUp()
test_export_all_no_twins()
test_export_all_twins()
test_export_free()
test_fetch_from_array()
test_fetch_from_array_free()
test_fetch_stored_values_all()
test_fetch_stored_values_all_twinned()
test_fetch_stored_values_all_twinned_bad()
test_fetch_stored_values_fixed()
test_set_parameters_free_all()
test_set_parameters_free_name()
test_set_parameters_not_free_all()
test_set_parameters_not_free_name()
test_update_number_parameters()
class hyperspy.tests.model.test_component.TestMultidimensionalActive

Bases: object

setUp()
test_disable_pixel_switching()
test_disable_pixel_switching_current_off()
test_disable_pixel_switching_current_on()
test_enable_pixel_switching_current_off()
test_enable_pixel_switching_current_on()
hyperspy.tests.model.test_component.test_update_number_free_parameters()

hyperspy.tests.model.test_components module

class hyperspy.tests.model.test_components.TestExpression

Bases: object

setUp()
test_f()
test_grad_fwhm()
test_grad_height()
test_grad_x0()
test_name()
test_position()
class hyperspy.tests.model.test_components.TestGaussian

Bases: object

setUp()
test_estimate_parameters_binned()
test_estimate_parameters_unbinned()
class hyperspy.tests.model.test_components.TestHeavisideStep

Bases: object

setUp()
test_float_values()
test_gradients()
test_integer_values()
test_not_sorted()
class hyperspy.tests.model.test_components.TestOffset

Bases: object

setUp()
test_estimate_parameters_binned()
test_estimate_parameters_unbinned()
class hyperspy.tests.model.test_components.TestPolynomial

Bases: object

setUp()
test_2d_signal()
test_3d_signal()
test_estimate_parameters_binned()
test_estimate_parameters_unbinned()
test_gradient()
class hyperspy.tests.model.test_components.TestPowerLaw

Bases: object

setUp()
test_estimate_parameters_binned()
test_estimate_parameters_binned_only_current()
test_estimate_parameters_unbinned()
test_estimate_parameters_unbinned_only_current()
class hyperspy.tests.model.test_components.TestScalableFixedPattern

Bases: object

setUp()
test_both_binned()
test_both_unbinned()
test_pattern_binned_signal_unbinned()
test_pattern_unbinned_signal_binned()

hyperspy.tests.model.test_components2D module

class hyperspy.tests.model.test_components2D.TestGaussian2D

Bases: object

setUp()
test_values()

hyperspy.tests.model.test_edsmodel module

class hyperspy.tests.model.test_edsmodel.TestMaps

Bases: object

setUp()
test_lines_intensity()
class hyperspy.tests.model.test_edsmodel.TestlineFit

Bases: object

setUp()
test_calibrate_energy_offset()
test_calibrate_energy_resolution()
test_calibrate_energy_scale()
test_calibrate_xray_energy()
test_calibrate_xray_weight()
test_calibrate_xray_width()
test_edsmodel_store()
test_fit()
test_model_creation()
test_semmodel_creation()
test_semmodel_store()
test_temmodel_creation()
test_temmodel_store()

hyperspy.tests.model.test_eelsmodel module

class hyperspy.tests.model.test_eelsmodel.TestCreateEELSModel

Bases: object

setUp()
test_auto_add_background_true()
test_auto_add_edges_false()
test_auto_add_edges_false_names()
test_auto_add_edges_true()
test_create_eelsmodel()
test_gos()
test_low_loss()
test_low_loss_bad_shape(*arg, **kw)
class hyperspy.tests.model.test_eelsmodel.TestEELSModel

Bases: object

setUp()
test_get_first_ionization_edge_energy_C()
test_get_first_ionization_edge_energy_C_B()
test_get_first_ionization_edge_energy_None()
test_get_start_energy_above()
test_get_start_energy_below()
test_get_start_energy_none()
test_resume_fsw()
test_suspend_auto_fsw()
test_two_area_powerlaw_estimation_BC()
test_two_area_powerlaw_estimation_C()
test_two_area_powerlaw_estimation_no_edge()
class hyperspy.tests.model.test_eelsmodel.TestFitBackground

Bases: object

setUp()
test_fit_background_B_C()
test_fit_background_C()
test_fit_background_no_edge()

hyperspy.tests.model.test_fancy_indexing module

class hyperspy.tests.model.test_fancy_indexing.TestEELSModelSlicing

Bases: object

setUp()
test_slicing_low_loss_inav()
test_slicing_low_loss_isig()
class hyperspy.tests.model.test_fancy_indexing.TestModelIndexing

Bases: object

setUp()
test_component_copying_order()
test_model_navigation_indexer_slice()
test_model_signal_indexer_slice()
class hyperspy.tests.model.test_fancy_indexing.TestModelIndexingClass

Bases: object

setUp()
test_model_class()

hyperspy.tests.model.test_fit_component module

class hyperspy.tests.model.test_fit_component.TestFitOneComponent

Bases: object

setUp()
test_component_not_in_model(*arg, **kw)
test_fit_component()
class hyperspy.tests.model.test_fit_component.TestFitSeveralComponent

Bases: object

setUp()
test_fit_component_active_state()
test_fit_component_free_state()
test_fit_multiple_component()

hyperspy.tests.model.test_model module

class hyperspy.tests.model.test_model.TestAdjustPosition

Bases: object

setUp()
test_disable_adjust_position()
test_enable_adjust_position()
test_enable_all()
test_enable_all_zero_start()
test_manual_close()
class hyperspy.tests.model.test_model.TestAsSignal

Bases: object

setUp()
test_all_components_multidim()
test_all_components_simple()
test_one_component_multidim()
test_one_component_simple()
class hyperspy.tests.model.test_model.TestCreateModel

Bases: object

setUp()
test_create_model()
class hyperspy.tests.model.test_model.TestModel1D

Bases: object

setUp()
test_access_component_by_index()
test_access_component_by_name()
test_append_component()
test_append_existing_component(*arg, **kw)
test_calculating_convolution_axis()
test_component_already_in_model(*arg, **kw)
test_component_name_when_append()
test_components_class_change_invalid_name()
test_components_class_change_name()
test_components_class_change_name_del_default(*arg, **kw)
test_components_class_default()
test_delete_component_by_index()
test_delete_component_by_name()
test_delete_slice()
test_errfunc()
test_errfunc2()
test_get_component_by_component()
test_get_component_by_index()
test_get_component_by_name()
test_get_component_wrong(*arg, **kw)
test_gradient_ls()
test_gradient_ml()
test_model_function()
test_no_component_with_that_name(*arg, **kw)
test_notebook_interactions()
test_remove_component()
test_remove_component_by_index()
test_remove_component_by_name()
test_several_component_with_same_name(*arg, **kw)
test_snap_parameter_bounds()
class hyperspy.tests.model.test_model.TestModel2D

Bases: object

setUp()
test_fitting()
class hyperspy.tests.model.test_model.TestModelCallMethod

Bases: object

setUp()
test_call_method_binned()
test_call_method_no_convolutions()
test_call_method_with_convolutions()
class hyperspy.tests.model.test_model.TestModelFitBinned

Bases: object

setUp()
test_fit_bounded()
test_fit_bounded_bad_starting_values()
test_fit_fmin_leastsq()
test_fit_fmin_ml()
test_fit_leastsq()
test_fit_leastsq_grad()
test_fit_mpfit()
test_fit_mpfit_grad()
test_fit_odr()
test_fit_odr_grad()
test_wrong_method(*arg, **kw)
class hyperspy.tests.model.test_model.TestModelJacobians

Bases: object

setUp()
test_jacobian_convolved()
test_jacobian_not_convolved()
class hyperspy.tests.model.test_model.TestModelPlotCall

Bases: object

setUp()
test_model2plot_other_am()
test_model2plot_own_am()
class hyperspy.tests.model.test_model.TestModelScalarVariance

Bases: object

setUp()
test_std10_chisq()
test_std10_red_chisq()
test_std1_chisq()
test_std1_red_chisq()
test_std1_red_chisq_in_range()
class hyperspy.tests.model.test_model.TestModelSettingPZero

Bases: object

setUp()
test_fetching_from_p0()
test_setting_boundaries()
test_setting_mpfit_parameters_info()
test_setting_p0()
class hyperspy.tests.model.test_model.TestModelSignalVariance

Bases: object

setUp()
test_std1_red_chisq()
class hyperspy.tests.model.test_model.TestModelWeighted

Bases: object

setUp()
test_chisq()
test_fit_fmin_binned()
test_fit_fmin_unbinned()
test_fit_leastsq_binned()
test_fit_leastsq_unbinned()
test_fit_mpfit_binned()
test_fit_mpfit_unbinned()
test_fit_odr_binned()
test_fit_odr_unbinned()
test_red_chisq()
class hyperspy.tests.model.test_model.TestMultifit

Bases: object

setUp()
test_bounded_snapping()
test_fetch_only_fixed_false()
test_fetch_only_fixed_true()
test_parameter_as_signal_values()
class hyperspy.tests.model.test_model.TestSetCurrentValuesTo

Bases: object

setUp()
test_set_1()
test_set_all()
class hyperspy.tests.model.test_model.TestStoreCurrentValues

Bases: object

setUp()
test_active()
test_not_active()

hyperspy.tests.model.test_model_as_dictionary module

class hyperspy.tests.model.test_model_as_dictionary.DummyAxesManager

Bases: object

indices = ()
navigation_shape = [1]
navigation_size = 2
class hyperspy.tests.model.test_model_as_dictionary.TestComponentDictionary

Bases: object

setUp()
test_invalid_component_name(*arg, **kw)
test_invalid_parameter_name(*arg, **kw)
test_load_dictionary()
test_to_dictionary()
class hyperspy.tests.model.test_model_as_dictionary.TestModelDictionary

Bases: object

setUp()
test_load_dictionary()
test_to_dictionary()
class hyperspy.tests.model.test_model_as_dictionary.TestParameterDictionary

Bases: object

setUp()
test_invalid_name(*arg, **kw)
test_load_dictionary()
test_to_dictionary()
hyperspy.tests.model.test_model_as_dictionary.remove_empty_numpy_strings(dic)

hyperspy.tests.model.test_model_selection_criteria module

class hyperspy.tests.model.test_model_selection_criteria.TestModelSelection

Bases: object

setUp()
test_AIC()
test_AICc()
test_BIC()

hyperspy.tests.model.test_model_storing module

class hyperspy.tests.model.test_model_storing.TestModelSaving

Bases: object

setUp()
tearDown()
test_save_and_load_model()
class hyperspy.tests.model.test_model_storing.TestModelStoring

Bases: object

setUp()
test_actually_stored()
test_model_store()
test_models_getattr()
test_models_pop()
test_models_restore_remove()
test_models_stub_methods()
test_store_name_error1(*arg, **kw)
test_store_name_error2(*arg, **kw)
test_store_name_error3(*arg, **kw)
test_store_name_error4(*arg, **kw)
test_store_name_error5(*arg, **kw)
hyperspy.tests.model.test_model_storing.clean_model_dictionary(d)

hyperspy.tests.model.test_parameter module

class hyperspy.tests.model.test_parameter.Dummy

Bases: object

add_one()
class hyperspy.tests.model.test_parameter.DummyAxesManager

Bases: object

indices = ()
navigation_shape = ()
class hyperspy.tests.model.test_parameter.TestGeneralMethods

Bases: object

setUp()
test_as_signal()
test_store_current_values_no_indices()
test_store_current_values_normal_indices()
class hyperspy.tests.model.test_parameter.TestParameterLen1

Bases: object

setUp()
test_connect_disconnect()
test_default_value()
test_ext_force_positive()
test_map_size0()
test_map_size1()
test_map_size2()
test_number_of_elements()
test_set_value()
test_set_value_bounded()
test_set_value_wrong_length(*arg, **kw)
class hyperspy.tests.model.test_parameter.TestParameterLen2

Bases: object

setUp()
test_connect_disconnect()
test_default_value()
test_ext_force_positive()
test_is_tuple()
test_map_size0()
test_map_size1()
test_map_size2()
test_number_of_elements()
test_set_value()
test_set_value_bounded()
test_set_value_wrong_length(*arg, **kw)
test_set_value_wrong_length2(*arg, **kw)
class hyperspy.tests.model.test_parameter.TestParameterTwin

Bases: object

setUp()
test_inherit_connections()
test_slave_fixed()
test_twin_function()
test_twin_value()
test_twin_value_bounded()

hyperspy.tests.model.test_set_parameter_state module

class hyperspy.tests.model.test_set_parameter_state.TestSetParameterInModel

Bases: object

setUp()
test_set_parameter_in_model1()
test_set_parameter_in_model2()
test_set_parameter_in_model3()
test_set_parameter_in_model4()
test_set_parameter_in_model5()
test_set_parameter_in_model_free()
test_set_parameter_in_model_not_free()

hyperspy.tests.model.test_set_parameter_value module

class hyperspy.tests.model.test_set_parameter_value.TestSetParameterInModel

Bases: object

setUp()
test_set_active_value1()
test_set_active_value2()
test_set_active_value3()
test_set_parameter_value1()
test_set_parameter_value2()
test_set_parameter_value3()

Module contents