aabdurrouf / piXedfit

piXedfit is a Python package designed for analyzing spatially resolved SEDs of galaxies
https://pixedfit.readthedocs.io/en/latest/index.html
MIT License
40 stars 7 forks source link

Questions about fitting process #11

Closed 0xygens closed 1 year ago

0xygens commented 1 year ago

Hi!Abdurro'uf

Thank you very much for your timely and accurate reply last time. Through this time of learning and using, the excellent code you have written has given encouraging results. However, during this period, I encountered several questions, which I could not find the answer to by myself.

  1. First of all, regarding the range of parameters fitted, such as metallicity, the default value is [-2,2], I want to change the parameter limit range to [-5,5]. When I tried to modify the scope using the save_models_rest_spec function to create the model, it didn't seem to work. Maybe I'm changing the scope the wrong way? Below is the configuration file and the result, which does not seem to really fit in the range [-5,5], but only increases the display range.
    
    from piXedfit.piXedfit_model import save_models_rest_spec
    imf_type = 1                    #  IMF
    sfh_form = 3                   # SFH
    dust_law = 1                    # dust attenuation law
    duste_switch = 0                # dust emission
    add_neb_emission = 1            # nebular emission
    add_agn = 0                     # AGN dusty torus emission

nmodels = 100000 # number of model spectra to be generated nproc = 30 # number of processors to be used in the calculation

params_range = {'log_age':[-1.0,1.14], 'dust1':[0.0,3.0], 'dust2':[0.0,3.0], 'logzsol':[-5.0,5.0]}

name_out = 'model_test_MCMC_c' # name of the output HDF5 file save_models_rest_spec(imf_type=imf_type, sfh_form=sfh_form, dust_law=dust_law, params_range=params_range, duste_switch=duste_switch, add_neb_emission=add_neb_emission, add_agn=add_agn, nmodels=nmodels,nproc=nproc, name_out=name_out)


![截屏2023-09-18 下午8 00 56](https://github.com/aabdurrouf/piXedfit/assets/117434061/8fbc9454-930a-44b2-a955-a814c6e6a9e7)

2. We know that some values in the results, such as QPAHs, can be fixed as a typical value according to other people's research. Can pixedfit fix a parameter value to participate in the fitting? I didn't get the answer in the manual, so how do you do this, which is very important for fitting.

3. How to derive the proportion information of different components from the figure below, such as the ratio of AGN or nebula emission to the total. Maybe it is my omission, I did not find the data interface where. 

![2A6B44F2-671E-4561-A363-0C0094C25D8F](https://github.com/aabdurrouf/piXedfit/assets/117434061/d47b79c4-a3f6-403a-967c-418d1c0ddd31)

In addition: I use MCMC to fit, and the fitting time of 1000 points is expected to be up to 300 days, is this normal?

There are so many questions here that maybe I should open another issue for ask the 3 ? Thank you very much for your wonderful work and support, and I am looking forward to your reply !

My computer information:
Ubuntu 18.04.6 
Intel(R) Xeon(R) Gold 6230R CPU @ 2.10GHz *104
9.3 GiB RAM
aabdurrouf commented 1 year ago

Hi, Thanks for your question and sorry for my late response. For metallicity (logzsol), the allowed range for Padova isochrone is from -2.0 to 0.2 (in logarithmic scale). Please see page 13 in FSPS manual here https://github.com/cconroy20/fsps/blob/master/doc/MANUAL.pdf.

For the running time of MCMC, it usually takes ~10-15 minutes for nsteps=1000 and nwalkers=100, when run on 5 cores.

If you have more questions, please feel free to ask here or write me an email. Thanks!

0xygens commented 1 year ago

Thank you very much for your timely and professional reply !
The issue has been resolved and I will close it.