<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 16:05:10 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-1259] fitContinuum: Make binning faster</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-1259</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;FitContinuumTask is called by FitPfsFluxReferenceTask very many times, to the extent that its execution time amounts to one of the largest part of FitPfsFluxReferenceTask&apos;s execution time. The major part of FitContinuumTask&apos;s execution time is from &lt;tt&gt;binData()&lt;/tt&gt;. We processed visit=92114 to get the following profile:&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.014    0.014 5329.600 5329.600 fitPfsFluxReference.py:292(run)
    38657    8.654    0.000 1604.840    0.042 fitContinuum.py:83(fitContinuum)
   154628   59.177    0.000 1002.344    0.006 fitContinuum.py:264(binData)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;We can make &lt;tt&gt;binData()&lt;/tt&gt; faster by calling &lt;tt&gt;np.median()&lt;/tt&gt; only once. Here is the profile after this 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;
        1    0.019    0.019 4658.235 4658.235 fitPfsFluxReference.py:292(run)
    38657    8.498    0.000  942.938    0.024 fitContinuum.py:88(fitContinuum)
   154628   11.449    0.000  361.209    0.002 fitContinuum.py:271(binData)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;10 minites/visit is saved by this modification with virtually no impact on outputs of the pipeline. I say &quot;virtually&quot; because I use a binning strategy different from the original code when &lt;tt&gt;numBins&lt;/tt&gt; does not divide the array length. In many cases my binning agrees with the original binning, but they are different when, say, array length = 100 and &lt;tt&gt;numBins&lt;/tt&gt; = 8. &lt;tt&gt;binData(np.arange(100).astype(float), numBins=8)&lt;/tt&gt; produces 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;
original: [ 6.  18.5 31.  43.5 56.  68.5 81.  93.5]
mine:     [ 6.  18.5 31.  43.5 55.5 68.  80.5 93. ]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;I believe my one is better because the elements of &quot;&amp;#42;.0&quot; and &quot;&amp;#42;.5&quot; are distributed symmetrically in its output.&lt;/p&gt;</description>
                <environment></environment>
        <key id="23712">PIPE2D-1259</key>
            <summary>fitContinuum: Make binning faster</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>Tue, 18 Jul 2023 02:36:26 +0000</created>
                <updated>Wed, 2 Aug 2023 01:41:14 +0000</updated>
                            <resolved>Wed, 2 Aug 2023 01:41:14 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                <comments>
                            <comment id="34049" author="sogo.mineo" created="Tue, 18 Jul 2023 04:37:35 +0000"  >&lt;p&gt;Could you review this PR?&lt;/p&gt;</comment>
                            <comment id="34239" author="sogo.mineo" created="Wed, 2 Aug 2023 01:30:29 +0000"  >&lt;p&gt;Merged. Thanks for reviewing.&lt;/p&gt;</comment>
                            <comment id="34240" author="sogo.mineo" created="Wed, 2 Aug 2023 01:41:14 +0000"  >&lt;p&gt;I close this ticket. (I forgot to close this ticket but just commented a moment ago)&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|zzsys7:</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>