<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 15:48:33 JST 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>PFS-JIRA</title>
    <link>https://pfspipe.ipmu.jp/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.3.4</version>
        <build-number>803005</build-number>
        <build-date>13-09-2019</build-date>
    </build-info>


<item>
            <title>[PIPE2D-109] Include sigma clipping in wavelength calibration</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-109</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;We should reject outlier emission lines which are affected by cosmics, misidentification, or blends. Please include sigma clipping of lines used for the wavelength calibration during the fitting procedure.&lt;/p&gt;</description>
                <environment></environment>
        <key id="11222">PIPE2D-109</key>
            <summary>Include sigma clipping in wavelength calibration</summary>
                <type id="10001" iconUrl="https://pfspipe.ipmu.jp/jira/secure/viewavatar?size=xsmall&amp;avatarId=10515&amp;avatarType=issuetype">Story</type>
                                            <priority id="3" iconUrl="https://pfspipe.ipmu.jp/jira/images/icons/priorities/major.svg">Major</priority>
                        <status id="10002" iconUrl="https://pfspipe.ipmu.jp/jira/images/icons/statuses/generic.png" description="The issue is resolved, reviewed, and merged">Done</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="aritter">aritter</assignee>
                                    <reporter username="aritter">aritter</reporter>
                        <labels>
                    </labels>
                <created>Fri, 21 Oct 2016 03:46:54 +0000</created>
                <updated>Fri, 3 Mar 2017 05:43:35 +0000</updated>
                            <resolved>Thu, 9 Feb 2017 05:41:20 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                <comments>
                            <comment id="11481" author="aritter" created="Fri, 28 Oct 2016 01:31:38 +0000"  >&lt;p&gt;Code is in drp_stella tickets/&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-109&quot; title=&quot;Include sigma clipping in wavelength calibration&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-109&quot;&gt;&lt;del&gt;PIPE2D-109&lt;/del&gt;&lt;/a&gt;.&lt;br/&gt;
Tests are in drp_stella/tests/Math.py, part of the tests in Utils.cc as I couldn&apos;t figure out how to pass PolyFit keywords and keyword values from Python to C++. To test use master obs_pfs and master drp_stella_data and run &lt;/p&gt;

&lt;p&gt;python tests/Math.py&lt;/p&gt;
</comment>
                            <comment id="11485" author="swinbank" created="Fri, 28 Oct 2016 18:02:09 +0000"  >&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Please clean up history. If possible, remove commits which are unrelated to this ticket (all the cleanups) and put them on another ticket.&lt;/li&gt;
	&lt;li&gt;Please set mask bits to indicate where clipping has taken place.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="11505" author="aritter" created="Fri, 4 Nov 2016 04:45:42 +0000"  >&lt;p&gt;Moved all clean-up commits to &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-114&quot; title=&quot;Apply clean-ups in PIPE2D-109&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-114&quot;&gt;&lt;del&gt;PIPE2D-114&lt;/del&gt;&lt;/a&gt; and set mask bits where clipping has taken place.&lt;/p&gt;</comment>
                            <comment id="11511" author="swinbank" created="Mon, 7 Nov 2016 21:49:31 +0000"  >&lt;p&gt;I added a bunch of comments on &lt;a href=&quot;https://github.com/Subaru-PFS/drp_stella/pull/4&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;this PR&lt;/a&gt;. However, I screwed up, and some of the comments seem to have appeared in odd places. I hope that everything is clear enough, but do ask if anything isn&apos;t or if something seems to be missing.&lt;/p&gt;

&lt;p&gt;One thing that I found rather odd is the structure of the &lt;tt&gt;PolyFit&lt;/tt&gt; tests. I see you referred to these above, but I didn&apos;t notice that until after I&apos;d looked at the code. I think it would be worth spending a bit more effort to figure out how things are supposed to work.&lt;/p&gt;

