Saving Results#
If you performed the standard 2-component fit with MUFASA using
master_2comp_fit(), as described in the
Get Started guide or the Fitting Tutorial,
the outputs are automatically saved. Refer to the Outputs
section below for details on the output files.
If you have performed custom fits, including additional refinements to pipeline
results, see the Example section for instructions on saving
the associated data products using save_best_2comp_fit().
Note
Output Directory
All output files are stored in the region.paraDir
directory after a fitting run. Please ensure the contents of the files are verified
for accuracy.
Outputs#
Raw Outputs#
The following file(s) are automatically generated after each run, without calling
save_best_2comp_fit():
File Name |
Description |
|---|---|
|
Fitted parameter maps for the |
Note
Naming Convention
The first part of the file names is automatically generated based on the input cube’s file name, which in this example is ‘NH3’.
By default, MUFASA uses ‘paramaps’ in the output file names. For clarity, this example uses ‘para’ instead of the default ‘paramaps’.
Best-model Outputs#
The following output files are generated after calling
save_best_2comp_fit(), which first performs model selection in
each pixel to select the best-fit model:
File Name |
Description |
|---|---|
|
Final model-selected best-fit parameters (1 or 2 comp). |
|
Relative log-likelihood of 2-comp vs 1-comp fits. |
|
Relative log-likelihood of 1-comp fit vs noise |
|
Relative log-likelihood of 2-comp fit vs noise |
|
Estimated peak signal-to-noise ratio map. |
|
Moment 0 map (integrated intensity) of the best model. |
|
Moment 0 map of the data, masked by the best model. |
|
Reduced chi-squared map for the 1-component model. |
|
Reduced chi-squared map for the 2-component model. |
Optionally, the following data products are also saved by default:
File Name |
Description |
|---|---|
|
Final best-fit parameters in a csv table w. peak I. |
|
Best-fit vlsr plotted in PPV as an .html file. |
Note
save_best_2comp_fit(): is specifically build for 2-component
models. Similar function for higher number of components has not been implemented.
Example#
To save the results after spectral fitting, run the following:
from mufasa.master_fitter import save_best_2comp_fit
# Save the best-fitting results
save_best_2comp_fit(
reg=region,
multicore=True,
from_saved_para=False,
lnk21_thres=5,
lnk10_thres=5
)
print("Results saved to:", region.ucube.paraDir)
For initializing your Region object, see Loading Data and Results.
Next Steps#
Once the results are saved, explore them using MUFASA’s visualization tools. See Visualizing Results for more details. For an overview of the complete workflow, refer to Guides.