<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 16:31:17 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>[INSTRM-1042] modify sky-to-pfi coordinate transformation to start with Ra-Dec</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/INSTRM-1042</link>
                <project id="10300" key="INSTRM">Instrument control development</project>
                    <description>&lt;p&gt;At present, sky-to-pfi of CoordTransp.py is incomplete: it only covers transformation from field angle of input light of the WFC lens (X_in, Y_in). So process of (Ra, Dec) -&amp;gt;&#160;(Az, El) -&amp;gt; (X_in, Y_in) needs to be added.&#160;&lt;/p&gt;

&lt;p&gt;I&apos;ll use astropy module and prescription by&#160;Hohenkerk (1984) for atmospheric refraction.&lt;/p&gt;</description>
                <environment></environment>
        <key id="14640">INSTRM-1042</key>
            <summary>modify sky-to-pfi coordinate transformation to start with Ra-Dec</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="yuki.moritani">yuki.moritani</assignee>
                                    <reporter username="yuki.moritani">yuki.moritani</reporter>
                        <labels>
                    </labels>
                <created>Tue, 28 Jul 2020 10:23:26 +0000</created>
                <updated>Wed, 23 Sep 2020 09:25:59 +0000</updated>
                            <resolved>Wed, 23 Sep 2020 09:25:59 +0000</resolved>
                                                                    <component>pfs_utils</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                <comments>
                            <comment id="17516" author="martin.reinecke" created="Mon, 10 Aug 2020 07:19:34 +0000"  >&lt;p&gt;I&apos;m currently testing this in a very naive way (see testcoord.py), by specifying some center Ra, Dec and requesting the PFI coordinates for exactly the same Ra, Dec. Unless I&apos;m overlooking some correction, this should result in returned coordinates of (0., 0.), correct?&lt;/p&gt;

&lt;p&gt;The unmodified code fails with:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;Traceback (most recent call last):
  File &quot;testcoord.py&quot;, line 15, in &amp;lt;module&amp;gt;
    testcoord()
  File &quot;testcoord.py&quot;, line 10, in testcoord
    res = ctrans(np.array([[ra], [dec]]), 0., &quot;sky_pfi&quot;, rotang, np.array([ra_c, dec_c]))
  File &quot;/home/martin/codes/pfs_utils/python/pfs/utils/coordinates/CoordTransp.py&quot;, line 62, in CoordinateTransform
    xyin, inr, za1 = convert_in_position(xyin, za, inr, c, cent, time)
  File &quot;/home/martin/codes/pfs_utils/python/pfs/utils/coordinates/CoordTransp.py&quot;, line 192, in convert_in_position
    za = za[0]
IndexError: invalid index to scalar variable.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;It seems that line 192 is actually not necessary, so I commented it out.&lt;/p&gt;

&lt;p&gt;After this change the code runs and returns the coordinates&#160; (0.10197685, -0.05085649), which is fairly close to zero. Is there some coordinate offset I&apos;m missing, or is this compatible with zero within the expected accuracy of the transform?&lt;/p&gt;