&lt;p&gt;I hope that after you&apos;ve acted on my comments the code will be rather easier to read, and, at that point, I&apos;d like to take another look through before we merge.&lt;/p&gt;</comment>
                            <comment id="11699" author="aritter" created="Sun, 18 Dec 2016 07:12:51 +0000"  >&lt;p&gt;I believe I addressed all comments from the previous review.&lt;/p&gt;</comment>
                            <comment id="11778" author="swinbank" created="Mon, 23 Jan 2017 23:55:51 +0000"  >&lt;p&gt;This is a significant improvement over the previous version of the code: thank you! Particularly welcome are the improved commit messages &#8212; it&apos;s much easier to understand what you&apos;ve actually done.&lt;/p&gt;

&lt;p&gt;Some more comments on the PR. Most of these are quite minor, though; while I encourage you to read them, I think you can ignore most of them. Here are things I&apos;d specifically like you to act on:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;If I understand correctly, you always perform sigma clipping, even if the user specifies &lt;tt&gt;nIterReject=0&lt;/tt&gt;. That seems like pretty pathological behaviour. At a minimum, I think you need to make this clear in the documentation for the &lt;tt&gt;nIterReject&lt;/tt&gt; option and print out a big warning when the users asks for no iterations but you give them one anyway.&lt;/li&gt;
	&lt;li&gt;Take out the &lt;tt&gt;if True&lt;/tt&gt; in &lt;tt&gt;testPolyFit&lt;/tt&gt;.&lt;/li&gt;
	&lt;li&gt;Squash 4962901 into 43f0228.&lt;/li&gt;
	&lt;li&gt;Expand the commit message of 43f0228 to explain why this change was necessary.&lt;/li&gt;
	&lt;li&gt;40b75e0b should clearly be squashed into &lt;b&gt;something&lt;/b&gt;: it&apos;s not a well-formed commit on its own.&lt;/li&gt;
	&lt;li&gt;Based on the commit messages, f9aa3554 seems to be addressing the same issue as 077f70ad7. Please clarify what&apos;s going on here &#8212; if these commits really are degenerate, remove one (or squash them); if not, change the messages so they can&apos;t be confused.&lt;/li&gt;
	&lt;li&gt;12ed6b53 seems to be entirely superseded by 1778b3b2. Remove it.&lt;/li&gt;
	&lt;li&gt;I don&apos;t understand the motivation for 2c01217. If the measurement errors aren&apos;t used, why are you initializing them or allocating space for them at all? I don&apos;t see why one set of useless numbers is &quot;cleaner&quot; than another set of useless numbers.&lt;/li&gt;
	&lt;li&gt;c0726b254 is entirely degenerate with 03b9440ae. Remove it.&lt;/li&gt;
	&lt;li&gt;There are several separate commits which initialize various arrays or variables to 0. I don&apos;t understand why these have suddenly become necessary: are they fixing bugs (if so, where are the tests?) or are you just being neat? Can we at least squash all these various commits into one?&lt;/li&gt;
	&lt;li&gt;1778b3b2 definitely requires a unit test. I&apos;m worried that the tests added in 9cf52a3 didn&apos;t catch this problem &#8212; why not?&lt;/li&gt;
	&lt;li&gt;The changes in 09058d0 are very very extensive. I suggest:
	&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
		&lt;li&gt;Rather than making this change last in the history of the ticket, you add the relevant headers so you can use logging as the first commit. Then never add any &lt;tt&gt;#ifdef __DEBUG...&lt;/tt&gt; statements at all during this work: all of the output you are adding on this ticket can be a call to the logger, and you will not need this final commit to convert them all.&lt;/li&gt;
		&lt;li&gt;File another ticket to convert any output which was not added on this ticket to use the logger.&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="11779" author="swinbank" created="Mon, 23 Jan 2017 23:58:10 +0000"  >&lt;p&gt;I&apos;d like to take another look at this before we regard it as finally done, so I&apos;m setting it back to &quot;in progress&quot; for now.&lt;/p&gt;</comment>
                            <comment id="11782" author="aritter" created="Tue, 24 Jan 2017 11:20:23 +0000"  >&lt;ul&gt;
	&lt;li&gt;I changed the PolyFit function with sigma rejection to not perform the sigma rejection at all if &lt;tt&gt;nIterReject=0&lt;/tt&gt;.&lt;/li&gt;
	&lt;li&gt;I don&apos;t see an &lt;tt&gt;if True&lt;/tt&gt; in &lt;tt&gt;testPolyFit&lt;/tt&gt;...?&lt;/li&gt;
	&lt;li&gt;Regarding 2c01217 I now only create a ndarray of length 1, added comments to the code, and changed the commit message&lt;/li&gt;
	&lt;li&gt;Regarding the initializing commits, the change in 03b9440 regarding &lt;tt&gt;sigma&lt;/tt&gt; and &lt;tt&gt;covar&lt;/tt&gt; is purely cosmetical, while the change in ee5215c (removed 2 initializations as they were unnecessary) was a bug fix (test added)&lt;/li&gt;
	&lt;li&gt;Regarding 1778b3b2 there are tests in the source code. The issue itself is very difficult to test from outside the function.&lt;/li&gt;
	&lt;li&gt;I applied all other suggested changes, except for the last one as it was too late for that, but will keep it in mind next time...&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="11783" author="swinbank" created="Tue, 24 Jan 2017 11:47:28 +0000"  >&lt;ul&gt;
	&lt;li&gt;I think 188710084 is new since I looked at this previously. If these are purely cleanups, it seems like they&apos;d be better suited on &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-114&quot; title=&quot;Apply clean-ups in PIPE2D-109&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-114&quot;&gt;&lt;del&gt;PIPE2D-114&lt;/del&gt;&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;Similar story for f050bcd9c: you should not add new trailing spaces in &lt;b&gt;any&lt;/b&gt; commit &#8212; where that&apos;s happened on this ticket, you need to edit the commit to take them out again. You should not insert them on one commit and then add another to take them out again. A commit to go through old work and remove spaces that were incorrectly added &lt;b&gt;on other tickets&lt;/b&gt; is pure cleanup, and belongs on &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-114&quot; title=&quot;Apply clean-ups in PIPE2D-109&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-114&quot;&gt;&lt;del&gt;PIPE2D-114&lt;/del&gt;&lt;/a&gt;.&lt;/li&gt;
	&lt;li&gt;Here is the &lt;tt&gt;if True&lt;/tt&gt; I object to: &lt;a href=&quot;https://github.com/Subaru-PFS/drp_stella/blob/f3ed39943d32bcbfaf0f128d290fb979281fa7b9/tests/Spectra.py#L517&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://github.com/Subaru-PFS/drp_stella/blob/f3ed39943d32bcbfaf0f128d290fb979281fa7b9/tests/Spectra.py#L517&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;Please file a ticket to request that &lt;tt&gt;testPolyFit()&lt;/tt&gt; in &lt;tt&gt;Utils.cc&lt;/tt&gt; (ie, the C++ code, not the Python) should be split into multiple separate functions.&lt;/li&gt;
	&lt;li&gt;Please file another ticket to request that the C++ test code be replaced with (or augmented by) Python tests when either we figure out how to wrap the necessary functionality with Swig or we replace it with pybind11.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Otherwise, go ahead and merge.&lt;/p&gt;</comment>
                            <comment id="11846" author="aritter" created="Wed, 8 Feb 2017 08:13:11 +0000"  >&lt;p&gt;Fixed commits by removing freshly introduced trailing spaces.&lt;br/&gt;
Moved clean-up commits to &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-114&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;PIPE2D-114&lt;/a&gt;.&lt;br/&gt;
Added tickets &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-157&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;PIPE2D-157&lt;/a&gt; and &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-158&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;PIPE2D-158&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="11847" author="aritter" created="Thu, 9 Feb 2017 05:41:20 +0000"  >&lt;p&gt;Merged into master&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                            <outwardlinks description="blocks">
                                        <issuelink>
            <issuekey id="11150">PIPE2D-80</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="11304">PIPE2D-114</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="11224">PIPE2D-110</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="11469">PIPE2D-157</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="11470">PIPE2D-158</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="11509">PIPE2D-163</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_10500" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|ii00uj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10100" key="com.atlassian.jira.plugin.system.customfieldtypes:userpicker">
                        <customfieldname>Reviewers</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>swinbank</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10005" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="22">2014-16</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                        </customfields>
    </item>
</channel>
</rss>