How to determine the initial values while fitting X-ray spectra?

Hello, I’m fitting STIX X‑ray spectra using sunkit-spex. One important step is choosing initial values for model parameters (e.g., T, EM, spectral index etc.) I’m not sure how to set these initial values because the fit results change a lot depending on these values.

For example, I defined this model: spec_joint.model = "C * (f_vth + f_vth + thick_fn)"

In the sunkit-spex example the parameters are set as:

fitter.params["T1_spectrum1"] = {"Value": 19, "Bounds": (13, 30), "Status": "free"}
fitter.params["EM1_spectrum1"] = {"Value": 470, "Bounds": (300, 800), "Status": "free"}
fitter.params["T2_spectrum1"] = {"Value": 40, "Bounds": (20, 60), "Status": "free"}
fitter.params["EM2_spectrum1"] = {"Value": 7, "Bounds": (3, 20), "Status": "free"}
fitter.params["total_eflux1_spectrum1"] = {"Value": 4, "Bounds": (1, 10), "Status": "free"}
fitter.params["index1_spectrum1"] = {"Value": 4, "Bounds": (2, 15), "Status": "free"}
fitter.params["e_c1_spectrum1"] = {"Value": 17, "Bounds": (10, 27), "Status": "free"}

But when I apply different X‑ray data, I often can’t get a good fit. What strategies or guidelines can I use to choose reliable initial parameter values so the fitting is robust across different datasets?
Thanks!

1 Like