<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 16:06:14 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-1332] fitPfsFluxReference: Use 1D prior rather than 4D prior</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-1332</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;fitPfsFluxReference: Use 1D prior rather than 4D prior&lt;/p&gt;

&lt;p&gt;One of bottlenecks of fitPfsFluxReference has turned out to be&lt;br/&gt;
&lt;tt&gt;scipy.interpolate.LinearNDInterpolator&lt;/tt&gt; called many times by the objective function.&lt;br/&gt;
There, &lt;tt&gt;scipy.interpolate.LinearNDInterpolator&lt;/tt&gt; interpolates 4D prior probability density function.&lt;/p&gt;

&lt;p&gt;Because the prior PDF is made from broadband fluxes, the prior PDF is not very meaningful except&lt;br/&gt;
along the axis of effective temperature. If we marginalize the other three dimensions, we can do&lt;br/&gt;
without this slow interpolator.&lt;/p&gt;

&lt;p&gt;In fact, we can improve speed by using a 1D prior. Here is a profile before the modification:&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;
ncalls  tottime  percall  cumtime  percall filename:lineno(function)
     1    0.001    0.001 1958.247 1958.247 fitPfsFluxReference.py:302(runDataRef)
     1  105.904  105.904 1493.559 1493.559 fitPfsFluxReference.py:643(fitModelsToSpectra)
 15284  563.177    0.037 1386.914    0.091 fitPfsFluxReference.py:766(objective)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Here is a profile after the modification:&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;
ncalls  tottime  percall  cumtime  percall filename:lineno(function)
     1    0.004    0.004 1659.727 1659.727 fitPfsFluxReference.py:302(runDataRef)
     1    0.016    0.016 1197.156 1197.156 fitPfsFluxReference.py:643(fitModelsToSpectra)
 18526    3.910    0.000 1191.519    0.064 fitPfsFluxReference.py:771(objective)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Though &lt;tt&gt;ncalls&lt;/tt&gt; of &lt;tt&gt;objective&lt;/tt&gt; gets larger after the modification, its &lt;tt&gt;percall&lt;/tt&gt; gets 30% less,&lt;br/&gt;
which leads to fitModelsToSpectra running faster by 300 seconds / visit.&lt;/p&gt;

&lt;p&gt;Quality of fitting does not change. We input 100 known spectra to get the following results:&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;
                               4D   ( % stddev)    1D   ( % stddev)
----------------------------------------------------------------------
   RMS of errors of  &lt;span class=&quot;code-quote&quot;&gt;&apos;teff&apos;&lt;/span&gt;  216.03 (   29.35 )  216.76 (   29.45 )
   RMS of errors of  &lt;span class=&quot;code-quote&quot;&gt;&apos;logg&apos;&lt;/span&gt;    0.58 (   52.03 )    0.44 (   39.20 )
   RMS of errors of     &lt;span class=&quot;code-quote&quot;&gt;&apos;m&apos;&lt;/span&gt;    0.99 (   62.27 )    0.86 (   53.76 )
   RMS of errors of &lt;span class=&quot;code-quote&quot;&gt;&apos;alpha&apos;&lt;/span&gt;    0.33 (   98.34 )    0.36 (  109.98 )
   RMS of errors of   &lt;span class=&quot;code-quote&quot;&gt;&apos;vel&apos;&lt;/span&gt;   49.31 (  inf    )   49.31 (  inf    )
----------------------------------------------------------------------
  Mean of errors of  &lt;span class=&quot;code-quote&quot;&gt;&apos;teff&apos;&lt;/span&gt; -148.32 (  -20.15 ) -144.36 (  -19.61 )
  Mean of errors of  &lt;span class=&quot;code-quote&quot;&gt;&apos;logg&apos;&lt;/span&gt;    0.13 (   11.58 )    0.09 (    8.07 )
  Mean of errors of     &lt;span class=&quot;code-quote&quot;&gt;&apos;m&apos;&lt;/span&gt;   -0.40 (  -24.86 )   -0.43 (  -26.87 )
  Mean of errors of &lt;span class=&quot;code-quote&quot;&gt;&apos;alpha&apos;&lt;/span&gt;    0.08 (   25.11 )    0.05 (   15.41 )
  Mean of errors of   &lt;span class=&quot;code-quote&quot;&gt;&apos;vel&apos;&lt;/span&gt;   -1.75 ( -inf    )   -1.75 ( -inf    )
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;(For example, RMS of errors of  &apos;teff&apos; (in K) is sqrt of &lt;tt&gt;\frac{1}{n}\sum&amp;#95;{i} (teff&amp;#94;{out}&amp;#95;{i} - teff&amp;#94;{in}&amp;#95;{i})&amp;#94;2&lt;/tt&gt;.&lt;br/&gt;
&quot;% stddev&quot; means this value over the standard deviation of {{teff&amp;#94;{in}&amp;#95;{i} }}.)&lt;/p&gt;</description>
                <environment></environment>
        <key id="24302">PIPE2D-1332</key>
            <summary>fitPfsFluxReference: Use 1D prior rather than 4D prior</summary>
                <type id="3" iconUrl="https://pfspipe.ipmu.jp/jira/secure/viewavatar?size=xsmall&amp;avatarId=10518&amp;avatarType=issuetype">Task</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="sogo.mineo">sogo.mineo</assignee>
                                    <reporter username="sogo.mineo">sogo.mineo</reporter>
                        <labels>
                            <label>flux-calibration</label>
                    </labels>
                <created>Mon, 20 Nov 2023 08:06:40 +0000</created>
                <updated>Wed, 22 Nov 2023 01:34:31 +0000</updated>
                            <resolved>Wed, 22 Nov 2023 01:34:31 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                <comments>
                            <comment id="35937" author="sogo.mineo" created="Tue, 21 Nov 2023 07:16:10 +0000"  >&lt;p&gt;Could you review this change?&lt;/p&gt;</comment>
                            <comment id="35989" author="sogo.mineo" created="Wed, 22 Nov 2023 01:34:31 +0000"  >&lt;p&gt;Merged. Thanks for reviewing.&lt;/p&gt;</comment>
                    </comments>
                    <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|zzt0gn:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>