autoemx.core.fitter package
Fitting module for EDS spectrum analysis.
This package provides classes and functions for physically-accurate modeling, fitting, and analysis of X-ray energy-dispersive spectroscopy (EDS) spectra.
- Main Components:
fitter.XSp_Fitter: Main orchestrator for spectrum fitting
detector_response.DetectorResponseFunction: Detector response and convolution handling
peaks.Peaks_Model: Peak modeling and parameterization
background.Background_Model: Background continuum modeling
Typical Usage:
from autoemx.core.fitter import XSp_Fitter
fitter = XSp_Fitter(
spectrum_vals, energy_vals,
spectrum_lims=spectrum_lims,
microscope_ID='PhenomXL',
...
)
fit_result, fitted_lines = fitter.fit_spectrum(plot_result=True)
Submodules
- autoemx.core.fitter.background module
Background_ModelBackground_Model.BACKGROUND_PARAMSBackground_Model.cls_beam_eBackground_Model.den_intBackground_Model.num_intBackground_Model.prev_xBackground_Model.prev_rhoz_par_offsetBackground_Model.prev_rhoz_par_slopeBackground_Model.prev_rhoz_limitBackground_Model.prev_w_frsBackground_Model.rhoz_valuesBackground_Model.get_average_Z()Background_Model.get_stopping_power_mod_pars()Background_Model.get_abs_attenuation_mod_pars()Background_Model.get_backscattering_correction_mod_pars()Background_Model.get_beta_expr()Background_Model.get_generated_background_mod_pars()Background_Model.get_detector_efficiency_mod_pars()Background_Model.get_det_zero_peak_model_pars()Background_Model.get_full_background_mod_pars()
- autoemx.core.fitter.detector_response module
SparseConvolutionRowDetectorResponseFunctionDetectorResponseFunction.det_res_conv_matrixDetectorResponseFunction.icc_conv_matrixDetectorResponseFunction.det_response_opDetectorResponseFunction.energy_vals_paddingDetectorResponseFunction.conv_zero_tolDetectorResponseFunction.ensure_conv_matrices_cached()DetectorResponseFunction.setup_detector_response_vars()DetectorResponseFunction.det_sigma()DetectorResponseFunction.get_icc_spectrum()
- autoemx.core.fitter.fast_model_eval module
- autoemx.core.fitter.fitter module
- autoemx.core.fitter.peak_identification module
- Automatic element identification
PeakIDSettingsPeakIDSettings.min_peak_significancePeakIDSettings.low_energy_threshold_keVPeakIDSettings.low_energy_multiplierPeakIDSettings.element_multipliersPeakIDSettings.artifact_min_fractionPeakIDSettings.candidate_window_sigmaPeakIDSettings.merged_peak_shift_keVPeakIDSettings.min_line_weightPeakIDSettings.confirm_overvoltagePeakIDSettings.confirm_significancePeakIDSettings.model_rel_uncertaintyPeakIDSettings.min_peak_gainPeakIDSettings.min_supported_peaks_overlap_checkPeakIDSettings.min_delta_deviancePeakIDSettings.ambiguity_marginPeakIDSettings.max_full_fits_per_peakPeakIDSettings.max_new_elementsPeakIDSettings.max_iterationsPeakIDSettings.z_rangePeakIDSettings.excluded_elementsPeakIDSettings.prunePeakIDSettings.max_start_redchi_fractionPeakIDSettings.strong_min_filtered_gainPeakIDSettings.background_ratio_boundsPeakIDSettings.background_bands_keVPeakIDSettings.min_local_gain_fractionPeakIDSettings.contradiction_rel_lossPeakIDSettings.linear_prefilter_fractionPeakIDSettings.full_fit_overlapsPeakIDSettings.overlap_checkPeakIDSettings.refit_after_acceptPeakIDSettings.final_fitPeakIDSettings.multiplier()
FitOutcomeIdentifiedElementIdentifiedElement.elementIdentifiedElement.statusIdentifiedElement.matched_lineIdentifiedElement.line_energy_keVIdentifiedElement.peak_significanceIdentifiedElement.delta_devianceIdentifiedElement.net_areaIdentifiedElement.detection_limitIdentifiedElement.ambiguous_withIdentifiedElement.overlaps_withIdentifiedElement.has_standardIdentifiedElement.from_poolIdentifiedElement.via_overlap_checkIdentifiedElement.from_peak_assignmentIdentifiedElement.filtered_gainIdentifiedElement.residual_peak_sigmaIdentifiedElement.residual_peak_okIdentifiedElement.noteIdentifiedElement.tierIdentifiedElement.describe()
UnexplainedPeakElementIDResultElementIDResult.fixed_elementsElementIDResult.substrate_elementsElementIDResult.elementsElementIDResult.unexplained_peaksElementIDResult.energy_valsElementIDResult.spectrum_valsElementIDResult.modelElementIDResult.n_fitsElementIDResult.elapsed_sElementIDResult.n_candidate_testsElementIDResult.skipped_reasonElementIDResult.background_noteElementIDResult.new_elementsElementIDResult.strong_new_elementsElementIDResult.possible_new_elementsElementIDResult.quantifiable_new_elementsElementIDResult.unquantifiable_new_elementsElementIDResult.summary()ElementIDResult.plot()
get_sigma_function()element_line_families()top_hat_matrix()gaussian_template()fit_statistic()poisson_deviance()ResidualPeakfiltered_gain()background_band_ratios()make_xsp_fit_function()identify_elements()
- autoemx.core.fitter.peaks module
Peaks_ModelPeaks_Model.icc_freq_spectraPeaks_Model.center_keyPeaks_Model.sigma_keyPeaks_Model.area_keyPeaks_Model.center_offset_keyPeaks_Model.sigma_broadening_keyPeaks_Model.gamma_keyPeaks_Model.PEAK_SHAPE_PARAMSPeaks_Model.tail_fraction_keyPeaks_Model.F_loss_keyPeaks_Model.R_e_keyPeaks_Model.escape_peaks_strPeaks_Model.TOP_HAT_PRESENCE_SIGMAPeaks_Model.TOP_HAT_OVERLAP_SIGMAPeaks_Model.pileup_peaks_strPeaks_Model.clear_cached_icc_spectra()Peaks_Model.get_peaks_mod_pars()