<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 15:54:24 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-523] Demonstrate R, B and NIR arm merging</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-523</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;Following the implementation of &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/SIM2D-123&quot; title=&quot;Model the NIR based on a CCD&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SIM2D-123&quot;&gt;&lt;del&gt;SIM2D-123&lt;/del&gt;&lt;/a&gt; where a CCD-based NIR simulation is now provided, check that all 3 simulated arms can be merged successfully with the 2D DRP.&lt;/p&gt;</description>
                <environment></environment>
        <key id="14248">PIPE2D-523</key>
            <summary>Demonstrate R, B and NIR arm merging</summary>
                <type id="10001" iconUrl="https://pfspipe.ipmu.jp/jira/secure/viewavatar?size=xsmall&amp;avatarId=10515&amp;avatarType=issuetype">Story</type>
                                            <priority id="10000" iconUrl="https://pfspipe.ipmu.jp/jira/images/icons/priorities/medium.svg">Normal</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="price">price</assignee>
                                    <reporter username="hassan">hassan</reporter>
                        <labels>
                    </labels>
                <created>Fri, 13 Mar 2020 22:25:45 +0000</created>
                <updated>Tue, 15 Nov 2022 15:52:20 +0000</updated>
                            <resolved>Fri, 8 May 2020 19:40:15 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                <comments>
                            <comment id="16974" author="price" created="Thu, 2 Apr 2020 19:26:02 +0000"  >&lt;p&gt;May as well include M also, since we now have sims working for that.&lt;/p&gt;

&lt;p&gt;It would be helpful to make a larger dataset than the integration test (which is size-limited by the Travis runtime limit).&lt;/p&gt;</comment>
                            <comment id="17082" author="price" created="Wed, 22 Apr 2020 21:28:10 +0000"  >&lt;p&gt;The work accomplished on this ticket is a bit more extensive than what&apos;s in the description above, but it&apos;s all related.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Created a new test dataset that lives in &lt;tt&gt;/projects/HSC/PFS/weekly&lt;/tt&gt;; the script to create it lives in pfs_pipe2d. The test dataset includes BRMN data, and will be used to demonstrate BRN and BMN merging.&lt;/li&gt;
	&lt;li&gt;Put together a script for processing this data, and testing the results.&lt;/li&gt;
	&lt;li&gt;Set up Jenkins so that it will run this script weekly (this may need some tweaking, but we&apos;re pretty close).&lt;/li&gt;
	&lt;li&gt;Fixed some bugs and made some improvements after poking at the results of processing.&lt;/li&gt;
	&lt;li&gt;Generated a new integration test dataset with 10 fibers instead of 600, so the integration test will go faster (full fiber density can be tested with the weekly).&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="17083" author="rhl" created="Wed, 22 Apr 2020 21:31:25 +0000"  >&lt;p&gt;Do you have plans to use Mineo-kun&apos;s scripting system for running the code, replacing your script?&lt;/p&gt;</comment>
                            <comment id="17084" author="price" created="Wed, 22 Apr 2020 21:36:02 +0000"  >&lt;p&gt;Once Mineo-san&apos;s system is working, it would be good to see it replace both the integration test script and the weekly script.&lt;/p&gt;</comment>
                            <comment id="17117" author="naoki.yasuda" created="Wed, 6 May 2020 07:36:04 +0000"  >&lt;p&gt;I have processed arc data taken at LAM on 2019 July with this branch. It seems to work fine up to reduceArc.py. Should I check mergeArms.py as well? In that case, what is the command line for that?&lt;/p&gt;</comment>
                            <comment id="17120" author="hassan" created="Wed, 6 May 2020 12:40:52 +0000"  >&lt;p&gt;This would be useful, but only if you have 1 hour spare. The command line is &lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
