<!-- 
RSS generated by JIRA (8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b) at Sat Feb 10 15:33:50 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>[DAMD-61] Writing FITS to a text-mode file is not permitted in astropy 3.2</title>
                <link>https://pfspipe.ipmu.jp/jira/browse/DAMD-61</link>
                <project id="10400" key="DAMD">Data Model</project>
                    <description>&lt;p&gt;Astropy 3.2 requires the following fix to pfsSpectra.py.&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;datamodel/python/pfs/datamodel/pfsSpectra.py:208:&lt;/tt&gt;&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;
-with open(filename, &lt;span class=&quot;code-quote&quot;&gt;&quot;w&quot;&lt;/span&gt;) as fd:
+with open(filename, &lt;span class=&quot;code-quote&quot;&gt;&quot;wb&quot;&lt;/span&gt;) as fd:
    fits.writeto(fd)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Otherwise, the following exception is raised.&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;
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;.../pfsrepos/datamodel/python/pfs/datamodel/pfsSpectra.py&quot;&lt;/span&gt;, line 209, in writeFits
    fits.writeto(fd)
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;.../lib/python3.6/site-packages/astropy/utils/decorators.py&quot;&lt;/span&gt;, line 521, in wrapper
    &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; function(*args, **kwargs)
  File &lt;span class=&quot;code-quote&quot;&gt;&quot;.../lib/python3.6/site-packages/astropy/io/fits/hdu/hdulist.py&quot;&lt;/span&gt;, line 915, in writeto
    mode = FILE_MODES[fileobj_mode(fileobj)] &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; isfile(fileobj) &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;code-quote&quot;&gt;&apos;ostream&apos;&lt;/span&gt;
KeyError: &lt;span class=&quot;code-quote&quot;&gt;&apos;w&apos;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="13622">DAMD-61</key>
            <summary>Writing FITS to a text-mode file is not permitted in astropy 3.2</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="sogo.mineo">sogo.mineo</assignee>
                                    <reporter username="sogo.mineo">sogo.mineo</reporter>
                        <labels>
                    </labels>
                <created>Thu, 13 Jun 2019 01:07:00 +0000</created>
                <updated>Fri, 5 Jul 2019 00:09:11 +0000</updated>
                            <resolved>Fri, 5 Jul 2019 00:09:11 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                <comments>
                            <comment id="15653" author="sogo.mineo" created="Thu, 13 Jun 2019 04:09:50 +0000"  >&lt;p&gt;Here&apos;s a suggested patch.&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;
diff --git a/python/pfs/datamodel/pfsConfig.py b/python/pfs/datamodel/pfsConfig.py
index 3684080..abd78e5 100644
--- a/python/pfs/datamodel/pfsConfig.py
+++ b/python/pfs/datamodel/pfsConfig.py
@@ -252,7 +252,7 @@ &lt;span class=&quot;code-keyword&quot;&gt;class &lt;/span&gt;PfsDesign:
         ], hdr, name=&lt;span class=&quot;code-quote&quot;&gt;&apos;PHOTOMETRY&apos;&lt;/span&gt;))

         # clobber=True in writeto prints a message, so use open instead
-        with open(filename, &lt;span class=&quot;code-quote&quot;&gt;&quot;w&quot;&lt;/span&gt;) as fd:
+        with open(filename, &lt;span class=&quot;code-quote&quot;&gt;&quot;wb&quot;&lt;/span&gt;) as fd:
             fits.writeto(fd)

     def write(self, dirName=&lt;span class=&quot;code-quote&quot;&gt;&quot;.&quot;&lt;/span&gt;, fileName=None):
diff --git a/python/pfs/datamodel/pfsSpectra.py b/python/pfs/datamodel/pfsSpectra.py
index a150e0e..f66f2d8 100644
--- a/python/pfs/datamodel/pfsSpectra.py
+++ b/python/pfs/datamodel/pfsSpectra.py
@@ -205,7 +205,7 @@ &lt;span class=&quot;code-keyword&quot;&gt;class &lt;/span&gt;PfsSpectra:
             hduName = attr.upper()
             data = getattr(self, attr)
             fits.append(astropy.io.fits.ImageHDU(data, name=hduName))
-        with open(filename, &lt;span class=&quot;code-quote&quot;&gt;&quot;w&quot;&lt;/span&gt;) as fd:
+        with open(filename, &lt;span class=&quot;code-quote&quot;&gt;&quot;wb&quot;&lt;/span&gt;) as fd:
             fits.writeto(fd)

     def write(self, dirName=&lt;span class=&quot;code-quote&quot;&gt;&quot;.&quot;&lt;/span&gt;):
diff --git a/python/pfs/datamodel/pfsSpectrum.py b/python/pfs/datamodel/pfsSpectrum.py
index 5c40ff1..c4026a6 100644
--- a/python/pfs/datamodel/pfsSpectrum.py
+++ b/python/pfs/datamodel/pfsSpectrum.py
@@ -165,7 +165,7 @@ &lt;span class=&quot;code-keyword&quot;&gt;class &lt;/span&gt;PfsSimpleSpectrum:
         fits = HDUList()
         fits.append(PrimaryHDU())
         self._writeImpl(fits)
