Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using StackFitter for redshift fitting. #178

Open
Zhiyuan-G opened this issue Oct 18, 2023 · 0 comments
Open

Error when using StackFitter for redshift fitting. #178

Zhiyuan-G opened this issue Oct 18, 2023 · 0 comments

Comments

@Zhiyuan-G
Copy link

Zhiyuan-G commented Oct 18, 2023

Hello, I am reporting an error when trying to do redshift estimation with stack fitter when running st.xfit_redshift() with st = grizli.stack.StackFitter()


File /path/to/envs/grizli39/lib/python3.9/site-packages/grizli/fitting.py:2792, in GroupFitter.xfit_redshift(self, prior, templates, fwhm, line_complexes, fsps_templates, zr, dz, zoom, verbose, fit_background, fitter, bounded_kwargs, delta_chi2_threshold, poly_order, make_figure, figsize, use_cached_templates, get_uncertainties, Rspline, huber_delta, get_student_logpdf)
   2789 fit.meta['chimax'] = (chi2.max(), 'Maximum chi2 of template fit')
   2790 fit.meta['fitter'] = (fitter, 'Minimization algorithm')
-> 2792 fit.meta['as_epsf'] = ((self.psf_param_dict is not None)*1,
   2793                        'Object fit with effective PSF morphology')
   2796 # Bayesian information criteria, normalized to template min_chi2
   2797 # BIC = log(number of data points)*(number of params) + min(chi2) + C
   2798 # https://en.wikipedia.org/wiki/Bayesian_information_criterion
   2800 scale_chinu = self.DoF/chi2.min()

AttributeError: 'StackFitter' object has no attribute 'psf_param_dict'

I have one more thing I'd like to double-check to ensure my understanding is correct in terms of MultiBeam() or StackFitter(). I understand that StackFitter relies on stacked spectra derived from a single source across multiple exposures, and the subsequent redshift estimation is based on the stacked spetra. However, I'm curious if MultiBeam (mb = grizli.multifit.MultiBeam(..)) also takes into consideration all individual beams during redshift estimation performed with mb.xfit_redshift()? Are those individual beams collectively analyzed or integrated in any manner during the process of redshift fitting?

I would really appreciate your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant