[REDMINE1D-106] [RM-8005] [linemodel] do not switch to nocontinuum or fromspectrum in second pass continuum refit Created: 13/Jun/23  Updated: 08/Feb/24

Status: In Progress
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 2023-04-06 09:14:09 by Didier Vibert. % Done: 50

when the continuum is refitted, eventually partially in the case @ LineModelSolve.linemodel.secondpass.continuumfit = "refitfirstpass"@,
the amplitude can be found compatible with zero (resp. negative) in the considered second pass redshift window, whereas it was found in the 1st pass full z range, that at some other redshift the continuum amplitude is significantly not null (resp. positive). Currently, the code switch to "nocontinuum" (resp. "fromspectrum") globally , for all 2nd pass candidates.

We should either make the switch for only the candidate where it appears, or not switch at all, since in first pass the continuum was found significant.
I vote for 2nd option. Moreover the whole pdf, outside the 2nd pass windows, was computed using continuum template fitting, thus we should keep this info and all the associated parameters (name of template, amplitude, ism, igm)



 Comments   
Comment by Redmine-Jira Migtation [ 08/Feb/24 ]

Comment by Vincent Le Brun on 2023-04-06 10:54:17:
OK if the 2nd pass amplitude is found to be 0, but if it is negative, and we do not switch, an error will be raised ?

Comment by Redmine-Jira Migtation [ 08/Feb/24 ]

Comment by Didier Vibert on 2023-04-06 12:27:02:
Vincent Le Brun wrote in #note-2:
> OK if the 2nd pass amplitude is found to be 0, but if it is negative, and we do not switch, an error will be raised ?

The option 2 is to not raise any error which abort the object (QSO/Galaxy) fittting, but issue a warning and let the code continue with a null continuum (when it is negative, above the negative threshold it is considered null). Keep in mind that in the first pass, around the same redshifts (on a coarser grid) it was not considered negative, so we are in the case were it is at the limit of the threshold, It will probably not change anything at the end. And to introduce a "fromspectrum" continuum switch that is not global needs some refactoring.

Comment by Redmine-Jira Migtation [ 08/Feb/24 ]

Comment by Didier Vibert on 2023-04-06 12:39:46:
Another comment: in first pass, the switch to "fromspectrum" arises if at all z in the full z range the continuum is fitted with a negative amplitude (below the threshold). What happens currently in 2nd pass is to switch if it is fitted negative on all the z-range of one 2nd pass window. Since the 2nd pass window contains some of the z of the first pass grid, the only thing I see that can change the behavior is the use of fft in first-pass only (it is deactivated in 2nd pass because the z-range is too small to have a cpu tiime benefit).

Comment by Redmine-Jira Migtation [ 08/Feb/24 ]

Comment by Vincent Le Brun on 2023-04-06 13:29:32:
OK let's go like this

Comment by Redmine-Jira Migtation [ 08/Feb/24 ]

Comment by Gaelle Daste on 2024-01-29 12:42:40:
J'ai pas trouvé dans les ITs (même full) de cas où on avait ce switch. Pour voir et valider le avant/après si quelqu'un a une idée je suis preneuse

Comment by Redmine-Jira Migtation [ 08/Feb/24 ]

Comment by Gaelle Daste on 2024-02-06 15:00:09:
#8580

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