[PIPE2D-870] Code implementation of the continuum subtraction task for flux calibration Created: 19/Jul/21  Updated: 14/Dec/21  Resolved: 14/Dec/21

Status: Done
Project: DRP 2-D Pipeline
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Story Priority: Normal
Reporter: Takuji Yamashita Assignee: sogo.mineo
Resolution: Done Votes: 0
Labels: flux-calibration
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File lines_mask_50knots.png     PNG File mask_50knots.png    
Issue Links:
Blocks
blocks PIPE2D-371 Write code to store flux calibration ... Done
Epic Link: flux calibration
Reviewers: hassan

 Description   

Write a code to perform the continuum subtraction of spectra for flux calibration work in the 2DDRP pipeline. The draft code is based on the study in PIPE2D-685 (https://pfspipe.ipmu.jp/jira/browse/PIPE2D-685), in which the continuum is subtracted by a median filter.



 Comments   
Comment by price [ 19/Jul/21 ]

Please consider the existing FitContinuumTask.

Comment by Takuji Yamashita [ 19/Jul/21 ]

Thank you. I will try it whether it works as I intend.

Comment by rhl [ 20/Jul/21 ]

If it doesn't, then we should look at what we need to change. I really don't want to end up with two different fitting tasks if we can avoid it.

Comment by Takuji Yamashita [ 24/Aug/21 ]

This is a comparison of two scripts for continuum subtraction. I tried fitContinuumTask (red) and my script that uses a median filter (blue). As a result, we can substitute fitContinuumTask in flux calibration work. A continuum from fitContinuumTask is very similar to that from my script.
What fitContinuumTask is doing is similar to mine, but fitContinuumTask performs pixel binning before fitting, while my script does not. Binning dismisses lines and outlier pixels. I think this is why fitContinuumTask works better than mine around H-alpha and H-beta.
 
 
From the top panel:
1st: two continua and an input spectrum
2nd: only two continua
3rd: continuum-subtracted spectra
4th: zoom-in of 3rd panel (see H-alpha, where my script underestimates the continuum)
5th: a ratio of two continua

 

Comment by Takuji Yamashita [ 24/Aug/21 ]

Comparisons around representive lines:

Comment by Takuji Yamashita [ 14/Dec/21 ]

We can close this ticket because a function of the continuum subtraction (using FitContinuumTask) is now included in the main code of flux calibration, not an independent code. The continuum subtraction function in flux calibration will be reviewed in the main code (PIPE2D-922). 

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