&lt;p&gt;Another question: is it OK to leave the zenith angle parameter unset in this coordinate conversion mode? I think yes, because the code ovewrites it anyway. If so, I&apos;d like to suggest giving it a default value of {{None }}and mention it in the docstring.&lt;/p&gt;</comment>
                            <comment id="17517" author="martin.reinecke" created="Mon, 10 Aug 2020 07:41:49 +0000"  >&lt;p&gt;The shape of &lt;tt&gt;xyin&lt;/tt&gt; apparently needs to be{{ (2, N)}}, rather than {{(N,2). }}Not sure whether the code or the documentation should be adjusted.&lt;/p&gt;</comment>
                            <comment id="17518" author="martin.reinecke" created="Mon, 10 Aug 2020 07:45:28 +0000"  >&lt;p&gt;Performance seems to be roughly 30.000 coordinate transforms per second on my laptop, which might become a slight bottleneck for large source catalogs.&lt;/p&gt;</comment>
                            <comment id="17519" author="martin.reinecke" created="Mon, 10 Aug 2020 08:13:22 +0000"  >&lt;p&gt;The &lt;tt&gt;inr&lt;/tt&gt; argument doesn&apos;t appear to have any influence on the returned values. I would have expected that varying{{ inr}} from 0 to 360 would produce PFI coordinates that describe a circle around (0,0). Am I making an incorrect assumption?&lt;/p&gt;</comment>
                            <comment id="17524" author="yuki.moritani" created="Tue, 11 Aug 2020 09:50:24 +0000"  >&lt;ul&gt;
	&lt;li&gt;As for za and offsets at (0, 0), I&apos;ll look into it. (Actually (0, 0) in the WFC model don&apos;t usually go PFI (0,0), but your number is larger than expected at zenith...)&lt;/li&gt;
	&lt;li&gt;Shape of &lt;tt&gt;xyin&lt;/tt&gt; should be&#160; &lt;tt&gt;(2,N)&lt;/tt&gt;, so I&apos;ll fix the document. I&apos;m really sorry for confusion&lt;/li&gt;
	&lt;li&gt;As for performance, to be honest, I don&apos;t have any idea about the requirement...&lt;/li&gt;
	&lt;li&gt;For sky-to-pfi transformation, &lt;tt&gt;inr&lt;/tt&gt; actually doesn&apos;t have any meaning, since (1) &lt;tt&gt;inr&lt;/tt&gt; is calculated via astropy. As you expect, PFI coordinates rotates w.r.t&#160;&lt;tt&gt;inr&lt;/tt&gt;, so you&apos;ll see stars rotate on PFI coordinates if you change the time... This made me realised that I didn&apos;t consider PA ... PA should be taken into account... correct?&#160;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="17525" author="martin.reinecke" created="Tue, 11 Aug 2020 10:46:47 +0000"  >&lt;p&gt;&lt;cite&gt;(Actually (0, 0) in the WFC model don&apos;t usually go PFI (0,0), but your number is larger than expected at zenith...)&lt;/cite&gt;&lt;/p&gt;

&lt;p&gt;I don&apos;t think I&apos;m pointing at the zenith, so the numbers may be fine!&lt;/p&gt;

&lt;p&gt;&lt;cite&gt;This made me realised that I didn&apos;t consider PA ... PA should be taken into account... correct&lt;/cite&gt;?&lt;/p&gt;

&lt;p&gt;Ahh ... thank you for pointing this out! I was looking for something PA-like, and `inr` seemed to be a good match, so I thought they were the same. Sorry for the confusion!&lt;/p&gt;

&lt;p&gt;Yes, I think we will need PA support.&lt;/p&gt;

&lt;p&gt;Concerning performance, I think we needn&apos;t worry about this at the moment. In any case I&apos;ll try to keep redundant calls to the absolute minimum.&lt;/p&gt;</comment>
                            <comment id="17625" author="martin.reinecke" created="Mon, 7 Sep 2020 13:41:17 +0000"  >&lt;p&gt;Sorry to come back to this, but I just realized that I will most likely need the `pfi_sky` direction as well. Without access to this functionality, I&apos;d have to query a region larger than a square degree when looking for guide star candidates, which will result in very large query results and may be rejected by the DB servers.&lt;/p&gt;

&lt;p&gt;A rough approximation is currently sufficient for my purposes, so I can try to implement a first-order accurate solution as a workaround. But I&apos;d still be happy of there was an official way to compute these transforms as well.&lt;/p&gt;

&lt;p&gt;Is the `pfi_sky` transformation direction currently planned, and if so, what are the (rough) time scales?&lt;/p&gt;</comment>
                            <comment id="17634" author="yuki.moritani" created="Wed, 9 Sep 2020 09:01:03 +0000"  >&lt;p&gt;&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/secure/ViewProfile.jspa?name=Martin.Reinecke&quot; class=&quot;user-hover&quot; rel=&quot;Martin.Reinecke&quot;&gt;Martin Reinecke&lt;/a&gt;&#160;would you mind discussing `pfi_sky` transformation in another ticket? If you agree, I&apos;ll file another.&lt;/p&gt;</comment>
                            <comment id="17636" author="martin.reinecke" created="Wed, 9 Sep 2020 09:22:56 +0000"  >&lt;p&gt;Oh absolutely! Sorry for mixing up various different issues here.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="12815" name="testcoord.py" size="359" author="Martin.Reinecke" created="Mon, 10 Aug 2020 07:19:18 +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|zzs2b4:</customfieldvalue>

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

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