mergeArms.py /path/to/dataRepo &#8211;calib /path/to/calibRepo &#8211;rerun pipeline &#8211;id field=OBJECT
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Note before running the above, you need to run &lt;tt&gt;reduceExposure&lt;/tt&gt; first to create the &lt;tt&gt;pfsArm&lt;/tt&gt; files:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
 reduceExposure.py /path/to/dataRepo --calib /path/to/calibRepo --rerun pipeline --id field=OBJECT
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="17121" author="naoki.yasuda" created="Wed, 6 May 2020 14:38:23 +0000"  >&lt;p&gt;&lt;tt&gt;mergeArms.py&lt;/tt&gt; will fail with the following error. Any suggestion?&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
(lsst-scipipe-1172c30) [yasuda@fe PIPE2D-523]$ mergeArms.py $REPO_DIR --calib $REPO_DIR/CALIB --rerun pipeline --id visit=21400                                
CameraMapper INFO: Loading exposure registry from /gpfs02/work/yasuda/PFS/calibs_Jul_PIPE2D-523/registry.sqlite3                                               
CameraMapper INFO: Loading calib registry from /gpfs02/work/yasuda/PFS/calibs_Jul_PIPE2D-523/CALIB/calibRegistry.sqlite3                                       
CameraMapper INFO: Loading calib registry from /gpfs02/work/yasuda/PFS/calibs_Jul_PIPE2D-523/CALIB/calibRegistry.sqlite3                                       
root INFO: Running: /gpfs02/work/yasuda/PFS/work/PIPE2D-523/drp_stella/bin/mergeArms.py /gpfs02/work/yasuda/PFS/calibs_Jul_PIPE2D-523 --calib /gpfs02/work/yasuda/PFS/calibs_Jul_PIPE2D-523/CALIB --rerun pipeline --id visit=21400                                                                                                     
WARNING: You are using OpenBLAS with multiple threads (20), but have not                                                                                            
specified the number of threads using one of the OpenBLAS environment variables:                                                                                    
OPENBLAS_NUM_THREADS, GOTO_NUM_THREADS, OMP_NUM_THREADS.                                                                                                            
This may indicate that you are unintentionally using multiple threads, which may                                                                                    
cause problems. WE HAVE THEREFORE DISABLED OpenBLAS THREADING. If you know                                                                                          
what you are doing and want threads enabled implicitly, set the environment                                                                                         
variable LSST_ALLOW_IMPLICIT_THREADS.                                                                                                                               
Traceback (most recent call last):                                                                                                                                  
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/opt/local/pfs2.1/stack/miniconda3-4.5.12-1172c30/Linux64/pipe_base/18.1.0/python/lsst/pipe/base/cmdLineTask.py&quot;&lt;/span&gt;, line 388, in __call__                     
    result = self.runTask(task, dataRef, kwargs)                                                                                                                    
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/opt/local/pfs2.1/stack/miniconda3-4.5.12-1172c30/Linux64/pipe_base/18.1.0/python/lsst/pipe/base/cmdLineTask.py&quot;&lt;/span&gt;, line 447, in runTask                      
    &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; task.runDataRef(dataRef, **kwargs)                                                                                                                       
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/gpfs02/work/yasuda/PFS/work/PIPE2D-523/drp_stella/python/pfs/drp/stella/mergeArms.py&quot;&lt;/span&gt;, line 96, in runDataRef                                              
    sky1d = self.subtractSky1d.run(sum(spectra, []), pfsConfig, sum(lsf, []))                                                                                       
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/gpfs02/work/yasuda/PFS/work/PIPE2D-523/drp_stella/python/pfs/drp/stella/subtractSky1d.py&quot;&lt;/span&gt;, line 56, in run                                                 
    resampledList = self.resampleSpectra(spectraList, pfsConfig)                                                                                                    
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/gpfs02/work/yasuda/PFS/work/PIPE2D-523/drp_stella/python/pfs/drp/stella/subtractSky1d.py&quot;&lt;/span&gt;, line 84, in resampleSpectra                                     
    &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; [spectra.resample(wavelength, pfsConfig.fiberId[index]) &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; spectra in spectraList]                                                                      
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/gpfs02/work/yasuda/PFS/work/PIPE2D-523/drp_stella/python/pfs/drp/stella/subtractSky1d.py&quot;&lt;/span&gt;, line 84, in &amp;lt;listcomp&amp;gt;                                          
    &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; [spectra.resample(wavelength, pfsConfig.fiberId[index]) &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; spectra in spectraList]                                                                      
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/gpfs02/work/yasuda/PFS/work/PIPE2D-523/drp_stella/python/pfs/drp/stella/datamodel/pfsFiberArraySet.py&quot;&lt;/span&gt;, line 110, in resample                              
    &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; type(self)(self.identity, fiberId, np.concatenate([[wavelength]]*numSpectra),                                                                            
ValueError: need at least one array to concatenate                                                                                                                  

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/gpfs02/work/yasuda/PFS/work/PIPE2D-523/drp_stella/bin/mergeArms.py&quot;&lt;/span&gt;, line 3, in &amp;lt;module&amp;gt;
    MergeArmsTask.parseAndRun()                                                                  
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/opt/local/pfs2.1/stack/miniconda3-4.5.12-1172c30/Linux64/pipe_base/18.1.0/python/lsst/pipe/base/cmdLineTask.py&quot;&lt;/span&gt;, line 603, in parseAndRun
    resultList = taskRunner.run(parsedCmd)                                                                                                        
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/opt/local/pfs2.1/stack/miniconda3-4.5.12-1172c30/Linux64/pipe_base/18.1.0/python/lsst/pipe/base/cmdLineTask.py&quot;&lt;/span&gt;, line 221, in run        
    resultList = list(mapFunc(self, targetList))                                                                                                  
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/opt/local/pfs2.1/stack/miniconda3-4.5.12-1172c30/Linux64/pipe_base/18.1.0/python/lsst/pipe/base/cmdLineTask.py&quot;&lt;/span&gt;, line 400, in __call__   
    &lt;span class=&quot;code-quote&quot;&gt;&quot;, &quot;&lt;/span&gt;.join(str(ref.dataId) &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; ref in dataRef), eName, e)                                                                                      
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;/opt/local/pfs2.1/stack/miniconda3-4.5.12-1172c30/Linux64/pipe_base/18.1.0/python/lsst/pipe/base/cmdLineTask.py&quot;&lt;/span&gt;, line 400, in &amp;lt;genexpr&amp;gt;  
    &lt;span class=&quot;code-quote&quot;&gt;&quot;, &quot;&lt;/span&gt;.join(str(ref.dataId) &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; ref in dataRef), eName, e)                                                                                      
