<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 16:05:26 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-1279] Make fitPfsFluxReference faster (3)</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-1279</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;We still have to make fitPfsFluxReference faster and I am working on it.&lt;/p&gt;

&lt;p&gt;In this ticket, I want to put two changes into the master branch.&lt;br/&gt;
 These changes will save us 1000 seconds out of 4676 seconds to run&lt;br/&gt;
 fitPfsFluxReference on a visit.&lt;/p&gt;
&lt;h2&gt;&lt;a name=&quot;Don%27tresamplemodelstwice&quot;&gt;&lt;/a&gt;Don&apos;t resample models twice&lt;/h2&gt;

&lt;p&gt;Currently, model spectra are resampled with a medium resolution before&lt;br/&gt;
 being whitened because the models that have been whitened and not&lt;br/&gt;
 doppler-shifted are reused many times by the brute-force fitting method.&lt;br/&gt;
 With Powell&apos;s method we no longer reuse this medium-resolution models.&lt;br/&gt;
 We can do away with the medium resolution models.&lt;/p&gt;

&lt;p&gt;After this change, the whitening procedure of model spectra gets more similar&lt;br/&gt;
 to that of observed spectra. We can expect less systematic errors.&lt;/p&gt;
&lt;h2&gt;&lt;a name=&quot;UsefewerPCAcomponents&quot;&gt;&lt;/a&gt;Use fewer PCA components&lt;/h2&gt;

&lt;p&gt;Currently, model spectra are made of 1024 PCA components. It turned out that&lt;br/&gt;
 the fitting results did not change very much after I changed the number of&lt;br/&gt;
 PCA components to 512. The final products (flux references) are still made&lt;br/&gt;
 of 1024 PCA components.&lt;/p&gt;
&lt;h2&gt;&lt;a name=&quot;Speed&quot;&gt;&lt;/a&gt;Speed&lt;/h2&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;
A: master
   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.025    0.025 4676.882 4676.882 fitPfsFluxReference.py:292(run)
    38541 1311.934    0.034 1312.064    0.034 fluxModelInterpolator.py:42(__call__)
    38546    2.578    0.000  958.301    0.025 fitContinuum.py:61(run)

B: Don&apos;t resample models twice
   ncalls tottime percall cumtime percall filename:lineno(function)
        1    0.021    0.021 4321.942 4321.942 fitPfsFluxReference.py:292(run)
    39973 1358.606    0.034 1358.791    0.034 fluxModelInterpolator.py:42(__call__)
    39978    2.156    0.000  566.514    0.014 fitContinuum.py:61(run)

C: Use fewer PCA components
   ncalls tottime percall cumtime percall filename:lineno(function)
        1    0.020    0.020 3542.754 3542.754 fitPfsFluxReference.py:299(run)
    39553  641.501    0.016  641.696    0.016 fluxModelInterpolator.py:42(__call__)
    39558    2.120    0.000  561.024    0.014 fitContinuum.py:61(run)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;These profiles are obtained by running fitPfsFluxReference.py on a visit.&lt;/p&gt;

&lt;p&gt;We can see that:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;A -&amp;gt; B: fitContinuum gets faster by 5 minutes.&lt;/li&gt;
	&lt;li&gt;B -&amp;gt; C: fluxModelInterpolator gets faster by 12 minutes.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;&lt;a name=&quot;quality&quot;&gt;&lt;/a&gt;quality&lt;/h2&gt;

&lt;p&gt;When I input 500 model spectra (with noise added) to fitPfsFluxReference and compare&lt;br/&gt;
 the outputs (teff, logg, metal, alpha) with the inputs, I get the following table:&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;
                                   A ( %stddev)      B ( %stddev)      C ( %stddev)
-----------------------------------------------------------------------------------
 RMS of residuals of  &lt;span class=&quot;code-quote&quot;&gt;&apos;teff&apos;&lt;/span&gt;  197.04 (  26.78 ) 129.95 (  17.66 ) 127.33 (  17.30 )
 RMS of residuals of  &lt;span class=&quot;code-quote&quot;&gt;&apos;logg&apos;&lt;/span&gt;    0.42 (  35.46 )   0.35 (  29.68 )   0.36 (  30.65 )
 RMS of residuals of     &lt;span class=&quot;code-quote&quot;&gt;&apos;m&apos;&lt;/span&gt;    0.72 (  41.15 )   0.70 (  39.74 )   0.68 (  38.85 )
 RMS of residuals of &lt;span class=&quot;code-quote&quot;&gt;&apos;alpha&apos;&lt;/span&gt;    0.33 (  95.42 )   0.32 (  93.22 )   0.30 (  87.13 )
-----------------------------------------------------------------------------------
Mean of residuals of  &lt;span class=&quot;code-quote&quot;&gt;&apos;teff&apos;&lt;/span&gt; -144.90 ( -19.69 ) -76.38 ( -10.38 ) -74.17 ( -10.08 )
Mean of residuals of  &lt;span class=&quot;code-quote&quot;&gt;&apos;logg&apos;&lt;/span&gt;   -0.13 ( -11.33 )  -0.05 (  -4.61 )  -0.06 (  -5.04 )
Mean of residuals of     &lt;span class=&quot;code-quote&quot;&gt;&apos;m&apos;&lt;/span&gt;   -0.03 (  -1.82 )  -0.04 (  -2.15 )  -0.05 (  -2.60 )
Mean of residuals of &lt;span class=&quot;code-quote&quot;&gt;&apos;alpha&apos;&lt;/span&gt;    0.00 (   1.00 )  -0.03 (  -8.88 )  -0.02 (  -6.84 )
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;In these tests, I set the input radial velocity to zero and fix the radial velocity&lt;br/&gt;
 parameter to zero during fitting so that measurement errors of the radial velocity&lt;br/&gt;
 do not affect the result. &quot;%stddev&quot; is the percentage relative to the standard deviation&lt;br/&gt;
 of the input 500 parameters. For &quot;A&quot;, &quot;B&quot;, and &quot;C&quot;, see &quot;Speed&quot; section above.&lt;/p&gt;

&lt;p&gt;We can see that (1) modifying the whitening method indeed improves the fitting quality,&lt;br/&gt;
 and that (2) changing the model quality does not affect the fitting quality.&lt;/p&gt;</description>
                <environment></environment>
        <key id="23776">PIPE2D-1279</key>
            <summary>Make fitPfsFluxReference faster (3)</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, 4 Aug 2023 07:34:34 +0000</created>
                <updated>Tue, 8 Aug 2023 00:32:15 +0000</updated>
                            <resolved>Tue, 8 Aug 2023 00:32:15 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                <comments>
                            <comment id="34258" author="sogo.mineo" created="Mon, 7 Aug 2023 04:56:29 +0000"  >&lt;p&gt;Could you review this PR?&lt;/p&gt;</comment>
                            <comment id="34261" author="sogo.mineo" created="Tue, 8 Aug 2023 00:32:15 +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|zzsz5r:</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>