[PIPE2D-345] Provide a method for determining line intensities Created: 08/Feb/19  Updated: 29/Oct/19  Resolved: 27/Oct/19

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

Type: Story Priority: Normal
Reporter: hassan Assignee: price
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
blocks PIPE2D-339 Model arc line amplitudes Done
Relates
relates to PIPE2D-319 Make line identification robust again... Done
Story Points: 4
Sprint: 2DDRP-2019 C, 2DDRP-2019 D, 2DDRP-2019 E, 2DDRP-2019 F, 2DDRP-2019 G, 2DDRP-2019 H
Reviewers: naoki.yasuda

 Description   

Provide a method for estimating the line intensities for 1D spectra.

The code should provide a single value for each line, based on the integrated flux about the line centroid as opposed to the line peak value. This way, the effect of line broadening is removed.

The code for estimating these line intensities may already be available in the 2D DRP software. This needs to be checked.



 Comments   
Comment by rhl [ 08/Mar/19 ]

You'll probably want to rewrite this in python if the C++ code doesn't just work. We'll need to handle blends at some point – remember that we know the wavelengths (very?) well.

Comment by naoki.yasuda [ 08/Mar/19 ]

I have not started on this ticket yet, but do you mean there is an existing code in C++?

One simple question is whether this method would use LSF or not.

 

Comment by rhl [ 08/Mar/19 ]

There is C++ code, but it dates from Andreas and I don't think it's easy to extend.  It fits a Gaussian, which is good enough for isolated lines but probably/possibly not for blends.

Comment by price [ 08/Mar/19 ]

I have a python implementation of finding and fitting lines as part of PIPE2D-319.

Comment by naoki.yasuda [ 28/Mar/19 ]

I'm sorry for the delayed response but I have looked at Paul's implementation and it looks good enough.

Should we merge this tickets to PIPE2D-319?

Comment by naoki.yasuda [ 29/Mar/19 ]

I have basically copied Paul's code to python/pfs/drp/stella/SpectrumContinued.py.

Comment by hassan [ 30/May/19 ]

naoki.yasuda can you add your updates to the ticket branch for this ticket please? tickets/PIPE2D-345.

Comment by hassan [ 22/Jul/19 ]

naoki.yasuda could you create a pull request so that Paul and I can review the code before it is merged to master? Thanks.

Comment by price [ 19/Sep/19 ]

I suggest extending the new FindLinesTask to return the intensities in addition to the centroids.

Comment by hassan [ 15/Oct/19 ]

Following 2D DRP tech telecon 2019-10-14: re-assigned to price . Suggested algorithm makes use of gaussians, which may not be adequate for broadened arc lines. However, if the broadened arc lines are limited (ncaplar feels that there should not be more than 5 of such lines) we could remove those lines from the modelling process.

Comment by price [ 18/Oct/19 ]

I have put a proposed implementation in u/price/PIPE2D-345 of drp_stella (GitHub PR). It's currently on a u branch to avoid contaminating the original proposal.

naoki.yasuda, would you please have a look and let me know if this does not meet your needs?

Comment by price [ 24/Oct/19 ]

There are changes made as part of PIPE2D-391 that move the line fitting into C++ for speed. This will cause some conflicts with the work done here, but should be straightforward to resolve.

Comment by naoki.yasuda [ 25/Oct/19 ]

Thank you. I have reviewed the changes of the code. I think it is fine and very useful for my task. One thing I'm not sure but not so important is that in a function FindLinesTask.convolve() there is a line

        grow = int(self.config.width + 0.5)

Why width is used instead of halfSize?

Comment by price [ 26/Oct/19 ]

We don't want to grow the masked pixels by the kernel size, because pixels at the edge of the kernel have only a tiny contribution to the convolved value. For the LSST image convolutions, we grow by a single pixel, but maybe that's not ideal, so I've made this configurable.

I put your work onto u/yasuda/PIPE2D-345 and moved my work from u/price/PIPE2D-345 onto the formal ticket branch, tickets/PIPE2D-345.

naoki.yasuda, are you too busy to do a code review, or should I ask someone else?

Comment by naoki.yasuda [ 26/Oct/19 ]

What is the official procedure of code review? In the previous comment, I meant I have reviewed and the code looks fine. Is this not enough?

Comment by price [ 27/Oct/19 ]

Ah, I thought perhaps you had only considered the idea, and not the actual code. I'll go ahead and merge. Thanks!

Comment by price [ 27/Oct/19 ]

Merged to master, and tagged 5.1.4.

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