QSFit.jl

QSO spectral fitting made easy !!

Stars

Warn

This software is under active development and details may change at any time without notice. Also, documentation is not yet exhaustive.

QSFit started as an attempt to perform automatic analysis of optical spectra of AGNs and QSOs in a simple, replicable and shareable way. The first implementation in IDL language (see repo here has been used to analyze 71261 AGN and QSO spectra from SDSS DR10. The resulting spectral properties (such as emission line luminosities and widths, continuum slopes, etc.) are collected in a catalog in FITS format, as well as being publicly available here: https://qsfit.inaf.it/.

The details of the spectral analysis are presented in a paper: Calderone et al. 2017 (also available on arXiv).

The code has now been ported to Julia and the new package is dubbed QSFit.jl. It comes with the following advantages with respect to the IDL version:

  • Julia is released with a MIT license and doesn't require a paid license to be executed;
  • It provides better performances and allows to distribute workload on multiple CPUs or multiple host;
  • It provides several reusable Components and a few Recipes to perform automatic spectral analysis as well as interactive emissione line fitting;
  • It exploits the concept of customizable recipes (see Recipes) to customize the analysis for specific purposes;

QSFit.jl relies on the GModelFit.jl package to perform spectral fitting. A basic knowledge of such package is required to get the most out of QSFit.jl.

Installation

In the Julia REPL type:

using Pkg
Pkg.add("GModelFit")
Pkg.add("GModelFitViewer")
Pkg.add("QSFit")

To test the package type Pkg.test("QSFit").

Basic usage

The most important types used in QSFit.jl are:

  • Spectrum: it represent an observed spectrum of a AGN or QSO. It contains both the observed wavelengths and flux densities (with associated undertainties), as well as a map of "good" (i.e. reliable) spectral bins and an indication of spectral resolution. The Spectrum object can operate on spectra taken from any instrument (not only SDSS);

  • CRecipe: it is a container for a specific recipe to be used to analyze a Spectrum, and for all recipe-specific options. QSFit.jl provides a few Built-in recipes to analyze the spectrum, which can optionally be customized by the user. New recipes can also be implemented, either extending the built-in ones or starting from scratch.

The typical workflow for a spectral analysis is as follows:

using QSFit, QSFit.QSORecipes
# Download a spectrum
filename = download("http://dr10.sdss3.org/sas/dr10/sdss/spectro/redux/26/spectra/0752/spec-0752-52251-0323.fits")

# Read spectrum into a Spectrum Object
spec = Spectrum(Val(:SDSS_DR10), filename, label="My SDSS source")

# Create a CRecipe object based on the Type1 recipe to analyze the spectrum
recipe = CRecipe{Type1}(redshift=0.3806, Av=0.21)

# Analyze the spectrum with the above recipe
res = analyze(recipe, spec)

# Display best fit parameter values:
show(res.bestfit)
Timestamp: 2025-06-14T10:07:56.156

Spectrum: My SDSS source
  resol.: 2000.000
    good:   88.671%, units: X=1.0 Å, Y=1.0e-17 erg Å^-1 cm^-2 s^-1
      Av:    0.210  (DustExtinction.OD94(3.1))
De-reddening factors @ 1450, 3000, 5100 AA: [1.6990216358789452, 1.4214289702517076, 1.2389351505225081]
       z:    0.381  (Cosmology.FlatLCDM{Float64}(0.7, 0.6999146929857499, 0.3, 8.53070142500527e-5))
Good samples before line coverage filter: 3389 / 3822
Line Lyb_na          coverage: 0.000 on range     1024.8 < λ <     1026.6, threshold is < 0.600, neglecting...
Line Lyb_br          coverage: 0.000 on range     1017.2 < λ <     1034.3, threshold is < 0.600, neglecting...
Line Lya_na          coverage: 0.000 on range     1214.6 < λ <     1216.7, threshold is < 0.600, neglecting...
Line Lya_br          coverage: 0.000 on range     1205.5 < λ <     1225.8, threshold is < 0.600, neglecting...
Line NV_1241_na      coverage: 0.000 on range     1239.7 < λ <     1241.9, threshold is < 0.600, neglecting...
Line OI_1306_br      coverage: 0.000 on range     1293.5 < λ <     1315.2, threshold is < 0.600, neglecting...
Line CII_1335_br     coverage: 0.000 on range     1324.2 < λ <     1346.4, threshold is < 0.600, neglecting...
Line SiIV_1400_br    coverage: 0.000 on range     1386.6 < λ <     1409.9, threshold is < 0.600, neglecting...
Line CIV_1549_na     coverage: 0.000 on range     1548.1 < λ <     1550.8, threshold is < 0.600, neglecting...
Line CIV_1549_br     coverage: 0.000 on range     1536.6 < λ <     1562.4, threshold is < 0.600, neglecting...
Line HeII_1640_br    coverage: 0.000 on range     1626.7 < λ <     1654.1, threshold is < 0.600, neglecting...
Line OIII_1664_br    coverage: 0.000 on range     1649.6 < λ <     1677.3, threshold is < 0.600, neglecting...
Line AlIII_1858_br   coverage: 0.000 on range     1843.3 < λ <     1874.2, threshold is < 0.600, neglecting...
Line CIII_1909_br    coverage: 0.000 on range     1892.6 < λ <     1924.4, threshold is < 0.600, neglecting...
Line CII_2326_br     coverage: 0.000 on range       2307 < λ <     2345.8, threshold is < 0.600, neglecting...
Line l2420p0_br      coverage: 0.000 on range     2399.8 < λ <     2440.2, threshold is < 0.600, neglecting...
Line MgII_2798_na    coverage: 0.000 on range     2797.5 < λ <     2802.4, threshold is < 0.600, neglecting...
Line MgII_2798_br    coverage: 0.000 on range     2785.9 < λ <       2814, threshold is < 0.600, neglecting...
Line NeV_3345        coverage: 1.000 on range     3343.5 < λ <     3349.3
Line NeV_3426        coverage: 1.000 on range     3423.5 < λ <     3429.5
Line OII_3727        coverage: 1.000 on range     3725.2 < λ <     3731.7
Line NeIII_3869      coverage: 1.000 on range     3866.8 < λ <     3873.5
Line Hd_br           coverage: 1.000 on range     4068.7 < λ <     4137.1
Line Hg_br           coverage: 1.000 on range     4305.5 < λ <     4377.9
Line OIII_4363       coverage: 1.000 on range     4360.6 < λ <     4368.2
Line HeII_4686_br    coverage: 1.000 on range     4647.9 < λ <     4726.1
Line Hb_na           coverage: 1.000 on range     4858.5 < λ <     4866.9
Line Hb_br           coverage: 1.000 on range     4822.1 < λ <     4903.2
Line OIII_4959       coverage: 1.000 on range       4956 < λ <     4964.6
Line OIII_5007       coverage: 1.000 on range     5003.9 < λ <     5012.6
Line OIII_5007_bw    coverage: 1.000 on range     4983.2 < λ <     5033.3
Line HeI_5876_br     coverage: 0.971 on range     5828.3 < λ <     5926.3
Line OI_6300         coverage: 1.000 on range     6296.6 < λ <     6307.5
Line OI_6364         coverage: 0.600 on range       6360 < λ <     6371.1
Line NII_6549        coverage: 0.000 on range     6544.2 < λ <     6555.5, threshold is < 0.600, neglecting...
Line Ha_na           coverage: 0.000 on range     6558.9 < λ <     6570.3, threshold is < 0.600, neglecting...
Line Ha_br           coverage: 0.118 on range     6509.9 < λ <     6619.3, threshold is < 0.600, neglecting...
Line Ha_bb           coverage: 0.284 on range     6345.8 < λ <     6783.4, threshold is < 0.600, neglecting...
Line NII_6583        coverage: 0.000 on range     6579.6 < λ <       6591, threshold is < 0.600, neglecting...
Line SII_6716        coverage: 0.000 on range     6712.4 < λ <     6724.1, threshold is < 0.600, neglecting...
Line SII_6731        coverage: 0.000 on range     6726.8 < λ <     6738.5, threshold is < 0.600, neglecting...

Updated coverage:
Line NeV_3345        coverage: 1.000 on range     3343.5 < λ <     3349.3
Line NeV_3426        coverage: 1.000 on range     3423.5 < λ <     3429.5
Line OII_3727        coverage: 1.000 on range     3725.2 < λ <     3731.7
Line NeIII_3869      coverage: 1.000 on range     3866.8 < λ <     3873.5
Line Hd_br           coverage: 1.000 on range     4068.7 < λ <     4137.1
Line Hg_br           coverage: 1.000 on range     4305.5 < λ <     4377.9
Line OIII_4363       coverage: 1.000 on range     4360.6 < λ <     4368.2
Line HeII_4686_br    coverage: 1.000 on range     4647.9 < λ <     4726.1
Line Hb_na           coverage: 1.000 on range     4858.5 < λ <     4866.9
Line Hb_br           coverage: 1.000 on range     4822.1 < λ <     4903.2
Line OIII_4959       coverage: 1.000 on range       4956 < λ <     4964.6
Line OIII_5007       coverage: 1.000 on range     5003.9 < λ <     5012.6
Line OIII_5007_bw    coverage: 1.000 on range     4983.2 < λ <     5033.3
Line HeI_5876_br     coverage: 0.971 on range     5828.3 < λ <     5926.3
Line OI_6300         coverage: 1.000 on range     6296.6 < λ <     6307.5
Line OI_6364         coverage: 0.000 on range       6360 < λ <     6371.1, threshold is < 0.600, neglecting...
Good samples after line coverage filter: 3309 / 3822

Fit continuum components...
Fit summary: #data: 3309, #free pars: 5, red. fit stat.: 1.957, status: OK      
Cont. norm. (before): 0.05000436561135932
Cont. norm. (after) : 0.03889446363571945

Fit iron templates...
Ignoring ironuv component (threshold: 0.3)
Fit summary: #data: 3309, #free pars: 2, red. fit stat.: 3.6618, status: OK      

Fit known emission lines...
Fit summary: #data: 3309, #free pars: 42, red. fit stat.: 2.307, status: OK      

Fit nuisance emission lines...
Fit summary: #data: 3309, #free pars: 3, red. fit stat.: 2.2622, status: OK      
Fit summary: #data: 3309, #free pars: 3, red. fit stat.: 2.0814, status: WARN
CMPFit status = 2 may imply one (or more) guess values are too far from optimum
Fit summary: #data: 3309, #free pars: 3, red. fit stat.: 1.9265, status: OK      
Fit summary: #data: 3309, #free pars: 3, red. fit stat.: 1.6367, status: OK      
Fit summary: #data: 3309, #free pars: 3, red. fit stat.: 1.6367, status: OK      
Fit summary: #data: 3309, #free pars: 3, red. fit stat.: 1.6174, status: OK      
Fit summary: #data: 3309, #free pars: 3, red. fit stat.: 1.5864, status: OK      
Fit summary: #data: 3309, #free pars: 3, red. fit stat.: 1.5317, status: OK      
Fit summary: #data: 3309, #free pars: 3, red. fit stat.: 1.5301, status: OK      
Fit summary: #data: 3309, #free pars: 3, red. fit stat.: 1.5085, status: OK      

Last run with all parameters free...
Fit summary: #data: 3309, #free pars: 76, red. fit stat.: 1.2098, status: OK      
Disabling nuisance6 (unc. / norm. > 3)
Disabling nuisance7 (norm. = 0)

Re-run fit...
Fit summary: #data: 3309, #free pars: 70, red. fit stat.: 1.1997, status: OK      

Total elapsed time: 0.897 s
Components:
────────────────────┬─────────────────────┬───────┬─────────────┬───────────┬───────────┬───────────┬─────────╮
 Component           Type                 #Free  Eval. count  Min        Max        Mean       NaN/Inf 
├────────────────────┼─────────────────────┼───────┼─────────────┼───────────┼───────────┼───────────┼─────────┤
 main                SumReducer                  4825           0.03976     0.1162    0.06867  0       
 ├─╴Continuum        SumReducer                  324            0.03796     0.1108     0.0643  0       
 │  ├─╴QSOcont       QSFit.powerlaw       2      203            0.01535     0.1058    0.04834  0       
 │  ├─╴Galaxy        QSFit.hostgalaxy     1      135           0.001944    0.02519    0.01529  0       
 │  └─╴Balmer        QSFit.balmercont     2      281                  0   0.002006  0.0006693  0       
 ├─╴Iron             SumReducer                  171                  0    0.00823   0.001372  0       
 │  ├─╴Ironoptbr     QSFit.ironopt        1      134                  0   0.007232   0.001172  0       
 │  └─╴Ironoptna     QSFit.ironopt        1      129                  0   0.002149  0.0001998  0       
 ├─╴NarrowLines      SumReducer                  2607                 0    0.04507  0.0006824  0       
 │  ├─╴NeV_3345      QSFit.SpecLineGauss  3      386                  0    0.01092  7.893e-06  0       
 │  ├─╴NeV_3426      QSFit.SpecLineGauss  3      386                  0    0.01596  0.0001489  0       
 │  ├─╴OII_3727      QSFit.SpecLineGauss  3      386                  0    0.03512  8.496e-05  0       
 │  ├─╴NeIII_3869    QSFit.SpecLineGauss  3      386                  0    0.01062  9.911e-05  0       
 │  ├─╴OIII_4363     QSFit.SpecLineGauss  3      386                  0   0.008795  5.827e-06  0       
 │  ├─╴Hb_na         QSFit.SpecLineGauss  3      386                  0    0.02003  4.912e-05  0       
 │  ├─╴OIII_4959     QSFit.SpecLineGauss  2      461                  0    0.01697  2.665e-05  0       
 │  ├─╴OIII_5007     QSFit.SpecLineGauss  3      386                  0    0.04179  0.0001058  0       
 │  ├─╴OIII_5007_bw  QSFit.SpecLineGauss  3      536                  0   0.004328  0.0001057  0       
 │  └─╴OI_6300       QSFit.SpecLineGauss  3      348                  0   0.005748  4.845e-05  0       
 ├─╴BroadLines       SumReducer                  1365                 0    0.02039   0.001041  0       
 │  ├─╴Hd_br         QSFit.SpecLineGauss  3      386                  0   0.002347  0.0001628  0       
 │  ├─╴Hg_br         QSFit.SpecLineGauss  1      461                  0    0.00929    0.00021  0       
 │  ├─╴HeII_4686_br  QSFit.SpecLineGauss  3      386                  0   0.001837  1.999e-05  0       
 │  ├─╴Hb_br         QSFit.SpecLineGauss  3      386                  0    0.02039  0.0004618  0       
 │  └─╴HeI_5876_br   QSFit.SpecLineGauss  3      386                  0   0.003381   0.000186  0       
 └─╴NuisanceLines    SumReducer                  1289                 0    0.01425   0.001277  0       
    ├─╴nuisance1     QSFit.SpecLineGauss  3      219                  0    0.01192  4.677e-05  0       
    ├─╴nuisance2     QSFit.SpecLineGauss  3      219                  0    0.00738  0.0003437  0       
    ├─╴nuisance3     QSFit.SpecLineGauss  3      231                  0    0.01425  0.0001777  0       
    ├─╴nuisance4     QSFit.SpecLineGauss  3      211                  0    0.01012  0.0004713  0       
    ├─╴nuisance5     QSFit.SpecLineGauss         10                   0          0          0  0       
    ├─╴nuisance6     QSFit.SpecLineGauss         152                  0          0          0  0       
    ├─╴nuisance7     QSFit.SpecLineGauss         149                  0          0          0  0       
    ├─╴nuisance8     QSFit.SpecLineGauss  3      215                  0   0.004369  0.0002035  0       
    ├─╴nuisance9     QSFit.SpecLineGauss  3      273                  0   0.009065  8.172e-06  0       
    └─╴nuisance10    QSFit.SpecLineGauss  3      194                  0   0.003824  2.559e-05  0       
╰────────────────────┴─────────────────────┴───────┴─────────────┴───────────┴───────────┴───────────┴─────────╯

Parameters:
───────────────────┬─────────────────────┬────────┬─────────────────┬───────────┬───────────┬───────────┬──────────────────────────────────╮
 Component          Type                 Param.  Range            Value      Uncert.    Actual     Patch                            
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 QSOcont            QSFit.powerlaw       norm    6.4e-05:Inf        0.04237   0.001341                                              
                                         x0      0:Inf                 4152   (fixed)                                               
                                         alpha   -3:1                -2.396    0.08915                                              
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 Galaxy             QSFit.hostgalaxy     norm    0:Inf              0.02346   0.001234                                              
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 Balmer             QSFit.balmercont     norm    0:0.5              0.03295    0.03612   0.001396  (m, v)->v * (m[:QSOcont]).norm   
                                         ratio   0.1:1               0.6263     0.5714                                              
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 Ironoptbr          QSFit.ironopt        norm    0:Inf                4.501     0.3906                                              
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 Ironoptna          QSFit.ironopt        norm    0:Inf               0.7051     0.2421                                              
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 NeV_3345           QSFit.SpecLineGauss  norm    0:Inf              0.02008    0.01675                                              
                                         center  0:Inf                 3346   (fixed)                                               
                                         fwhm    1e+02:2e+03          146.5      140.2                                              
                                         voff    -1e+03:1e+03         742.2      59.36                                              
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 NeV_3426           QSFit.SpecLineGauss  norm    0:Inf               0.3883     0.0497                                              
                                         center  0:Inf                 3426   (fixed)                                               
                                         fwhm    1e+02:2e+03           2000                                                         
                                         voff    -1e+03:1e+03         451.6      140.4                                              
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 OII_3727           QSFit.SpecLineGauss  norm    0:Inf               0.2414      0.028                                              
                                         center  0:Inf                 3728   (fixed)                                               
                                         fwhm    1e+02:2e+03          519.5      67.07                                              
                                         voff    -1e+03:1e+03        -63.14      28.58                                              
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 NeIII_3869         QSFit.SpecLineGauss  norm    0:Inf               0.2918    0.04368                                              
                                         center  0:Inf                 3870   (fixed)                                               
                                         fwhm    1e+02:2e+03           2000                                                         
                                         voff    -1e+03:1e+03         485.9      169.5                                              
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 Hd_br              QSFit.SpecLineGauss  norm    0:Inf               0.5124     0.1792                                              
                                         center  0:Inf                 4103   (fixed)                                               
                                         fwhm    9e+02:1.5e+04      1.5e+04                                                         
                                         voff    -3e+03:3e+03          3000                                                         
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 Hg_br              QSFit.SpecLineGauss  norm    0:Inf               0.6961    0.08514                                              
                                         center  0:Inf                 4342   (fixed)                                               
                                         fwhm    9e+02:1.5e+04         5000   (fixed)        4865  Hb_br                            
                                         voff    -3e+03:3e+03             0   (fixed)      -68.16  Hb_br                            
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 OIII_4363          QSFit.SpecLineGauss  norm    0:Inf              0.01938     0.0131                                              
                                         center  0:Inf                 4364   (fixed)                                               
                                         fwhm    1e+02:2e+03          142.1      104.2                                              
                                         voff    -1e+03:1e+03        -75.38      46.46                                              
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 HeII_4686_br       QSFit.SpecLineGauss  norm    0:Inf              0.07174    0.04494                                              
                                         center  0:Inf                 4687   (fixed)                                               
                                         fwhm    9e+02:1.5e+04         2348       1594                                              
                                         voff    -3e+03:3e+03         -1536      639.5                                              
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 Hb_na              QSFit.SpecLineGauss  norm    0:Inf               0.1821    0.02508                                              
                                         center  0:Inf                 4863   (fixed)                                               
                                         fwhm    1e+02:1e+03          521.6      68.58                                              
                                         voff    -1e+03:1e+03        -139.4      26.59                                              
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 Hb_br              QSFit.SpecLineGauss  norm    0:Inf                1.712    0.08856                                              
                                         center  0:Inf                 4863   (fixed)                                               
                                         fwhm    9e+02:1.5e+04         4865      266.4                                              
                                         voff    -3e+03:3e+03        -68.16      98.42                                              
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 OIII_4959          QSFit.SpecLineGauss  norm    0:Inf               0.1007    0.01782                                              
                                         center  0:Inf                 4960   (fixed)                                               
                                         fwhm    1e+02:2e+03          335.4      60.76                                              
                                         voff    -1e+03:1e+03             0   (fixed)      -2.118  OIII_5007                        
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 OIII_5007          QSFit.SpecLineGauss  norm    0:Inf               0.4037    0.02618                                              
                                         center  0:Inf                 5008   (fixed)                                               
                                         fwhm    1e+02:2e+03          538.9      36.64                                              
                                         voff    -1e+03:1e+03        -2.118      12.07                                              
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 OIII_5007_bw       QSFit.SpecLineGauss  norm    0:Inf               0.4193    0.09328                                              
                                         center  0:Inf                 5008   (fixed)                                               
                                         fwhm    0:5e+03               4914       1269       5453  (m, v)->v + (m[:OIII_5007]).fwhm 
                                         voff    0:2e+03               1691      601.1       1689  (m, v)->v + (m[:OIII_5007]).voff 
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 HeI_5876_br        QSFit.SpecLineGauss  norm    0:Inf                1.033     0.2551                                              
                                         center  0:Inf                 5877   (fixed)                                               
                                         fwhm    9e+02:1.5e+04    1.465e+04       3262                                              
                                         voff    -3e+03:3e+03          2949       1112                                              
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 OI_6300            QSFit.SpecLineGauss  norm    0:Inf               0.2571    0.06123                                              
                                         center  0:Inf                 6302   (fixed)                                               
                                         fwhm    1e+02:2e+03           2000                                                         
                                         voff    -1e+03:1e+03        -315.4      299.2                                              
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 nuisance1          QSFit.SpecLineGauss  norm    0:Inf               0.3453    0.06326                                              
                                         center  6.1e+03:6.1e+03       6081      2.311                                              
                                         fwhm    6e+02:1e+04           1341      272.8                                              
                                         voff    -Inf:Inf                 0   (fixed)                                               
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 nuisance2          QSFit.SpecLineGauss  norm    0:Inf               0.9182     0.1807                                              
                                         center  3.5e+03:3.5e+03       3507                                                         
                                         fwhm    6e+02:1e+04          1e+04                                                         
                                         voff    -Inf:Inf                 0   (fixed)                                               
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 nuisance3          QSFit.SpecLineGauss  norm    0:Inf               0.4008     0.1056                                              
                                         center  3e+03:3e+03           2960       3.03                                              
                                         fwhm    6e+02:1e+04           2677      746.3                                              
                                         voff    -Inf:Inf                 0   (fixed)                                               
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 nuisance4          QSFit.SpecLineGauss  norm    0:Inf                1.144     0.1631                                              
                                         center  3.2e+03:3.2e+03       3186      8.479                                              
                                         fwhm    6e+02:1e+04          1e+04                                                         
                                         voff    -Inf:Inf                 0   (fixed)                                               
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 nuisance5 (fixed)  QSFit.SpecLineGauss  norm    0:Inf                    0   (fixed)                                               
                                         center  5.8e+03:5.8e+03       5789   (fixed)                                               
                                         fwhm    6e+02:1e+04           4364   (fixed)                                               
                                         voff    -Inf:Inf                 0   (fixed)                                               
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 nuisance6 (fixed)  QSFit.SpecLineGauss  norm    0:Inf                    0   (fixed)                                               
                                         center  3.8e+03:3.8e+03       3826   (fixed)                                               
                                         fwhm    6e+02:1e+04          1e+04   (fixed)                                               
                                         voff    -Inf:Inf                 0   (fixed)                                               
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 nuisance7 (fixed)  QSFit.SpecLineGauss  norm    0:Inf                    0   (fixed)                                               
                                         center  3e+03:3.1e+03         3058   (fixed)                                               
                                         fwhm    6e+02:1e+04          1e+04   (fixed)                                               
                                         voff    -Inf:Inf                 0   (fixed)                                               
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 nuisance8          QSFit.SpecLineGauss  norm    0:Inf               0.5122     0.1623                                              
                                         center  3.3e+03:3.3e+03       3304      18.72                                              
                                         fwhm    6e+02:1e+04          1e+04                                                         
                                         voff    -Inf:Inf                 0   (fixed)                                               
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 nuisance9          QSFit.SpecLineGauss  norm    0:Inf                0.153    0.08782                                              
                                         center  6e+03:6e+03           6004      3.555                                              
                                         fwhm    6e+02:1e+04          630.9      325.8                                              
                                         voff    -Inf:Inf                 0   (fixed)                                               
├───────────────────┼─────────────────────┼────────┼─────────────────┼───────────┼───────────┼───────────┼──────────────────────────────────┤
 nuisance10         QSFit.SpecLineGauss  norm    0:Inf              0.07208    0.04767                                              
                                         center  3.7e+03:3.7e+03       3697      5.127                                              
                                         fwhm    6e+02:1e+04           1437       1019                                              
                                         voff    -Inf:Inf                 0   (fixed)                                               
╰───────────────────┴─────────────────────┴────────┴─────────────────┴───────────┴───────────┴───────────┴──────────────────────────────────╯

The best fit model can be displayed using either Gnuplot.jl (to open a plot window):

using Gnuplot
@gp res yrange=[0, 0.25]

or GModelFitViewer.jl (to display the plot in a browser):

using GModelFitViewer
viewer(res)

Also, the best fit parameter values can be accessed for any component with (e.g.):

println("Hb integrated luminosity: ",
        res.bestfit[:Hb_br].norm.val, " +/- ",
        res.bestfit[:Hb_br].norm.unc, " 10^42 erg s^-1")
println("Hb full width at half maximum: ",
        res.bestfit[:Hb_br].fwhm.val, " +/- ",
        res.bestfit[:Hb_br].fwhm.unc, " km/s")
println("Host galaxy lum. density at 5500A: ",
        res.bestfit[:Galaxy].norm.val, " +/- ",
        res.bestfit[:Galaxy].norm.unc, " 10^42 erg s^-1 A^-1")
Hb integrated luminosity: 1.7117009953205213 +/- 0.08855574387472627 10^42 erg s^-1
Hb full width at half maximum: 4864.552468568376 +/- 266.4169262723797 km/s
Host galaxy lum. density at 5500A: 0.023464141815571073 +/- 0.0012342886797891326 10^42 erg s^-1 A^-1