-
Notifications
You must be signed in to change notification settings - Fork 39
Closed
Description
Hello,
I am having issues trying to redo the fitting of the example's quasar plate : 5808 mjd : 56325 fiberid : 560, the code compiles and give similar results as to what is shown in the presentation but the SiIV emission line doesn't appear in the fit :
I am using the qsopar.fits parameter file from : https://github.com/QiaoyaWu/sdss4_dr16q_tutorial/blob/main/qsopar_generate.py
After the figures' plot this code :
a=[]
for elem in (list(q_mle.line_result_name)):
if 'complex' in elem and 'local' not in elem:
i = list(q_mle.line_result_name).index(elem)
a.append(list(q_mle.line_result)[i])
print(a)
yields :
['Lya', 'CIV', 'CIII', 'MgII']
The fitting function call is :
q_mle.Fit(name=name, # customize the name of given targets. Default: plate-mjd-fiber
# prepocessing parameters
nsmooth=1, # do n-pixel smoothing to the raw input flux and err spectra
and_mask=False, # delete the and masked pixels
or_mask=False, # delete the or masked pixels
reject_badpix=False, # reject 10 most possible outliers by the test of pointDistGESD
deredden=False, # correct the Galactic extinction
wave_range=None, # trim input wavelength
wave_mask=None, # 2-D array, mask the given range(s)
# host decomposition parameters
decompose_host=False, # If True, the host galaxy-QSO decomposition will be applied
host_prior=True,
# If True, the code will adopt prior-informed method to assist decomposition. Currently, only 'CZBIN1' and 'DZBIN1' model for QSO PCA are available. And the model for galaxy must be PCA too.
host_prior_scale=0.2,
# scale of prior panelty. Usually, 0.2 works fine for SDSS spectra. Adjust it smaller if you find the prior affect the fitting results too much.
host_line_mask=True,
# If True, the line region of galaxy will be masked when subtracted from original spectra.
decomp_na_mask=True, # If True, the narrow line region will be masked when perform decomposition
qso_type='CZBIN1', # PCA template name for quasar
npca_qso=10, # numebr of quasar templates
host_type='PCA', # template name for galaxy
npca_gal=5, # number of galaxy templates
# continuum model fit parameters
Fe_uv_op=True, # If True, fit continuum with UV and optical FeII template
poly=False, # If True, fit continuum with the polynomial component to account for the dust reddening
BC=False, # If True, fit continuum with Balmer continua from 1000 to 3646A
initial_guess=None, # Initial parameters for continuum model, read the annotation of this function for detail
rej_abs_conti=False, # If True, it will iterately reject 3 sigma outlier absorption pixels in the continuum
n_pix_min_conti=100, # Minimum number of negative pixels for host continuuum fit to be rejected.
# emission line fit parameters
linefit=True, # If True, the emission line will be fitted
rej_abs_line=False,
# If True, it will iterately reject 3 sigma outlier absorption pixels in the emission lines
# fitting method selection
MC=False,
# If True, do Monte Carlo resampling of the spectrum based on the input error array to produce the MC error array
MCMC=False,
# If True, do Markov Chain Monte Carlo sampling of the posterior probability densities to produce the error array
nsamp=200,
# The number of trials of the MC process (if MC=True) or number samples to run MCMC chain (if MCMC=True)
# advanced fitting parameters
param_file_name='qsopar.fits', # Name of the qso fitting parameter FITS file.
nburn=20, # The number of burn-in samples to run MCMC chain
nthin=10, # To set the MCMC chain returns every n samples
epsilon_jitter=0.,
# Initial jitter for every initial guass to avoid local minimum. (Under test, not recommanded to change)
# customize the results
save_result=False, # If True, all the fitting results will be saved to a fits file
save_fits_name=name, # The output name of the result fits
save_fits_path=path_test, # The output path of the result fits
plot_fig=True, # If True, the fitting results will be plotted
save_fig=False, # If True, the figure will be saved
plot_corner=True, # Whether or not to plot the corner plot results if MCMC=True
# debugging mode
verbose=False, # turn on (True) or off (False) debugging output
# sublevel parameters for figure plot and emcee
kwargs_plot={
'save_fig_path': '.', # The output path of the figure
'broad_fwhm': 1200 # km/s, lower limit that code decide if a line component belongs to broad component
},
kwargs_conti_emcee={},
kwargs_line_emcee={})
Also I did what was advised there : #64 for the overlapping axis but it didn't seem to change much.
If you had any idea regarding these issues it would be greatly appreciated.
Thank you again for the code and have a great day !
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
