[REDMINE1D-400] [RM-8638] [linemodel] wrong total EmissionLinesSNR computation (and total StrongEmissionLinesSNR) Created: 06/Feb/24  Updated: 07/Feb/24

Status: Open
Project: 1D Redmine
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Normal
Reporter: Redmine-Jira Migtation Assignee: Redmine-Jira Migtation
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Created on 2024-02-05 14:38:01 by Didier Vibert. % Done: 0

The total SNR of emission lines (output as "EmissionLinesSNR") is wrongly computed, since the integrated flux of all emission lines is computed by subtracting the continuum from the observed spectrum, whereas the absorption lines fitted model should also be subtracted.
cf @CLineModelFitting::getCumulSNRStrongEL()@ and @CLineModelFitting::getSNROnRange(Int32Range idxRange)@

Moreover, the summation should follow a numerical integration like trapezoidal (using for instance @CSpectrumModel::integrateFluxes_usingTrapez@).
The simplest fix would be to use the method @CLineModelFitting::getFluxDirectIntegration@ with the corresponding list of elements

(bug detected when looking at the IT change of #6459)


Generated at Sat Feb 10 15:32:21 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.