AttributeError: &lt;span class=&quot;code-quote&quot;&gt;&apos;list&apos;&lt;/span&gt; object has no attribute &lt;span class=&quot;code-quote&quot;&gt;&apos;dataId&apos;&lt;/span&gt;                                                                                           
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="17122" author="price" created="Wed, 6 May 2020 19:59:40 +0000"  >&lt;p&gt;There are a few problems here. Firstly, the root cause (the &lt;tt&gt;ValueError&lt;/tt&gt;) is due to attempting to do 1d sky subtraction with no sky fibers. I&apos;ve put in some code to catch that case and give a more informative error message.&lt;/p&gt;

&lt;p&gt;The extra exception (the &lt;tt&gt;AttributeError&lt;/tt&gt;) is a common problem in the LSST Gen2 middleware, where the input to the &lt;tt&gt;runDataRef&lt;/tt&gt; method doesn&apos;t match one of the types it thinks you might give it. Fixing it requires copying 50 lines of code to make a small fix, which doesn&apos;t seem worth it to me because it doesn&apos;t hide the true problem, and we&apos;re going to update to the Gen3 middleware.&lt;/p&gt;

&lt;p&gt;Finally, if we disable the 1d sky subtraction (&lt;tt&gt;-c doSubtractSky1d=False&lt;/tt&gt;), we encounter a different problem: the fiberIds for the red and blue arms differ. This is likely because the detectorMaps are not accurate (I don&apos;t see any bootstrap products in &lt;tt&gt;/gpfs02/work/yasuda/PFS/calibs_Jul_&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-523&quot; title=&quot;Demonstrate R, B and NIR arm merging&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-523&quot;&gt;&lt;del&gt;PIPE2D-523&lt;/del&gt;&lt;/a&gt;/rerun&lt;/tt&gt;), but this problem has been lurking for a while. I&apos;ve added some new code to &lt;tt&gt;constructFiberTrace&lt;/tt&gt; to catch this case, along with a brute force workaround that will be used if you set &lt;tt&gt;-c forceFiberIds=True&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;With those fixes, I&apos;ve got &lt;tt&gt;mergeArms&lt;/tt&gt; working on Yasuda-san&apos;s data.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
(lsst-scipipe-1172c30) price@fe:/gpfs02/work/price/pipe2d-523 $ constructFiberTrace.py /gpfs02/work/yasuda/PFS/calibs_Jul_PIPE2D-523 --calib /gpfs02/work/yasuda/PFS/calibs_Jul_PIPE2D-523/CALIB --output fiberTrace  --id visit=21122..21126 --cores 8 -c forceFiberIds=True
(lsst-scipipe-1172c30) price@fe:/gpfs02/work/price/pipe2d-523 $ cp -r /gpfs02/work/yasuda/PFS/calibs_Jul_PIPE2D-523/CALIB .
(lsst-scipipe-1172c30) price@fe:/gpfs02/work/price/pipe2d-523 $ cp fiberTrace/FIBERTRACE/pfsFiberTrace-2019-07-25-021122-* CALIB/FIBERTRACE/
(lsst-scipipe-1172c30) price@fe:/gpfs02/work/price/pipe2d-523 $ reduceExposure.py /gpfs02/work/yasuda/PFS/calibs_Jul_PIPE2D-523 --calib CALIB --output=demo --id visit=21400
(lsst-scipipe-1172c30) price@fe:/gpfs02/work/price/pipe2d-523 $ mergeArms.py demo --calib CALIB --rerun merge --id visit=21400 -c doSubtractSky1d=False
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="17124" author="price" created="Fri, 8 May 2020 19:40:15 +0000"  >&lt;p&gt;Merged to master.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="23116">PIPE2D-1114</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="14169">SIM2D-123</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="13245">PIPE2D-316</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="12649" name="bmn.png" size="62781" author="price" created="Wed, 22 Apr 2020 21:34:27 +0000"/>
                            <attachment id="12650" name="brn.png" size="80124" author="price" created="Wed, 22 Apr 2020 21:34:27 +0000"/>
                    </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|02qprz:0i</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10005" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="93">2DDRP-2021 A</customfieldvalue>

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