desihub / fastspecfit

Fast spectral synthesis and emission-line fitting of DESI spectra.
https://fastspecfit.readthedocs.org
BSD 3-Clause "New" or "Revised" License
13 stars 2 forks source link

Broad+Narrow Balmer line components #47

Closed stephjuneau closed 2 years ago

stephjuneau commented 3 years ago

Some Seyfert galaxies will likely have both a broad and a narrow Balmer line components. This example shows such a case with broad+narrow components on H-beta and H-alpha. However, the linewidth reported by fastspecfit is not larger for Halpha than for [OIII]5007, as I would have expected if fitting a single broad component to Halpha but a single narrow component to forbidden lines such as [OIII]5007.

     TARGETID     HPXPIXEL SURVEY FAPRGRM HALPHA_SIGMA OIII_5007_SIGMA
----------------- -------- ------ ------- ------------ ---------------
39628517884825354     9730    sv1    dark    126.67458       139.04639
stephjuneau commented 3 years ago

For reference, these are the values as above for fastspecfit, and the linewidths reported by SDSS emission line VAC (DR12), where the Balmer lines are just fit with one component.

image
Ragadeepika-Pucha commented 2 years ago

Here is another example. This is a low-mass broad AGN from Reines2013 sample.

image

If needed, the sdss information is - image

moustakas commented 2 years ago

Thanks @stephjuneau @Ragadeepika-Pucha, I should be able to tackle this feature request soon.

One question is how to expand the data model in order to accommodate the fact that the Balmer lines would appear twice, once for the broad line and once for the narrow line? Currently, these are the quantities fastspec outputs:

HALPHA_AMP | float32 | 1e-17 erg / (Angstrom cm2 s) | Emission line amplitude.
HALPHA_AMP_IVAR | float32 | 1e+34 Angstrom2 cm4 s2 / erg2 | Inverse variance of line-amplitude.
HALPHA_FLUX | float32 | 1e-17 erg / (cm2 s) | Gaussian-integrated emission-line flux.
HALPHA_FLUX_IVAR | float32 | 1e+34 cm4 s2 / erg2 | Inverse variance of integrated flux.
HALPHA_BOXFLUX | float32 | 1e-17 erg / (cm2 s) | Boxcar-integrated emission-line flux.
HALPHA_VSHIFT | float32 | km / s | Velocity shift relative to the redrock redshift.
HALPHA_SIGMA | float32 | km / s | Gaussian emission-line width.
HALPHA_CONT | float32 | 1e-17 erg / (Angstrom cm2 s) | Continuum flux at line center.
HALPHA_CONT_IVAR | float32 | 1e+34 Angstrom2 cm4 s2 / erg2 | Inverse variance of continuum flux.
HALPHA_EW | float32 | Angstrom | Rest-frame emission-line equivalent width.
HALPHA_EW_IVAR | float32 | 1 / Angstrom2 | Inverse variance of equivalent width.
HALPHA_FLUX_LIMIT | float32 | erg / (cm2 s) | One-sigma upper limit on the emission line flux.
HALPHA_EW_LIMIT | float32 | Angstrom | One-sigma upper limit on the emission line equivalent width.
HALPHA_CHI2 | float32 |   | Reduced chi^2 of the line-fit (default value 1e6).
HALPHA_NPIX | int32 |   | Number of pixels attributed to the emission line.

I propose using the HALPHA_* prefix for the narrow component and adding one new line (per Balmer line) for the broad component, HALPHA_BROAD_*.

Thoughts?

stephjuneau commented 2 years ago

Hi @moustakas, so I think you could use NARROW_SIGMA and BROAD_SIGMA as all the narrow (broad) components could be interpreted as coming from the same gas kinematics. So the Balmer lines case is not unique because narrow+broad components will also exist for HeII, and other broad lines, etc. I think it's fine to assign the default name for the narrow component and add the LINE_BROAD-* as a new line. If you do this, will the *_CHI2 value be calculated for the total line fit (narrow+broad)? Also, you wouldn't need additional continuum quantities (CONT and CONT_IVAR). One last question, will fastspecfit include an overall RCHI2 value? It seems that there is a continuum CHI2 and then a value per line, but I think it would be informative to have the overall value for the model (continuum+lines) if not already available -- I didn't see it in the Everest files. Happy to discuss any of this further!

moustakas commented 2 years ago

@stephjuneau @Ragadeepika-Pucha how do you want me to handle the helium lines? I realize that they should have the same gas dynamics as the Balmer lines but I doubt we'll be able to constrain both the broad and narrow helium components. Can I just assume they will be narrow? Other suggestions?

moustakas commented 2 years ago

@stephjuneau @Ragadeepika-Pucha here's a first crack at modeling 39633365313259365 with the https://github.com/desihub/fastspecfit/tree/fuji-dev branch. The deblending doesn't look too bad! However, the forbidden lines really look like they want a slightly different velocity shift from the narrow Balmer lines, at least in the red (i.e., [SIII]). The [OII] doublet looks pretty good, though, so I'm not totally sure what to make of this result.

fastspec /global/cfs/cdirs/desi/spectro/redux/everest/healpix/sv2/bright/111/11191/redrock-sv2-bright-11191.fits \
  -o fastspec-new.fits --targetids 39633365313259365 --specprod everest

fuji-dev branch

Screen Shot 2022-01-22 at 6 30 07 PM

For comparison: Everest branch

Screen Shot 2022-01-22 at 6 54 04 PM
moustakas commented 2 years ago

Finally, here's a nice QSO example at low redshift, z=0.69:

fastspec /global/cfs/cdirs/desi/spectro/redux/everest/tiles/cumulative/80607/20201219/redrock-9-80607-thru20201219.fits \
  -o fastspec.fits --targetids 39633331528141827 --specprod everest

Here, I get a narrow Balmer line-width of 139 km/s and a broad Balmer line-width of 1203 km/s. By contrast, the MgII doublet yields a line-width of 1261 km/s and a very different velocity shift (-297 km/s vs +16 km/s) from the broad Balmer lines. We might actually be able to measure black hole masses!

In addition, here I get an [OII] doublet ratio (see #39) of 1.13, which implies an electron density of ~500/cm^3 (depending on the electron temperature), which is consistent with this being a QSO, while the MgII doublet ratio ends up being pegged at its lower limit of 0.5. Nevertheless, the fit looks OK.

For completeness, I show the Everest-era fit below the new fit.

fuji-dev branch

Screen Shot 2022-01-22 at 9 37 13 PM

Everest branch

Screen Shot 2022-01-22 at 9 35 46 PM
Ragadeepika-Pucha commented 2 years ago

@moustakas Thank you for the fits - These look amazing! The velocity shifts in forbidden lines in the first example are interesting. How can I access the fastspecfit results for these fits?

VFawcett commented 2 years ago

@moustakas QSO fitting comparison: PyQSOFit to modified fastspecfit #59

moustakas commented 2 years ago

Done in https://github.com/desihub/fastspecfit/pull/55 and https://github.com/desihub/fastspecfit/pull/69.