Closed moustakas closed 1 year ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
py/fastspecfit/emlines.py | 97 | 104 | 93.27% | ||
py/fastspecfit/fastspecfit.py | 1 | 10 | 10.0% | ||
py/fastspecfit/util.py | 6 | 16 | 37.5% | ||
py/fastspecfit/io.py | 23 | 38 | 60.53% | ||
py/fastspecfit/continuum.py | 2 | 18 | 11.11% | ||
<!-- | Total: | 129 | 186 | 69.35% | --> |
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
py/fastspecfit/emlines.py | 2 | 50.57% | ||
py/fastspecfit/fastspecfit.py | 2 | 13.32% | ||
py/fastspecfit/io.py | 2 | 53.88% | ||
<!-- | Total: | 6 | --> |
Totals | |
---|---|
Change from base Build 5657428145: | 0.8% |
Covered Lines: | 2345 |
Relevant Lines: | 4543 |
Drilling into 39627835538672534
(healpix 27333
), the S/N on the amplitude goes from ~27 to ~11, but 11 still seems awful high:
To get the variance in the continuum around the line, I estimate the "robust" sigma of the pixels in the continuum as the 75 percentile minus the 25 percentile divided by 1.349: https://github.com/desihub/fastspecfit/blob/main/py/fastspecfit/emlines.py#L1082
If I instead use a simple 3-sigma-clipped standard deviation the S/N for [OIII] 4363 in this object reduces to ~9.9, which is pretty consistent with the "robust" sigma:
But I'm still not quite satisfied in these results.
TARGETID HEALPIX OIII_4363_AMP_V1 OIII_4363_AMP_SNR_V1 OIII_4363_AMP_V2 OIII_4363_AMP_SNR_V2 OIII_4363_FLUX_V1 OIII_4363_FLUX_SNR_V1 OIII_4363_FLUX_V2 OIII_4363_FLUX_SNR_V2 OIII_4363_NPIX_V1 OIII_4363_NPIX_V2
----------------- ------- ---------------- -------------------- ---------------- -------------------- ----------------- --------------------- ----------------- --------------------- ----------------- -----------------
39627474161632453 22658 0.80158347 5.891087 0.80158395 3.0986469 0.92319894 1.9468902 0.92283833 1.9461436 4 11
39627618634434462 26747 0.6733961 5.064175 0.67379916 1.3757114 0.9386274 1.8015784 0.93921065 1.8025398 4 11
39627637492024014 25867 0.79047346 8.422631 0.79109126 2.2558744 1.2159652 1.9418195 1.2169718 1.9434173 5 11
39627654223107867 40932 0.78591675 9.234115 0.7847825 1.3439605 1.0199049 1.6069658 1.0184418 1.6046405 4 11
39627666319479872 40921 0.81066114 7.5306277 0.810805 3.4451802 0.91887105 1.5535815 0.919182 1.5541008 4 11
39627669842691869 18725 0.5316252 5.3706093 0.5355014 2.1878185 0.7802198 1.819081 0.78486264 1.8299139 4 11
39627670027243211 17381 0.46667323 9.136572 0.46973577 1.2627052 0.7375257 1.2820904 0.74322593 1.2921442 4 11
39627690789048629 26843 0.44732478 5.195497 0.44594648 0.9012924 0.7357093 1.20796 0.7334782 1.2042744 5 11
39627695281145847 22770 0.21985178 7.4032803 0.21985513 0.64537954 0.348808 1.1136082 0.34881973 1.113727 5 11
39627701031539618 23170 0.43801486 5.8491445 0.43906757 1.4548409 0.6764019 1.4012468 0.6775936 1.403713 5 11
39627702575043078 27182 0.47294968 6.322607 0.47416905 1.2526602 0.72405344 1.3690087 0.72567046 1.3720732 5 11
39627703137078588 25582 0.57705325 5.1240916 0.58554816 1.1672889 0.9055195 1.8060454 0.9185896 1.8324302 4 11
39627714927265648 26846 0.6949042 5.5469003 0.6933647 0.90951604 1.0733902 1.709428 1.0715625 1.7066538 4 11
39627720753154699 27190 0.7886953 4.4995437 0.79238564 1.7895093 1.1071881 1.773739 1.1125295 1.7823209 4 11
39627726931361961 26874 0.57433814 4.5976515 0.57271695 1.0528032 0.99583966 1.8422568 0.9921845 1.835224 5 11
39627751187022090 27041 0.63522214 7.062515 0.631589 0.9350174 1.0219741 1.7310627 1.0162596 1.7213202 5 11
39627758367675205 31393 0.51248544 4.649577 0.51119226 1.2458849 0.92030156 1.246224 0.9182464 1.243726 5 11
39627775828559337 26260 0.65429604 4.6281986 0.6556657 1.7732824 0.9489775 1.7162926 0.9511386 1.7202446 5 11
39627782413617711 25939 0.5083716 14.933689 0.5093471 1.5316681 0.7112896 1.4406018 0.7131495 1.4443675 5 11
39627785097974911 18005 0.6397867 5.112813 0.6399844 1.865172 0.85381156 1.8115039 0.85397017 1.8120984 4 11
39627805482290470 27392 0.33002523 5.2760415 0.32240465 0.76751906 0.5286258 0.9741854 0.52071494 0.95960057 5 11
39627806191124904 26206 0.36865926 4.394622 0.36706984 0.7683166 0.67476493 1.2042142 0.67146885 1.1982371 5 11
39627823597490301 27394 0.5153714 7.8209496 0.5151445 2.2496543 0.87738895 1.8198375 0.87708586 1.8191003 5 11
39627824050475588 26296 0.54618657 4.4056306 0.5522574 1.3757923 0.76921296 1.0480423 0.7779564 1.0598806 4 11
39627835538670183 27247 0.5089733 4.1143155 0.50795835 1.2464485 0.84039867 1.7267444 0.84270453 1.7312112 5 11
39627835538672534 27333 3.8113892 27.56169 3.8128314 9.934304 0.51993185 0.7544324 0.5199327 0.7544336 4 11
39627841217758187 21882 0.6141452 22.553217 0.619206 1.0837158 1.0130118 1.9645466 1.0213217 1.9806235 5 11
39627841792376926 27066 0.31702465 4.1005464 0.3185926 0.6748023 0.48621154 0.7462357 0.48829505 0.7494504 5 11
39627842870313903 8198 0.4637944 4.1095233 0.46382633 1.0023264 0.588402 0.95486146 0.58827406 0.95451885 4 11
39627853372854738 21877 0.99615806 4.682783 0.9950927 1.7794544 1.3110943 1.7061741 1.3094313 1.7039965 4 11
39627859987271386 27104 0.852718 8.290379 0.8526726 2.1606624 1.1179242 1.8585533 1.1179563 1.8582861 4 11
39627866949816418 8226 0.67286426 4.233593 0.67265123 1.264874 0.8156081 1.6804136 0.8155647 1.6803243 4 11
39627890333058327 27683 0.39008853 4.2548943 0.38939545 1.3513856 0.6478823 1.1444217 0.6463846 1.1418637 5 11
39627920599157550 27712 0.69655937 4.9202476 0.6964924 2.236964 1.0042146 1.6750036 1.0042843 1.6753504 4 11
39627920959866996 26434 0.59808594 4.1380196 0.6001812 1.4820997 0.8762208 1.7679856 0.879395 1.7744712 4 11
39627926802532979 26496 1.0195965 11.714091 1.0217545 2.992052 0.51123863 0.8752846 0.512901 0.8781404 4 11
39627927075161805 26098 0.45716396 4.694467 0.45529318 0.7055326 0.6835449 1.0091693 0.6806857 1.0049564 5 11
39627927385543026 31467 1.3129799 15.687575 1.3216143 3.329349 0.46966967 0.8986222 0.46946162 0.89825404 4 11
39627927716890322 31511 0.3750537 4.4886284 0.3771995 0.7835819 0.5803369 1.1031259 0.58315057 1.1084574 5 11
39627932993323600 26434 0.5166419 5.6894937 0.5162561 1.2600701 0.79294723 1.3825387 0.79221344 1.3812279 5 11
@yuvoonng here is the latest fit for the object we've been discussing and below that are the full results. You can see that, as expected, the new line-amplitudes are more in-line with what the data show. You may also notice that the fluxes have changed, too, due to---it turns out---a different bug, which I'll announce more broadly to the group.
TARGETID HEALPIX OIII_4363_AMP_V1 OIII_4363_AMP_SNR_V1 OIII_4363_AMP_V2 OIII_4363_AMP_SNR_V2 OIII_4363_FLUX_V1 OIII_4363_FLUX_SNR_V1 OIII_4363_FLUX_V2 OIII_4363_FLUX_SNR_V2 OIII_4363_NPIX_V1 OIII_4363_NPIX_V2
----------------- ------- ---------------- -------------------- ---------------- -------------------- ----------------- --------------------- ----------------- --------------------- ----------------- -----------------
39627474161632453 22658 0.80158347 5.891087 0.59174657 2.2933915 0.92319894 1.9468902 0.9276309 1.9497676 4 15
39627618634434462 26747 0.6733961 5.064175 0.5827834 1.5154659 0.9386274 1.8015784 0.8872366 1.7055526 4 15
39627637492024014 25867 0.79047346 8.422631 0.6702724 2.7482188 1.2159652 1.9418195 1.2885427 2.0585308 5 15
39627654223107867 40932 0.78591675 9.234115 0.5033729 1.1209804 1.0199049 1.6069658 0.77326506 1.2190888 4 15
39627666319479872 40921 0.81066114 7.5306277 0.5104399 1.3791964 0.91887105 1.5535815 1.0740476 1.8183305 4 15
39627669842691869 18725 0.5316252 5.3706093 0.43425387 1.5510747 0.7802198 1.819081 0.9246239 2.153755 4 15
39627670027243211 17381 0.46667323 9.136572 0.37940165 1.2578294 0.7375257 1.2820904 0.84056306 1.4622184 4 15
39627690789048629 26843 0.44732478 5.195497 0.4426965 1.2557592 0.7357093 1.20796 0.8814872 1.446187 5 15
39627695281145847 22770 0.21985178 7.4032803 0.15755588 0.9003952 0.348808 1.1136082 0.31079903 0.9934871 5 15
39627701031539618 23170 0.43801486 5.8491445 0.3318827 1.3273196 0.6764019 1.4012468 0.54942393 1.1390735 5 15
39627702575043078 27182 0.47294968 6.322607 0.39947832 0.9693747 0.72405344 1.3690087 0.7590762 1.4346417 5 15
39627703137078588 25582 0.57705325 5.1240916 0.42356446 1.5208424 0.9055195 1.8060454 0.9129189 1.8227797 4 15
39627714927265648 26846 0.6949042 5.5469003 0.5592927 0.9010373 1.0733902 1.709428 1.1648173 1.8558733 4 15
39627720753154699 27190 0.7886953 4.4995437 0.72713006 1.3490331 1.1071881 1.773739 1.3298225 2.1276562 4 15
39627726931361961 26874 0.57433814 4.5976515 0.48245072 1.1491998 0.99583966 1.8422568 1.0358611 1.9087152 5 15
39627751187022090 27041 0.63522214 7.062515 0.50750256 0.7085783 1.0219741 1.7310627 0.94340676 1.5942131 5 15
39627758367675205 31393 0.51248544 4.649577 0.42528665 1.1048108 0.92030156 1.246224 0.93115777 1.2645309 5 15
39627775828559337 26260 0.65429604 4.6281986 0.53373855 1.1861311 0.9489775 1.7162926 0.67584413 1.2234557 5 15
39627782413617711 25939 0.5083716 14.933689 0.4226672 1.1173851 0.7112896 1.4406018 0.39145583 0.793469 5 15
39627785097974911 18005 0.6397867 5.112813 0.46455577 1.5618528 0.85381156 1.8115039 0.4995881 1.0636863 4 15
39627805482290470 27392 0.33002523 5.2760415 0.21180783 0.6467254 0.5286258 0.9741854 0.42006 0.77400947 5 15
39627806191124904 26206 0.36865926 4.394622 0.35399592 0.8273068 0.67476493 1.2042142 0.79553527 1.4177814 5 15
39627823597490301 27394 0.5153714 7.8209496 0.42579153 1.6001623 0.87738895 1.8198375 0.91274536 1.888244 5 15
39627824050475588 26296 0.54618657 4.4056306 0.41263336 0.7626869 0.76921296 1.0480423 0.8186291 1.1159037 4 15
39627835538670183 27247 0.5089733 4.1143155 0.4312652 1.3091731 0.84039867 1.7267444 0.94254404 1.9305542 5 15
39627835538672534 27333 3.8113892 27.56169 0.5079588 1.2951595 0.51993185 0.7544324 0.14042504 0.20007308 4 15
39627841217758187 21882 0.6141452 22.553217 0.42897668 0.7244192 1.0130118 1.9645466 0.99952525 1.9413675 5 15
39627841792376926 27066 0.31702465 4.1005464 0.27267545 0.7215216 0.48621154 0.7462357 0.55956364 0.8594576 5 15
39627842870313903 8198 0.4637944 4.1095233 0.31094763 0.7664973 0.588402 0.95486146 0.55588007 0.89441526 4 15
39627853372854738 21877 0.99615806 4.682783 0.74091655 0.96935403 1.3110943 1.7061741 0.09722571 0.12674384 4 15
39627859987271386 27104 0.852718 8.290379 0.6374405 2.2332582 1.1179242 1.8585533 0.93004465 1.5375146 4 15
39627866949816418 8226 0.67286426 4.233593 0.40169907 0.82870466 0.8156081 1.6804136 0.67136467 1.3794558 4 15
39627890333058327 27683 0.39008853 4.2548943 0.30390525 0.7207259 0.6478823 1.1444217 0.634548 1.1214639 5 15
39627920599157550 27712 0.69655937 4.9202476 0.49882007 1.3125601 1.0042146 1.6750036 1.0443455 1.7412695 4 15
39627920959866996 26434 0.59808594 4.1380196 0.50669736 1.2792659 0.8762208 1.7679856 0.9884001 1.9924709 4 15
39627926802532979 26496 1.0195965 11.714091 0.2247391 0.4037624 0.51123863 0.8752846 0.039704487 0.06951553 4 15
39627927075161805 26098 0.45716396 4.694467 0.4060926 0.5286029 0.6835449 1.0091693 0.8040978 1.1854738 5 15
39627927385543026 31467 1.3129799 15.687575 0.28605554 0.76128215 0.46966967 0.8986222 0.44220924 0.83586484 4 15
39627927716890322 31511 0.3750537 4.4886284 0.2920748 1.0984384 0.5803369 1.1031259 0.56908184 1.0828828 5 15
39627932993323600 26434 0.5166419 5.6894937 0.5139289 1.2608304 0.79294723 1.3825387 0.97825795 1.7043577 5 15
@moustakas Nice to see that!
The change reported in https://github.com/desihub/fastspecfit/issues/127#issuecomment-1657205052 leads to (much) larger flux uncertainties so the flux S/N distribution now is more sensible:
TARGETID HEALPIX OIII_4363_AMP_V1 OIII_4363_AMP_SNR_V1 OIII_4363_AMP_V2 OIII_4363_AMP_SNR_V2 OIII_4363_FLUX_V1 OIII_4363_FLUX_SNR_V1 OIII_4363_FLUX_V2 OIII_4363_FLUX_SNR_V2 OIII_4363_NPIX_V1 OIII_4363_NPIX_V2
----------------- ------- ---------------- -------------------- ---------------- -------------------- ----------------- --------------------- ----------------- --------------------- ----------------- -----------------
39627474161632453 22658 0.80158347 5.891087 0.59174657 1.6507187 0.92319894 1.9468902 0.9276309 0.5251954 4 18
39627618634434462 26747 0.6733961 5.064175 0.5827834 1.4791989 0.9386274 1.8015784 0.8872366 0.464796 4 18
39627637492024014 25867 0.79047346 8.422631 0.6702724 2.8446093 1.2159652 1.9418195 1.2885427 0.55887634 5 18
39627654223107867 40932 0.78591675 9.234115 0.5033729 1.0619872 1.0199049 1.6069658 0.77326506 0.32560888 4 18
39627666319479872 40921 0.81066114 7.5306277 0.5104399 1.3563741 0.91887105 1.5535815 1.0740476 0.49735418 4 18
39627669842691869 18725 0.5316252 5.3706093 0.43425387 1.486215 0.7802198 1.819081 0.9246239 0.5858586 4 18
39627670027243211 17381 0.46667323 9.136572 0.37940165 1.133174 0.7375257 1.2820904 0.84056306 0.39818212 4 18
39627690789048629 26843 0.44732478 5.195497 0.4426965 0.8293728 0.7357093 1.20796 0.8814872 0.39217803 5 18
39627695281145847 22770 0.21985178 7.4032803 0.15755588 0.7947355 0.348808 1.1136082 0.31079903 0.27788836 5 18
39627701031539618 23170 0.43801486 5.8491445 0.3318827 1.3005193 0.6764019 1.4012468 0.54942393 0.3105429 5 18
39627702575043078 27182 0.47294968 6.322607 0.39947832 1.0343088 0.72405344 1.3690087 0.7590762 0.39019215 5 18
39627703137078588 25582 0.57705325 5.1240916 0.42356446 1.1429102 0.9055195 1.8060454 0.9129189 0.50016534 4 18
39627714927265648 26846 0.6949042 5.5469003 0.5592927 0.9326846 1.0733902 1.709428 1.1648173 0.5027789 4 18
39627720753154699 27190 0.7886953 4.4995437 0.72713006 1.592655 1.1071881 1.773739 1.3298225 0.5790671 4 18
39627726931361961 26874 0.57433814 4.5976515 0.48245072 1.2042849 0.99583966 1.8422568 1.0358611 0.51124096 5 18
39627751187022090 27041 0.63522214 7.062515 0.50750256 0.71737367 1.0219741 1.7310627 0.94340676 0.42994696 5 18
39627758367675205 31393 0.51248544 4.649577 0.42528665 1.084897 0.92030156 1.246224 0.93115777 0.34865123 5 18
39627775828559337 26260 0.65429604 4.6281986 0.53373855 1.1983199 0.9489775 1.7162926 0.67584413 0.33672225 5 18
39627782413617711 25939 0.5083716 14.933689 0.4226672 1.1786524 0.7112896 1.4406018 0.39145583 0.21761854 5 18
39627785097974911 18005 0.6397867 5.112813 0.46455577 1.0993799 0.85381156 1.8115039 0.4995881 0.29104817 4 18
39627805482290470 27392 0.33002523 5.2760415 0.21180783 0.4067591 0.5286258 0.9741854 0.42006 0.2073464 5 18
39627806191124904 26206 0.36865926 4.394622 0.35399592 0.68622 0.67476493 1.2042142 0.79553527 0.3847353 5 18
39627823597490301 27394 0.5153714 7.8209496 0.42579153 1.5905213 0.87738895 1.8198375 0.91274536 0.50973433 5 18
39627824050475588 26296 0.54618657 4.4056306 0.41263336 0.94572073 0.76921296 1.0480423 0.8186291 0.2999517 4 18
39627835538670183 27247 0.5089733 4.1143155 0.4312652 1.4843968 0.84039867 1.7267444 0.94254404 0.524842 5 18
39627835538672534 27333 3.8113892 27.56169 0.5079588 1.054001 0.51993185 0.7544324 0.14042504 0.053878997 4 18
39627841217758187 21882 0.6141452 22.553217 0.42897668 0.6892543 1.0130118 1.9645466 0.99952525 0.5282989 5 18
39627841792376926 27066 0.31702465 4.1005464 0.27267545 0.56471926 0.48621154 0.7462357 0.55956364 0.23376772 5 18
39627842870313903 8198 0.4637944 4.1095233 0.31094763 0.56839997 0.588402 0.95486146 0.55588007 0.23891611 4 18
39627853372854738 21877 0.99615806 4.682783 0.74091655 1.0442078 1.3110943 1.7061741 0.09722571 0.03454631 4 18
39627859987271386 27104 0.852718 8.290379 0.6374405 1.8645424 1.1179242 1.8585533 0.93004465 0.41669372 4 18
39627866949816418 8226 0.67286426 4.233593 0.40169907 1.0246841 0.8156081 1.6804136 0.67136467 0.36889943 4 18
39627890333058327 27683 0.39008853 4.2548943 0.30390525 0.65035355 0.6478823 1.1444217 0.634548 0.31183684 5 18
39627920599157550 27712 0.69655937 4.9202476 0.49882007 1.2614043 1.0042146 1.6750036 1.0443455 0.4788677 4 18
39627920959866996 26434 0.59808594 4.1380196 0.50669736 0.9793277 0.8762208 1.7679856 0.9884001 0.5383368 4 18
39627926802532979 26496 1.0195965 11.714091 0.2247391 0.5535888 0.51123863 0.8752846 0.039704487 0.019064624 4 18
39627927075161805 26098 0.45716396 4.694467 0.4060926 0.52004313 0.6835449 1.0091693 0.8040978 0.32162672 5 18
39627927385543026 31467 1.3129799 15.687575 0.28605554 0.6721484 0.46966967 0.8986222 0.44220924 0.22670269 4 18
39627927716890322 31511 0.3750537 4.4886284 0.2920748 0.9038894 0.5803369 1.1031259 0.56908184 0.29234114 5 18
39627932993323600 26434 0.5166419 5.6894937 0.5139289 1.2016586 0.79294723 1.3825387 0.97825795 0.4596656 5 18
@yuvoonng
This PR addresses #124 by requiring more pixels when estimating the variance in the continuum around narrow emission lines, which more realistically helps identify lower signal-to-noise ratio lines. Previously, I required a minimum of just 3 pixels around each emission line; now I require 8.
Using the sample of 40 objects in #124, here are the new S/N distributions for [OIII] 4363:
And here are some numbers (where
v1==Iron/v1.0
andv2==this branch
.Note that the final numbers may be affected by whatever we decide to do about #127, but nevertheless I'm planning to merge this PR as "the right thing to do" regardless.