<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 16:05:23 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-1275] DoubleDetectorMap findWavelength method no longer accepting multivalue arrays</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/PIPE2D-1275</link>
                <project id="10002" key="PIPE2D">DRP 2-D Pipeline</project>
                    <description>&lt;p&gt;The overloaded method `findWavelength` no longer accepts numpy arrays when there is more than one element in the array.&lt;/p&gt;

&lt;p&gt;I&apos;ve attached a minimal working example script but the following is an example:&lt;br/&gt;
 &#160;&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;
&#160;# Works correctly

DetectorMap.findWavelength(1, 340)

DetectorMap.findWavelength(np.array([1]), 340)

DetectorMap.findWavelength(2, np.array([341]))

DetectorMap.findWavelength(np.array([2]), np.array([341]))

&#160;# Overload error

DetectorMap.findWavelength(np.array([1, 2]), np.array([340]))

DetectorMap.findWavelength(np.array([1]), np.array([340, 341]))

DetectorMap.findWavelength(np.array([1, 2]), np.array([340, 341]))
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;nobr&quot;&gt;&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/secure/attachment/16206/16206_test-db-findWavelength.py&quot; title=&quot;test-db-findWavelength.py attached to PIPE2D-1275&quot;&gt;test-db-findWavelength.py&lt;sup&gt;&lt;img class=&quot;rendericon&quot; src=&quot;https://pfspipe.ipmu.jp/jira/images/icons/link_attachment_7.gif&quot; height=&quot;7&quot; width=&quot;7&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&#160;Edit: error message:&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:&#160; 649.9656811860972

Traceback (most recent call last):

&#160; File &lt;span class=&quot;code-quote&quot;&gt;&quot;test-db-findWavelength.py&quot;&lt;/span&gt;, line 23, in &amp;lt;module&amp;gt;

&#160; &#160; print(&lt;span class=&quot;code-quote&quot;&gt;&apos;2: &apos;&lt;/span&gt;, detector_map_used.findWavelength(1, np.array([340, 341])))&#160; # Fails

TypeError: findWavelength(): incompatible function arguments. The following argument types are supported:

&#160; &#160; 1. (self: pfs.drp.stella.DetectorMap.DetectorMap, fiberId: &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;, row: &lt;span class=&quot;code-object&quot;&gt;float&lt;/span&gt;, throwOnError: bool = False) -&amp;gt; &lt;span class=&quot;code-object&quot;&gt;float&lt;/span&gt;

&#160; &#160; 2. (self: pfs.drp.stella.DetectorMap.DetectorMap, fiberId: &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;, row: numpy.ndarray) -&amp;gt; numpy.ndarray

&#160; &#160; 3. (self: pfs.drp.stella.DetectorMap.DetectorMap, fiberId: numpy.ndarray, row: numpy.ndarray) -&amp;gt; numpy.ndarray

&#160; &#160; 4. (self: pfs.drp.stella.DetectorMap.DetectorMap, arg0: &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;, arg1: numpy.ndarray) -&amp;gt; numpy.ndarray

&#160; &#160; 5. (self: pfs.drp.stella.DetectorMap.DetectorMap, arg0: numpy.ndarray, arg1: numpy.ndarray) -&amp;gt; numpy.ndarray

&#160;

Invoked with: &amp;lt;pfs.drp.stella.DoubleDetectorMap.DoubleDetectorMap object at 0x7ff1c5d96430&amp;gt;, 1, array([340, 341])
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>&lt;p&gt;`drp_stella` and `datamodel` see the error on `w.2023.30`, `w.2023.30a`, and `w.2023.31`. It was working with `w.2023.29`.&lt;/p&gt;</environment>
        <key id="23770">PIPE2D-1275</key>
            <summary>DoubleDetectorMap findWavelength method no longer accepting multivalue arrays</summary>
                <type id="1" iconUrl="https://pfspipe.ipmu.jp/jira/secure/viewavatar?size=xsmall&amp;avatarId=10503&amp;avatarType=issuetype">Bug</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="price">price</assignee>
                                    <reporter username="wtgee">Wilfred Gee</reporter>
                        <labels>
                    </labels>
                <created>Tue, 1 Aug 2023 19:20:39 +0000</created>
                <updated>Wed, 23 Aug 2023 16:40:30 +0000</updated>
                            <resolved>Wed, 23 Aug 2023 16:40:30 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                <comments>
                            <comment id="34237" author="price" created="Tue, 1 Aug 2023 20:01:44 +0000"  >&lt;p&gt;pybind is very picky about getting the correct array type. The rule is that fiberIds are 32-bit integers, pixel positions are 32-bit floats (but there are typically additional overrides that will work with 64-bit floats, as a convenience) and wavelengths are 64-bit floats.&lt;/p&gt;

&lt;p&gt;The following works:&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;
print(&lt;span class=&quot;code-quote&quot;&gt;&apos;2: &apos;&lt;/span&gt;, detector_map_used.findWavelength(1, np.array([340, 341], dtype=np.float32)))  # Now works
print(&lt;span class=&quot;code-quote&quot;&gt;&apos;3: &apos;&lt;/span&gt;, detector_map_used.findWavelength(np.array([1, 2], dtype=np.int32), np.array([340, 340], dtype=np.float32)))  # Now works
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="34238" author="wtgee" created="Tue, 1 Aug 2023 20:45:17 +0000"  >&lt;p&gt;Thanks &lt;a href=&quot;https://pfspipe.ipmu.jp/jira/secure/ViewProfile.jspa?name=price&quot; class=&quot;user-hover&quot; rel=&quot;price&quot;&gt;price&lt;/a&gt;, I can confirm it works if I explicitly cast them. I&apos;ve been using the `fiberId` and `wavelength` directly from an `ArcLineSet.data`, which was working without an explicit cast earlier, although I&apos;m not sure why. I&apos;ll let you know if I encounter anything else, thanks!&lt;/p&gt;</comment>
                            <comment id="34336" author="price" created="Wed, 23 Aug 2023 16:40:30 +0000"  >&lt;p&gt;No fix required.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="16206" name="test-db-findWavelength.py" size="689" author="wtgee" created="Tue, 1 Aug 2023 19:18:20 +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|zzsz4f:</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>