<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 16:04:36 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-1238] fitPfsFluxReference should not brute-force the model fitting</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-1238</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;The current fitPfsFluxReference naively compares observed spectra with ~60,000 model spectra&lt;br/&gt;
 to find the best-fit models. It could not be helped, for the model interpolation was a heavy task&lt;br/&gt;
 and I did not want to do it many times at run time, which prevented me from using an optimizer.&lt;/p&gt;

&lt;p&gt;Now that the model interpolator has become decently small in memory consumption&lt;br/&gt;
 and decently fast in interpolation (&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-1231&quot; title=&quot;Reduce memory usage of fitPfsReferenceFlux&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-1231&quot;&gt;&lt;del&gt;PIPE2D-1231&lt;/del&gt;&lt;/a&gt;),&lt;br/&gt;
 I can use some good optimizer in the model fitting instead of the current brute-force method.&lt;/p&gt;

&lt;p&gt;It is essential to guess a good initial guess if we are to use an optimizer,&lt;br/&gt;
 and some suggestions were given in &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/PIPE2D-1168&quot; title=&quot;fitPfsReferenceFlux breaks Tiger&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PIPE2D-1168&quot;&gt;&lt;del&gt;PIPE2D-1168&lt;/del&gt;&lt;/a&gt;.&lt;br/&gt;
 In this ticket, however, I don&apos;t take care of initial guesses,&lt;br/&gt;
 but I rewrite &lt;tt&gt;fitPfsFluxReference&lt;/tt&gt; so that it will use an optimizer.&lt;/p&gt;
&lt;h2&gt;&lt;a name=&quot;Onoptimizers&quot;&gt;&lt;/a&gt;On optimizers&lt;/h2&gt;

&lt;p&gt;I have compared &quot;Powell&quot; method with &quot;Nelder-Mead&quot; method (both do not require differentiability)&lt;br/&gt;
 and I have concluded that &quot;Powell&quot; method is more useful to us&lt;br/&gt;
 because &quot;Nelder-Mead&quot; method is more apt to fall into a local minimum&lt;br/&gt;
 though it is 2x faster than &quot;Powell&quot;.&lt;/p&gt;
&lt;h2&gt;&lt;a name=&quot;Comparisonbetween%22Powell%22methodandthebruteforcemethod&quot;&gt;&lt;/a&gt;Comparison between &quot;Powell&quot; method and the brute-force method&lt;/h2&gt;

&lt;p&gt;The success rate of &quot;Powell&quot; method depends on the order of parameters&lt;br/&gt;
 ((Teff, log(g), metal, alpha) or (Teff, log(g), alpha, metal) or ...)&lt;br/&gt;
 I ran &quot;Powell&quot; method for all 4! permutations and have adopted the best one,&lt;br/&gt;
 that is, (metal, alpha, Teff, log(g)).&lt;/p&gt;

&lt;p&gt;Percentages below are (RMS(input - output)) / (stddev(input)) obtained from a test with 100 fibers.&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;
        master   powell
Teff    12.46%   10.96%
log(g)  27.00%   23.62%
metal   43.78%   41.85%
alpha   91.30%   88.75%
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The master branch takes 25647 seconds to fit 100 fibers, but with Powell&apos;s method, the fitting takes only 7420 seconds&lt;br/&gt;
 (&amp;gt;~ 3x speed up).&lt;/p&gt;

&lt;p&gt;Powell&apos;s method outperforms the master branch (brute-force method) not only in speed but in quality.&lt;br/&gt;
 It seems strange, but I guess that something is wrong in the brute-force method&lt;br/&gt;
 with the final, sub-grid peak finding algorithm for probability distributions,&lt;br/&gt;
 which is no longer necessary with Powell&apos;s method.&lt;/p&gt;</description>
                <environment></environment>
        <key id="23577">PIPE2D-1238</key>
            <summary>fitPfsFluxReference should not brute-force the model fitting</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>Fri, 16 Jun 2023 06:56:30 +0000</created>
                <updated>Thu, 29 Jun 2023 07:28:17 +0000</updated>
                            <resolved>Thu, 29 Jun 2023 07:28:17 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                <comments>
                            <comment id="33218" author="sogo.mineo" created="Tue, 20 Jun 2023 00:18:32 +0000"  >&lt;p&gt;Could you review this PR?&lt;/p&gt;</comment>
                            <comment id="33252" author="sogo.mineo" created="Thu, 29 Jun 2023 07:28:17 +0000"  >&lt;p&gt;Merged. Thanks for reviewing.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                                                <inwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="23262">PIPE2D-1168</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="23463">PIPE2D-1231</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </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|zzsxzr:</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>