-        with open(filename, &lt;span class=&quot;code-quote&quot;&gt;&quot;w&quot;&lt;/span&gt;) as fd:
+        with open(filename, &lt;span class=&quot;code-quote&quot;&gt;&quot;wb&quot;&lt;/span&gt;) as fd:
             fits.writeto(fd)

     def write(self, dirName=&lt;span class=&quot;code-quote&quot;&gt;&quot;.&quot;&lt;/span&gt;):
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="15658" author="hassan" created="Thu, 13 Jun 2019 16:18:30 +0000"  >&lt;p&gt;&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/secure/ViewProfile.jspa?name=sogo.mineo&quot; class=&quot;user-hover&quot; rel=&quot;sogo.mineo&quot;&gt;sogo.mineo&lt;/a&gt;: re-assigned to you following the recent discussions on the slack #drp-2d channel. Please apply your patch to the ticket branch, run the integration test and create a pull request as per the standard procedure. &lt;/p&gt;</comment>
                            <comment id="15661" author="sogo.mineo" created="Fri, 14 Jun 2019 01:02:32 +0000"  >&lt;p&gt;I created a pull request just now.&lt;/p&gt;</comment>
                            <comment id="15704" author="hassan" created="Mon, 1 Jul 2019 13:21:48 +0000"  >&lt;p&gt;&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/secure/ViewProfile.jspa?name=sogo.mineo&quot; class=&quot;user-hover&quot; rel=&quot;sogo.mineo&quot;&gt;sogo.mineo&lt;/a&gt;: the pull request has been approved so you can merge to master.&lt;/p&gt;</comment>
                            <comment id="15705" author="sogo.mineo" created="Tue, 2 Jul 2019 00:05:25 +0000"  >&lt;p&gt;I thought that a maintainer would merge and push to the master instead of me. Do I have permission to do it?&lt;/p&gt;</comment>
                            <comment id="15706" author="hassan" created="Tue, 2 Jul 2019 13:19:53 +0000"  >&lt;p&gt;Yes, once the pull request has been approved the developer has permission to merge to master and close the ticket. If you do not have formal access to update git or JIRA this way, please contact me or jira@pfs.ipmu.jp . In the meantime, I will merge and close this ticket on your behalf.&lt;/p&gt;</comment>
                            <comment id="15722" author="sogo.mineo" created="Thu, 4 Jul 2019 02:10:43 +0000"  >&lt;ul&gt;
	&lt;li&gt;In addition to &lt;tt&gt;datamodel&lt;/tt&gt;&apos;s &lt;tt&gt;tickets/&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/DAMD-61&quot; title=&quot;Writing FITS to a text-mode file is not permitted in astropy 3.2&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DAMD-61&quot;&gt;&lt;del&gt;DAMD-61&lt;/del&gt;&lt;/a&gt;&lt;/tt&gt;, I have pushed another branch &lt;tt&gt;tickets/&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/browse/DAMD-61&quot; title=&quot;Writing FITS to a text-mode file is not permitted in astropy 3.2&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DAMD-61&quot;&gt;&lt;del&gt;DAMD-61&lt;/del&gt;&lt;/a&gt;&lt;/tt&gt; to &lt;tt&gt;drp_stella&lt;/tt&gt;. Do I have to make a pull request for this one?&lt;/li&gt;
	&lt;li&gt;The integration test ends by saying
&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;
nan
Done.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt; Can I ignore the printed value &quot;nan&quot; and believe the last word &quot;Done&quot; to go ahead?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="15723" author="hassan" created="Thu, 4 Jul 2019 02:47:56 +0000"  >&lt;p&gt;Yes - please create another pull request for the &lt;tt&gt;drp_stella&lt;/tt&gt; changes.&lt;/p&gt;

&lt;p&gt;The output of the integration test as you describe is correct, so once the PR on &lt;tt&gt;drp_stella&lt;/tt&gt; is approved, you can proceed with the merging to master.&lt;/p&gt;</comment>
                            <comment id="15724" author="hassan" created="Thu, 4 Jul 2019 14:45:00 +0000"  >&lt;p&gt;Pull request #73 also accepted. Please merge to master and close ticket.&lt;/p&gt;</comment>
                            <comment id="15725" author="sogo.mineo" created="Fri, 5 Jul 2019 00:09:11 +0000"  >&lt;p&gt;&lt;a href=&quot;https://pfspipe.ipmu.jp/jira/secure/ViewProfile.jspa?name=hassan&quot; class=&quot;user-hover&quot; rel=&quot;hassan&quot;&gt;hassan&lt;/a&gt; Thank you. I close this ticket&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|02qpt6:508yl001r</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10005" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="52">2DDRP-2019 F</customfieldvalue>

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