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

consider modeling SiIII] and CIII] as a single line #73

Closed moustakas closed 1 year ago

moustakas commented 2 years ago

SiIII] 1892 and CIII 1908 are sufficiently blended in many QSO spectra (given their line-widths) that it may be more numerically stable to fit both lines using a single Gaussian model. One example is

fastspec /global/cfs/cdirs/desi/spectro/redux/fuji/healpix/sv1/dark/102/10282/redrock-sv1-dark-10282.fits \
  --targetids 39628362699768732 -o fastspec.fits

Here, I have tied the velocity width and centroid of the two lines together, but the optimizer chooses to drop CIII] and fit the whole line-emission with a single SiIII] line with a velocity shift of 2500 km/s (which is at the boundary of the prior) and a line-width of 4700 km/s. Meanwhile, allowing both lines to be fit independently results in both lines being dropped, which is not ideal.

DEBUG:emlines.py:1551:fit: CIV_1549 VSHIFT: 0.0000
DEBUG:emlines.py:1551:fit: CIV_1549 SIGMA: 0.0000
DEBUG:emlines.py:1551:fit: CIV_1549 AMP: 0.0000
DEBUG:emlines.py:1551:fit: CIV_1549 AMP_IVAR: 0.5845
DEBUG:emlines.py:1551:fit: CIV_1549 CHI2: 0.0000
DEBUG:emlines.py:1551:fit: CIV_1549 NPIX: 104.0000
DEBUG:emlines.py:1553:fit: CIV_1549 FLUX: 0.0000
DEBUG:emlines.py:1553:fit: CIV_1549 BOXFLUX: -36.5274
DEBUG:emlines.py:1553:fit: CIV_1549 FLUX_IVAR: 0.0000
DEBUG:emlines.py:1553:fit: CIV_1549 BOXFLUX_IVAR: 0.1242
DEBUG:emlines.py:1553:fit: CIV_1549 CONT: 1.7428
DEBUG:emlines.py:1553:fit: CIV_1549 CONT_IVAR: 3227.8439
DEBUG:emlines.py:1553:fit: CIV_1549 EW: 0.0000
DEBUG:emlines.py:1553:fit: CIV_1549 EW_IVAR: 0.0000
DEBUG:emlines.py:1553:fit: CIV_1549 FLUX_LIMIT: 0.9200
DEBUG:emlines.py:1553:fit: CIV_1549 EW_LIMIT: 1.7752
DEBUG:emlines.py:1554:fit:
DEBUG:emlines.py:1551:fit: SILIII_1892 VSHIFT: 2500.0000
DEBUG:emlines.py:1551:fit: SILIII_1892 SIGMA: 4694.8662
DEBUG:emlines.py:1551:fit: SILIII_1892 AMP: 0.8611
DEBUG:emlines.py:1551:fit: SILIII_1892 AMP_IVAR: 23.9534
DEBUG:emlines.py:1551:fit: SILIII_1892 CHI2: 1.8106
DEBUG:emlines.py:1551:fit: SILIII_1892 NPIX: 499.0000
DEBUG:emlines.py:1553:fit: SILIII_1892 FLUX: 215.6014
DEBUG:emlines.py:1553:fit: SILIII_1892 BOXFLUX: 260.6195
DEBUG:emlines.py:1553:fit: SILIII_1892 FLUX_IVAR: 0.0586
DEBUG:emlines.py:1553:fit: SILIII_1892 BOXFLUX_IVAR: 0.0586
DEBUG:emlines.py:1553:fit: SILIII_1892 CONT: 1.5097
DEBUG:emlines.py:1553:fit: SILIII_1892 CONT_IVAR: 34871.4171
DEBUG:emlines.py:1553:fit: SILIII_1892 EW: 480.2672
DEBUG:emlines.py:1553:fit: SILIII_1892 EW_IVAR: 0.0118
DEBUG:emlines.py:1553:fit: SILIII_1892 FLUX_LIMIT: 1.3408
DEBUG:emlines.py:1553:fit: SILIII_1892 EW_LIMIT: 2.9868

