save_pdf_plots¶
- threadcount.fit.save_pdf_plots(filename, fitList, computer_choices=None, user_check=None, final_choices=None, onlyChecked=False, title='')[source]¶
Save plots of each spaxel fit as separate page in 1 pdf file.
This function saves plots of all the different fits to each spaxel, complete with indications of which fit was chosen by the aic algorithm (yellow) and which (if any) was chosen by the user (blue). A subset for only the fits selected for manual checking may be saved, using the onlyChecked = True option.
- Parameters:
filename (str) – file name to save to.
fitList (list of array of
lmfit.model.ModelResult) – A list of fits of different models to the same data set, for a spatial shape of nxm and 3 different models, this would have the shape (3,n,m)computer_choice (array of int, optional) – The automatic choice, usually by
choose_model_aic(), by default None. If None,choose_model_aic()will be called. Same spatial shape as fitList (nxm)user_check (array of bool, optional) – If True, indicates this pixel was checked by the user, by default None. This is often the output for this spaxel’s
marginal_fits(). Same spatial shape as fitList (nxm)final_choices (array of int, optional) – The fits chosen by the user, if any, by default None. Same spatial shape as fitList (nxm)
onlyChecked (bool, optional) – Whether to save only the fits flagged for manual checking, by default False
title (str, optional) – The figure’s suptitle, by default “”. The function will prepend to title the spaxel’s coordinates, and append “auto choice _”, and if the user has checked the fits, “user choice _” is also appended.
See also
plot_ModelResults_pixelThe plotting function used for each spaxel.