Screen Shot 2022-07-18 at 9 05 08 AM

moustakas commented 1 year ago

Here's this same object with the #92 branch of the code. I think I'm still inclined to fit these two lines as a single super broad line...

Screen Shot 2022-12-27 at 5 52 34 PM
DEBUG:emlines.py:1400:_populate_emtable: SILIII_1892 VSHIFT: -350.9382
DEBUG:emlines.py:1400:_populate_emtable: SILIII_1892 SIGMA: 5847.4839
DEBUG:emlines.py:1400:_populate_emtable: SILIII_1892 AMP: 0.9683
DEBUG:emlines.py:1400:_populate_emtable: SILIII_1892 AMP_IVAR: 23.6975
DEBUG:emlines.py:1400:_populate_emtable: SILIII_1892 CHI2: 1.9116
DEBUG:emlines.py:1400:_populate_emtable: SILIII_1892 NPIX: 620.0000
DEBUG:emlines.py:1402:_populate_emtable: SILIII_1892 FLUX: 301.1134
DEBUG:emlines.py:1402:_populate_emtable: SILIII_1892 BOXFLUX: 367.9625
DEBUG:emlines.py:1402:_populate_emtable: SILIII_1892 FLUX_IVAR: 0.0481
DEBUG:emlines.py:1402:_populate_emtable: SILIII_1892 BOXFLUX_IVAR: 0.0481
DEBUG:emlines.py:1402:_populate_emtable: SILIII_1892 CONT: 1.5050
DEBUG:emlines.py:1402:_populate_emtable: SILIII_1892 CONT_IVAR: 31967.3565
DEBUG:emlines.py:1402:_populate_emtable: SILIII_1892 EW: 59.4932
DEBUG:emlines.py:1402:_populate_emtable: SILIII_1892 EW_IVAR: 1.2314
DEBUG:emlines.py:1402:_populate_emtable: SILIII_1892 FLUX_LIMIT: 1.7393
DEBUG:emlines.py:1402:_populate_emtable: SILIII_1892 EW_LIMIT: 0.3436

DEBUG:emlines.py:1400:_populate_emtable: CIII_1908 VSHIFT: -350.9382
DEBUG:emlines.py:1400:_populate_emtable: CIII_1908 SIGMA: 5847.4839
DEBUG:emlines.py:1400:_populate_emtable: CIII_1908 AMP: 0.0032
DEBUG:emlines.py:1400:_populate_emtable: CIII_1908 AMP_IVAR: 24.0513
DEBUG:emlines.py:1400:_populate_emtable: CIII_1908 CHI2: 1.9203
DEBUG:emlines.py:1400:_populate_emtable: CIII_1908 NPIX: 626.0000
DEBUG:emlines.py:1402:_populate_emtable: CIII_1908 FLUX: 0.9942
DEBUG:emlines.py:1402:_populate_emtable: CIII_1908 BOXFLUX: 341.1957
DEBUG:emlines.py:1402:_populate_emtable: CIII_1908 FLUX_IVAR: 0.0493
DEBUG:emlines.py:1402:_populate_emtable: CIII_1908 BOXFLUX_IVAR: 0.0493
DEBUG:emlines.py:1402:_populate_emtable: CIII_1908 CONT: 1.5000
DEBUG:emlines.py:1402:_populate_emtable: CIII_1908 CONT_IVAR: 31872.2498
DEBUG:emlines.py:1402:_populate_emtable: CIII_1908 EW: 0.1971
DEBUG:emlines.py:1402:_populate_emtable: CIII_1908 EW_IVAR: 1.2538
DEBUG:emlines.py:1402:_populate_emtable: CIII_1908 FLUX_LIMIT: 1.7573
DEBUG:emlines.py:1402:_populate_emtable: CIII_1908 EW_LIMIT: 0.3484
moustakas commented 1 year ago

Vicky has suggested we continue to model these lines separately and indeed the data do seem to demand two lines; closing.

image