<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kris Stern on Medium]]></title>
        <description><![CDATA[Stories by Kris Stern on Medium]]></description>
        <link>https://medium.com/@krisastern?source=rss-33703681b362------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*W1XX8BY2493iZsrylW8j_A.jpeg</url>
            <title>Stories by Kris Stern on Medium</title>
            <link>https://medium.com/@krisastern?source=rss-33703681b362------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 31 May 2026 22:17:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@krisastern/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[GSoC 2020: glue-solar project 3.2]]></title>
            <link>https://medium.com/@krisastern/gsoc-2020-glue-solar-project-3-2-eb6b2bccce85?source=rss-33703681b362------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb6b2bccce85</guid>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[solar-physics]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[glue]]></category>
            <category><![CDATA[sunpy]]></category>
            <dc:creator><![CDATA[Kris Stern]]></dc:creator>
            <pubDate>Sun, 23 Aug 2020 08:07:23 GMT</pubDate>
            <atom:updated>2020-08-25T23:05:56.362Z</atom:updated>
            <content:encoded><![CDATA[<p>It is finally nearing the end of the project for me, as far as coding is concerned. Over the past few weeks I have spent some time on some last-ditch effort to debug with my mentors and to squeeze in as much as I possibly could given the time constraint I have been under. For this GSoC project I have worked on two repositories in total: glue-viz/glue as well as glue-viz/glue-solar. The former glue package is a software that serves as a multidiscipline tool for data visualization, encompassing solar physics, astronomy, medicine, and geospatial satellite imagery. And, the latter glue-solar plugin is an tool to extend the functionality of the former for solar physics specifically, including both instrument-agnostic and instrument-specific support. The particular work done thus far during this summer includes but not limited to sorting out some generalisation issues that previously prevented glue <a href="https://github.com/glue-viz/glue/pull/2167">PR #2167</a> from being usable for general FITS files, some type as well as wcs linkages issues in glue <a href="https://github.com/glue-viz/glue/pull/2161">PR #2161</a> that cropped up after applying changes suggested in code review that have not been properly checked on my part. All in all, the pull requests started or completed for the project include but are not limited to the following list:</p><ol><li>glue <a href="https://github.com/glue-viz/glue/pull/2167">PR #2167</a> for updating 1D Profile viewer to use wcsaxes for plotting and add sliders (open / commit: <a href="https://github.com/glue-viz/glue/pull/2167/commits/da8253640dcbd25d06e0b4a2640cc02ff4606a0b">da82536</a>)</li><li>glue <a href="https://github.com/glue-viz/glue/pull/2161">PR #2161</a> for updating ‘wcs_autolinking’ code to handle N-D cases using a generalised approach conforming to <a href="https://docs.astropy.org/en/stable/wcs/wcsapi.html">APE 14: Shared Python interface for World Coordinate Systems</a> (merged / commit: <a href="https://github.com/glue-viz/glue/pull/2161/commits/222d31e4288f7f69ac0f5a0e30159d31e146521b">222d31e</a>)</li><li>glue <a href="https://github.com/glue-viz/glue/pull/2164">PR #2164</a> for adding support to NDData for astropy package (open / commit: <a href="https://github.com/glue-viz/glue/pull/2164/commits/0b089d77cfda03213f8d1fd0bc58ab95781789f9">0b089d7</a>)</li><li>glue <a href="https://github.com/glue-viz/glue/pull/2131">PR #2131</a> for adding a preferred_cmap attribute to introduce a color coding scheme for different glue-solar data types (for example to distinguish the IRIS raster data cubes from its companion IRIS SJI data cubes (merged / commit: <a href="https://github.com/glue-viz/glue/pull/2131/commits/381fe7527308e6a00442de5e26a13c4466911125">381fe75</a>)</li><li>glue-solar <a href="https://github.com/glue-viz/glue-solar/pull/15">PR #15</a> for adding to open with “SunPy Map” GUI option (merged / commit: <a href="https://github.com/glue-viz/glue-solar/pull/15/commits/91c5b6a96cd687398b522a310036ae45c24445d6">91c5b6a</a>)</li><li>glue-solar <a href="https://github.com/glue-viz/glue-solar/pull/17">PR #17</a> for adding “Loading and Overplotting AIA and HMI files as SunPy Maps” docs as a user guide (merged / commit: <a href="https://github.com/glue-viz/glue-solar/pull/17/commits/de7be6223c66c9772f30c5fd279748aed350f84c">de7be62</a>)</li><li>glue-solar <a href="https://github.com/glue-viz/glue-solar/pull/18">PR #18</a> for adding “loading IRIS level 2 raster and sji data together docs” as a user guide (merged / commit: <a href="https://github.com/glue-viz/glue-solar/pull/18/commits/fa416f4be2e197352d6e2996d71882bc46872cf6">fa416f4</a>)</li><li>glue-solar <a href="https://github.com/glue-viz/glue-solar/pull/23">PR #23</a> for updating IRIS data labels with OBSIDs for filtering (merged / commit: <a href="https://github.com/glue-viz/glue-solar/pull/23/commits/0d1a17f94b3e43b27b3b0f9c826e0955860884a9">0d1a17f</a>)</li><li>glue-solar <a href="https://github.com/glue-viz/glue-solar/pull/28">PR #28</a>, <a href="https://github.com/glue-viz/glue-solar/pull/29">PR #29</a> as core glue-solar documentation (merged / commits: <a href="https://github.com/glue-viz/glue-solar/pull/28/commits/b9b6e21fe2f278ede01594f75abb094580028d46">b9b6e21</a> &amp; <a href="https://github.com/glue-viz/glue-solar/pull/29/commits/d706912ecae698e0e4b738a735195c1f3757d02b">d706912</a>)</li><li>glue-solar <a href="https://github.com/glue-viz/glue-solar/pull/32">PR #32</a> for patching a TypeError bug in the glue-solar plugin that was not caught in CI tests before, added a unit test in the process. (merged / commit: <a href="https://github.com/glue-viz/glue-solar/pull/32/commits/f3f7aae07c4911f1f6ed08e4a6cc1ba855fb2dad">f3f7aae</a>)</li><li>glue-solar <a href="https://github.com/glue-viz/glue-solar/pull/33">PR #33</a> for adding data loader customization guide as developer docs (merged / commit: <a href="https://github.com/glue-viz/glue-solar/pull/33/commits/1973d2442ac09504df8694d973a677e089510e1b">1973d24</a>)</li></ol><p>As a personal bonus, I have actually started using our work on the glue 1D profile tool for my current doctoral studies on some studies of planetary nebulae applying integral field spectroscopy (IFS), which involves the handling of a large number of data cubes from some Australian telescopes (data collected by my PhD supervisor Prof. Quentin Parker). Turned out this tool made the process of investigating the different spectra, which could run up to hundreds in number per data cube or observation, as it allows me to load in my data cube only once, and then to inspect the variation across spatial dimensions to see if the signal-to-noise of a particular observation is too high, or if the opposite is true so that the spectra will then be further processed into full-optical integrated spectra with flux calibration or de-reddening as necessary.</p><p>I am grateful for Google, my mentors, other org members as well as my GSoC peers to make this a particular fun-filled and memorable project! I have learned so much from the experience that even money cannot buy in terms of programming and soft skills. I wish Google will continue this program or initiate some similar program to continue cultivating new generations of open-source software developers / development enthusiasts to further our aim to make open-source approachable and usable for all.</p><p>It is my hope that I will be able to continue my contributions to both glue and glue-solar even after this year’s GSoC is over.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb6b2bccce85" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSoC 2020: glue-solar project 3.1]]></title>
            <link>https://medium.com/@krisastern/gsoc-2020-glue-solar-project-3-1-4aebd6964154?source=rss-33703681b362------2</link>
            <guid isPermaLink="false">https://medium.com/p/4aebd6964154</guid>
            <category><![CDATA[sunpy]]></category>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[solar-physics]]></category>
            <category><![CDATA[glue]]></category>
            <dc:creator><![CDATA[Kris Stern]]></dc:creator>
            <pubDate>Sun, 09 Aug 2020 23:22:40 GMT</pubDate>
            <atom:updated>2020-08-09T23:22:40.637Z</atom:updated>
            <content:encoded><![CDATA[<p>The 3rd coding period of GSoC 2020 will officially conclude in 2 weeks time. I would like to take this opportunity to review the progress made thus far, and to outline what other major feature can be added to glue-solar, perhaps over the remaining 2 weeks and beyond.</p><p>We have finally resumed code reviews for the remaining PRs in the glue repo, and I am happy to report that the PR dealing with adding a preferred_cmap attribute to the visual module of glue/core has been merged four days ago from today. This is a very memorable milestone as this is my first contribution to the glue codebase. The remaining PRs which are being worked on include the 1D Profile PR (<a href="https://github.com/glue-viz/glue/pull/2156">PR #2156</a>) as well as the wcs auto-linking PR (<a href="https://github.com/glue-viz/glue/pull/2161">PR #2161</a>).</p><p>Regarding our work at the glue-solar repo, all of the PRs reviewed except the two experimental ones has been merged. A User’s Guide and a Developer’s Guide have been added to the <a href="https://glue-solar.readthedocs.io/en/latest/">docs</a>, while there is one open WIP PR which I am working on to add both a contributing document and the code references (or API) for the repo. Also some docs introducing users on how to start their own extensions in glue-solar for conducting solar physics has been planned.</p><p>All of the above will form the bulk of work to be submitted for the GSoC project.</p><p>More can be done for glue-solar, including but not limited to the following:</p><ol><li>Add NDData support to glue via glue-solar</li><li>Add instrument loader code from sunkit-instruments to glue-solar</li><li>Enable image / Movie exports, both with axes and without axes via matplotlib</li><li>Add support for pre-computed statistics in datasets / viewers.</li></ol><p>Hopefully with the support of the mentors much of what has been planned can be brought to fruition, so that this project will be a successful one.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4aebd6964154" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSoC 2020: glue-solar project 2.2]]></title>
            <link>https://medium.com/@krisastern/gsoc-2020-glue-solar-project-2-2-db0e0ef935b2?source=rss-33703681b362------2</link>
            <guid isPermaLink="false">https://medium.com/p/db0e0ef935b2</guid>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[glue]]></category>
            <category><![CDATA[solar-physics]]></category>
            <category><![CDATA[sunpy]]></category>
            <dc:creator><![CDATA[Kris Stern]]></dc:creator>
            <pubDate>Sun, 26 Jul 2020 12:13:28 GMT</pubDate>
            <atom:updated>2020-07-26T12:21:39.821Z</atom:updated>
            <content:encoded><![CDATA[<p>The end of the 2nd Coding Period of this year’s Google Summer of Code has finally arrived. I cannot help but noticed the many things I have learned/built over the past two months for both the <a href="http://glueviz.org/">glue</a> Graphical User Interface (GUI), as well for its solar physics plugin glue-solar. One of the tricks I have learned is writing up tests for the GUI programming I have done in the process, which is using Qt for Python to port the entire <a href="https://wiki.qt.io/PySide">PySide</a> module to Qt5. My main approach is quite simple: Imitate, modify, test. Since glue has a fairly well developed codebase, it is not hard to find sample code snippets within it for inspiration of new code to add. The GUI unit tests are no exception to this rule. And, I would like to use the opportunity to share the experience with more novice contributors to the software, so perhaps somehow someone else somewhere down the line will be able to benefit from this.</p><p>The first and foremost concern we should have regarding any type of unit testing is what we should check for functionality-wise. Let me take some code I have just written over the past few days which adds NDData (a data structure native to Astropy) support to glue and enables the loading of various types of astronomical data more readily, such as the standard FITS files. As I have discussed with my mentors via the glue-solar IRC channel, we have observed that NDData is much like laser was back in the 1960’s (e.g. as <a href="https://www.nytimes.com/1964/05/06/archives/developer-of-the-laser-calls-it-a-solution-seeking-a-problem.html">reported by NYTimes</a> then) was a solution in search of a problem before its wider adoption by the astronomy community for LSST, DKIST and CCDProc data. Now we are in the process of integrating it into glue. The original conception of this, at least in principle, is to use the simple and fluid structure of NDData to help process for example FITS data. This is because there are no generic NDData files in existence at all. This is to facilitate the manipulation of not only the data component, but also its units, mask, uncertainty, and meta attributes, which are quite common in the handling of astronomical data (pun intended). With such a motivation in mind, we have added a nddata.py module to the glue/core/data_factories directory in a <a href="https://github.com/glue-viz/glue/pull/2164">PR</a> at glue. To complete the PR, it is standard practice to add tests where applicable, so we have added a testing module called test_nddata.py in the glue/core/data_factories/tests directory to not only serve as a routine, but also to test whether the code has been properly debugged, which caught all of the major known bugs I have inadvertently introduced to the codebase before testing.</p><p>The GUI unit test I have written is as follows:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ba8b2229df9cf1b5b160c70096612af9/href">https://medium.com/media/ba8b2229df9cf1b5b160c70096612af9/href</a></iframe><p>I have studied the other tests in the same glue/core/data_factories/tests carefully before I proceed to write the code, as I have observed that the most basic test to write is to test the data loader. Of course, official docs helped me greatly as well. As for the formatted NDData factory, that would be hard to test. I will need to consult with my mentors, before deciding on whether a separate unit test for that later.</p><p>One takeaway I have come away with in the process is that sufficient time is needed before I could brainstorm and come up with a tangible plan to write unit tests for any established codebase, and that I should not rush through the process. This is a lesson that I will definitely keep in mind. There is no use going through the motion and not enjoying the process as I go along, not to mention the omissions that I would make otherwise without a well thought-out plan.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db0e0ef935b2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSoC 2020: glue-solar project 2.1]]></title>
            <link>https://medium.com/@krisastern/gsoc-2020-glue-solar-project-2-1-620347ad3f8d?source=rss-33703681b362------2</link>
            <guid isPermaLink="false">https://medium.com/p/620347ad3f8d</guid>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[solar-physics]]></category>
            <category><![CDATA[glue]]></category>
            <category><![CDATA[sunpy]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Kris Stern]]></dc:creator>
            <pubDate>Sun, 12 Jul 2020 23:40:22 GMT</pubDate>
            <atom:updated>2020-07-13T01:36:49.902Z</atom:updated>
            <content:encoded><![CDATA[<p>The second coding period is now officially halfway through. Since the end of the first coding period, I have been working on both the <a href="https://github.com/glue-viz/glue/pull/2156">1D Profile viewer</a> and <a href="https://github.com/glue-viz/glue/pull/2161">WCS autolinking</a>. Since much has been discussed about the 1D Profile viewer of glue and now that it is finally working, let me take the opportunity to talk about the wcs-autolinking PR.</p><p><strong>Problem statement</strong>: Originally the wcs-autolinking only worked for some cases, for example for the spatial axes but not for the temporal and wavelength axes in the scenario where the dimensions of the two wcs objects of the data cubes being matched up do not match. This is highly undesirable and needs generalizing while conforming to <a href="https://github.com/astropy/astropy-APEs/blob/master/APE14.rst">APE 14</a>, where the issue of a shared Python interface for World Coordinate Systems is discussed.</p><p><strong>The solution</strong>: So we rewrote the code. Most of the celestial code has been retained, with some new additions to add linking for the other dimensions. The code rewritten is as follows:</p><pre># Case for when the axes don&#39;t exactly match up<br>if not forwards or not backwards:</pre><pre>    # A generalized APE 14-compatible way<br>    # Handle also the extra-spatial axes such as those of the time and wavelength dimensions</pre><pre>    if not wcs1.has_celestial or not wcs2.has_celestial:<br>        raise IncompatibleWCS(&quot;Can&#39;t create WCS link between {0} and {1}&quot;.format(data1.label, data2.label))</pre><pre>    try:<br>        wcs1_celestial = wcs1.celestial<br>        wcs2_celestial = wcs2.celestial<br>        wcs1_celestial_axis_physical_types = wcs1.celestial.world_axis_physical_types<br>        wcs2_celestial_axis_physical_types = wcs2.celestial.world_axis_physical_types<br>        print(&#39;wcs1.celestial.world_axis_physical_types&#39;, wcs1_celestial_axis_physical_types)<br>        print(&#39;wcs2.celestial.world_axis_physical_types&#39;, wcs2_celestial_axis_physical_types)<br>    except Exception:<br>        raise IncompatibleWCS(&quot;Can&#39;t create WCS link between {0} and {1}&quot;.format(data1.label, data2.label))</pre><pre>    cids1 = data1.pixel_component_ids<br>    cids1_celestial = [cids1[wcs1.wcs.naxis - wcs1.wcs.lng - 1],<br>                       cids1[wcs1.wcs.naxis - wcs1.wcs.lat - 1]]<br>    slicing_axes_celestial1 = [cids1_celestial[0].axis, cids1_celestial[1].axis]<br>    slicing_axes_celestial1 = sorted(slicing_axes_celestial1, key=str, reverse=False)<br>    print(&#39;slicing_axes_celestial1&#39;, slicing_axes_celestial1)</pre><pre>    if wcs1_celestial.wcs.lng &gt; wcs1_celestial.wcs.lat:<br>        cids1_celestial = cids1_celestial[::-1]</pre><pre>    cids2 = data2.pixel_component_ids<br>    cids2_celestial = [cids2[wcs2.wcs.naxis - wcs2.wcs.lng - 1],<br>                       cids2[wcs2.wcs.naxis - wcs2.wcs.lat - 1]]<br>    slicing_axes_celestial2 = [cids2_celestial[0].axis, cids2_celestial[1].axis]<br>    slicing_axes_celestial2 = sorted(slicing_axes_celestial2, key=str, reverse=False)<br>    print(&#39;slicing_axes_celestial2&#39;, slicing_axes_celestial2)</pre><pre>    if wcs2_celestial.wcs.lng &gt; wcs2_celestial.wcs.lat:<br>        cids2_celestial = cids2_celestial[::-1]</pre><pre>    # Collect all apparently matching axes in two lists for the two wcs objects being linked up<br>    wcs1_sliced_physical_types = wcs1_celestial_axis_physical_types<br>    slicing_axes1 = slicing_axes_celestial1<br>    wcs2_sliced_physical_types = wcs2_celestial_axis_physical_types<br>    slicing_axes2 = slicing_axes_celestial2<br>    for i, physical_type1 in enumerate(wcs1.world_axis_physical_types):<br>        for j, physical_type2 in enumerate(wcs2.world_axis_physical_types):<br>            if physical_type1 == physical_type2:<br>                if physical_type1 not in wcs1_sliced_physical_types:<br>                    slicing_axes1.append(wcs1.world_n_dim - i - 1)<br>                    wcs1_sliced_physical_types.append(physical_type1)<br>                if physical_type2 not in wcs2_sliced_physical_types:<br>                    slicing_axes2.append(wcs2.world_n_dim - j - 1)<br>                    wcs2_sliced_physical_types.append(physical_type2)</pre><pre>    slicing_axes1 = sorted(slicing_axes1, key=str, reverse=True)<br>    slicing_axes2 = sorted(slicing_axes2, key=str, reverse=True)</pre><pre>    print(&#39;slicing_axes1&#39;, slicing_axes1)<br>    print(&#39;slicing_axes2&#39;, slicing_axes2)</pre><pre>    print(&#39;wcs1_sliced_physical_types&#39;, wcs1_sliced_physical_types)<br>    print(&#39;wcs2_sliced_physical_types&#39;, wcs2_sliced_physical_types)</pre><pre>    # Generate slices for the wcs slicing<br>    slices1 = (slice(None),) * wcs1.world_n_dim<br>    slices2 = (slice(None),) * wcs2.world_n_dim</pre><pre>    slices1 = sorted(list(slices1))<br>    slices2 = sorted(list(slices2))</pre><pre>    for i in range(wcs1.world_n_dim):<br>        if i in slicing_axes1:<br>            pass<br>        else:<br>            slices1[i] = 0</pre><pre>    for i in range(wcs2.world_n_dim):<br>        if i in slicing_axes2:<br>            pass<br>        else:<br>            slices2[i] = 0</pre><pre>    wcs1_sliced = wcs1[tuple(slices1)]<br>    wcs2_sliced = wcs2[tuple(slices2)]</pre><pre>    cids1 = data1.pixel_component_ids<br>    cids1_sliced = [cids1[x] for x in slicing_axes1]<br>    cids1_sliced = sorted(cids1_sliced, key=str, reverse=True)</pre><pre>    cids2 = data2.pixel_component_ids<br>    cids2_sliced = [cids2[x] for x in slicing_axes2]<br>    cids2_sliced = sorted(cids2_sliced, key=str, reverse=True)</pre><pre>    pixel_cids1, pixel_cids2, forwards, backwards = get_cids_and_functions(<br>        wcs1_sliced, wcs2_sliced, cids1_sliced, cids2_sliced)</pre><pre>    self._physical_types_1 = wcs1_sliced_physical_types<br>    self._physical_types_2 = wcs2_sliced_physical_types</pre><pre>    if pixel_cids1 is None:<br>        raise IncompatibleWCS(&quot;Can&#39;t create WCS link between {0} and {1}&quot;.format(data1.label, data2.label))</pre><p>After checking with the tests written previously the code was modified before it is confirmed with pytest that all CI tests are now passing.</p><p>Now we can link up wcs axes of the same physical types of two data cubes having different dimensions with no problems, illustrated as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ffgo6t1M0ah9UcCyeLVdfg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=620347ad3f8d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSoC 2020: glue-solar project 1.2]]></title>
            <link>https://medium.com/@krisastern/gsoc-2020-glue-solar-project-1-2-65ef40ba2b71?source=rss-33703681b362------2</link>
            <guid isPermaLink="false">https://medium.com/p/65ef40ba2b71</guid>
            <category><![CDATA[solar-physics]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[glue]]></category>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[sunpy]]></category>
            <dc:creator><![CDATA[Kris Stern]]></dc:creator>
            <pubDate>Mon, 29 Jun 2020 19:11:30 GMT</pubDate>
            <atom:updated>2020-06-29T20:28:44.797Z</atom:updated>
            <content:encoded><![CDATA[<p>It has been a month since GSoC’s coding period started early in June 2020. Much has happened since then in the glue-solar project, and to sum it up I have been pretty much spending all my GSoC time working on a WCSAxes-enabled version the 1D Profile viewer for extracting 1D spectrum from data cubes using the pixel extracted in a 2D Image viewer. To be honest it has been very effort-intensive, though not necessarily time-intensive as I have previously feared. But the journey has been fun given my very supportive and friendly project mentors. To the layman and non-specialist what I have related regarding the project details probably sounds esoteric, which it is. With this realization I will split this and remaining GSoC blog posts into two halves: one pertaining to my personal struggles, and the other pertaining to the technical aspect of the work carried out thus far, in that order, so that that latter part can be conveniently skipped over (but I do encourage you to do read both sections in tandem so get a better understanding of the project :-p) Anyway, let me begin…</p><h3>Part 1: Personal struggles</h3><p>One personal “secret” I wish to reveal is that this is my last year as a PhD Candidate in Astrophysics at the University of Hong Kong (HKU). Not only that, since my Postgraduate Scholarship officially ran out in October 2019 and no other funding options are available, I have been holding down a job as a front-end developer for some parts of the weekdays to support my PhD studies. So far I have been trying to manage my time wisely and balancing my various duties and obligations as best as possible, but it has been a genuine struggle, especially in me trying to find enough time to sleep. To make matters worse I have a tendency to drift towards writing code than writing my thesis, though I am making progress in both. So I did hesitated to apply for GSoC for a 2nd time this year and was originally against the idea. But when I saw the project ideas available I changed my mind. Glue-solar is actually like a godsend for me; the project enabled me to not only further develop my self-discipline as a person, it also allowed me to learn from experts in the field working on open-source data visualization, and to grow from the experience. I thoroughly enjoyed interacted with my mentors, who have been very patient and helpful in offering me guidance (as well as friendship) throughout. If I have any advice I am allowed to offer anyone wanting to try out open-source software development through GSoC, and if GSoC does continue in the near future, I would recommend them to try out any of the OpenAstronomy projects. This is because OpenAstronomy is one (relatively) small but vibrant community of dedicated programmers, many of which scientists, that is welcoming to newcomers coming from a diverse background. And also, simply put, ASTRONOMY IS FUN! This is especially true for SunPy. I remember I started to contribute to open-source software as a relative novice with some bookish knowledge but not a lot of real-world experience back in around January 2019. My first contributions were to SunPy and Astropy. I remember I have read an article about how to get into GSoC in 2018 to learn about the program, though was not all that keen in getting into it at first. My first motivation to contribute was to give back to the community, because I had been using Python-based astronomy packages like Astropy for my PhD research. But at the urge of a mentor active in the Astropy community, I did apply. The GSoC project I worked on last year in 2019 was <a href="https://summerofcode.withgoogle.com/archive/2019/projects/6094580905148416/">IRISpy</a>, and my mentors were <strong>Dan Ryan</strong> and <strong>Laura Hayes</strong>. They were amazing as mentors, and were instrumental in my being able to complete the project successfully in the end of the program. I still miss my time spent with them on that project. IRISpy has officially changed its name to sunraster, which I was fortunate enough to help launch earlier this year in 2020. Basically when I was working on it as a GSoC project it was to provide additional functionalities for the analysis of observations from NASA’s Interface Region Imaging Spectrograph (IRIS) satellite which looks at UV emission from the solar chromosphere in particular. Now that scope has been extended to not just IRIS data, but data collected with similar instruments. This year I am using a lot of the code I have written for the IRISpy project for the current glue-solar project, which is kind of cool. As an icing to the cake, I get to work on data cubes for glue-solar, which is one of my favorite things in this world, a passion I have gained through my PhD research into integral field spectroscopy (IFS). For the present GSoC work I even get to work on <strong>4D data cubes (ones with an extra <em>time</em> dimension)</strong>, which has one more dimension than the IFS cubes I am so familiar with! So far it has been another incredible GSoC experience for me. All in all I have a feeling it will be a good one, and also a fruitful one.</p><h3>Part 2: Technical aspect of progress made in glue-solar</h3><p>So we (me and my mentors) have ventured away from focusing on glue-solar and have entered the glue “proper” territory as we put more time and effort towards modifying the 1D Profile viewer. By this I mean we have begun work on glue instead of glue-solar as was the case as described in <a href="https://medium.com/@krisastern/gsoc-2020-glue-solar-project-1-1-c2151e535e0c">my previous article</a> where we have built a “SunPy Map” viewer. So I am well on my way to complete the task “modifying the existing glue 1D Profile viewer to provide sliders for extra dimensions (currently collapses)” soon, which is a significant part of the glue-solar project. Personally, I am really looking forward to working on the “adding support for pre-computed statistics in datasets / viewers” task, which I will surely make time to complete before end of August.</p><p>Let me demonstrate how far we have come with the modification of the 1D Profile viewer. So ordinarily it is hard to get 4D data cubes with a time dimension. This can be fixed by stacking sequential (IRIS) raster scans/cubes. After firing up glue from the terminal by the magic command “glue”, and importing some if not all raster scans from the same observation using the IRIS OBS directory importer, and choosing to “Stack the sequential raster scans” , we see some data points appearing in the Data field of the GUI. This is illustrated by the sequence of images to follow:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5te3r5u7q5pxeWhiBv4x9Q.png" /><figcaption><strong>Figure 1.</strong> Loading an multi-scan IRIS Observation and choosing to stack the sequential raster scans / cubes.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DvJ0gwjAKMjdGefNeggEpA.png" /><figcaption><strong>Figure 2.</strong> Stacked datasets which are essentially 4D data cubes appear in the Data field of the glue-solar GUI.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c1fcKBkCGbcibrc2nfU93w.png" /><figcaption><strong>Figure 3.</strong> As per usual, choosing the 2D Viewer option will enable us to inspect the different sides of the N-dimensional or ND data cube.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A_dQDmastlGwmif17b7J2Q.png" /><figcaption><strong>Figure 4.</strong> Choosing the right (N-1) slices for the slicing to obtain the 1D profile (which I have learned in a hard way is not always the same as a 1D spectrum coding-wise) using some pre-defined logic that warrants some explanation, though should be intuitive to some.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qq70FXHsyObzBniXG35BOQ.png" /><figcaption><strong>Figure 5.</strong> Using the 1D Profile tool, as opposed to the red 1D spectrum button in the 2D Image viewer, to generate the desired profile, which may or may not be a 1D spectrum.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FuXVHmy-MOFS-ELa6gFSUw.png" /><figcaption><strong>Figure 6.</strong> Plotting of the uncollapsed version of the 1D profile by choosing the newly added “Slice” function which does nothing statistical to the data like the other functions such as “Maximum”, “Median”, and “Sum” that can be chosen as alternatives. (The default is “Maximum”).</figcaption></figure><p>As we can see in Figure 6, all 4 dimensions are represented in the 1D Profile viewer either as the x-axis or as a slider quantity. In this example, the x-axis is indeed wavelength (which yields a 1D spectrum by definition), the other dimensions are time, longitude (HPLN), and latitude (HPLT). Even though for now the sliders are still not yet functional and will need some tender loving care to make them work in tandem with the reference data as inherited or passed from the 2D Image viewer, which may take a few more days to complete, I believe this is truly a milestone in this GSoC project. If we can control the sliders to change the coordinate values, that would be a very useful tool in data exploration. I will spare the perhaps rather dry details regarding the reasoning through the whole thinking process that leads to this check point. However, I would like to explain the logic used in the slicing. What I have done is to introduced a SlicedData class, much like the existing IndexedData class that is used for pixel extraction with a tool my mentor <strong>Stuart Mumford</strong> originally wrote for glue-solar (currently in a draft PR to be upstreamed to glue). First to pick a spatial coordinate, we choose in the 2D Image viewer the spatial axes for the image axes, selecting a point in the image shown on screen with the pixel selection tool, and then tweak the slider we would like its corresponding axis to be used as the x-axis in the 1D Profile viewer. Then we drag the same dataset to the viewing area and view using the 1D Profile viewer, in order to generate a profile for the slicing we have chosen. So this has been the work completed thus far. What is yet to be completed is to enable the manipulating of the 4D or higher dimensional data cube using the sliders for the same x-axis. So in the end regardless of the starting point, we could potentially use the 1D profile viewer to inspect the 4D or ND data cube in ways previously impossible before, at least to me.</p><p>Again, I would like to thank my mentors for their guidance and support which enabled the progress I have made to happen. Much work will need to be done in order for the PRs to be polished up and merged later on in the summer. I really enjoy my glue-solar work for GSoC this summer. I hope you enjoyed reading this article as much as I had fun writing it too!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65ef40ba2b71" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSoC 2020: glue-solar project 1.1]]></title>
            <link>https://medium.com/@krisastern/gsoc-2020-glue-solar-project-1-1-c2151e535e0c?source=rss-33703681b362------2</link>
            <guid isPermaLink="false">https://medium.com/p/c2151e535e0c</guid>
            <category><![CDATA[solar-physics]]></category>
            <category><![CDATA[sunpy]]></category>
            <category><![CDATA[glue]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[gsoc]]></category>
            <dc:creator><![CDATA[Kris Stern]]></dc:creator>
            <pubDate>Sun, 14 Jun 2020 06:34:50 GMT</pubDate>
            <atom:updated>2020-06-14T06:34:50.709Z</atom:updated>
            <content:encoded><![CDATA[<p>The official coding period of GSoC 2020 has begun on June 2nd (HKT) and the glue-solar work is currently underway according to plan as discussed with mentors <strong>Stuart Mumford<em> </em></strong>and<strong><em> </em>Nabil Freij </strong>during the community bonding period that precedes the coding period. The tasks proposed that we would like to see implemented this summer include but not limited to the following:</p><p>1. Modify the existing glue 1D Profile viewer to provide sliders for extra dimensions (currently collapses)<br>2. Clean up UX / UI (icon) for the pixel extraction tool (perhaps also upstreaming from glue-solar to glue)<br>3. WCS info for derived datasets (i.e. raster + SJI time linking)<br>4. Loaders for specific instruments: NDData (in glue), NDCube (for NDCube 2.0 with extra coords), SST, IRIS, EIS, DKIST (e.g. with asdf to glue) <br>5. Add auto-linking to match wavelength and time dimensions in larger cubes (currently already works for Celestial dimensions)<br>6. Enable image / Movie exports, both with axes and without axes via the matplotlib package<br>7. Add support for pre-computed statistics in datasets / viewers</p><p>The above, along with the accompanying documentation, are expected to be part of the deliverables of the GSoC project. So far a couple of pull requests (PRs) have been submitted to both the glue and glue-solar repositories (repos), with the most recent one being the one for updating the 1D Profile viewer to plot with wcsaxes instead, which can be accessed at glue-viz/glue&#39;s <a href="https://github.com/glue-viz/glue/pull/2156">PR #2156</a>. However, the CI problem encountered in this PR seems to be able to be fixed by upstreaming the pixel extraction tool which currently only resides in glue-solar. This will need to be discussed with my mentors as careful considerations such as one pertaining to timing are warranted.</p><p>One of the first glue-solar PRs I have worked on are for adding an “open with SunPy Map” option to the “Import Data” tool. Part of this tool has been merged into glue-solar, while the other part is pending merge in glue. Basically if I load in an AIA map with its associated HMI map, like the sample one from SunPy, while choosing “SunPy Map” as opposed to the FITS format that gets detected by default, as shown in the Fig. 1:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f1TZWTVe_Z7YqSwvPEGHXg.png" /><figcaption>Fig. 1. Choosing “SunPy Map” to visualize SunPy maps with Glue.</figcaption></figure><p>So if one plots the SunPy maps individually, one would get the what is shown in Fig. 2. This is basically the same as what one would get with FITS files as well, except for the colormaps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-xqO_mMCzSNAAZAr6ipeJA.png" /><figcaption>Fig. 2. Plotting “SunPy Map” objects individually</figcaption></figure><p>The magic of our work is that now with the glue-solar plugin, we can overplot AIA map and its associated HMI map, as simply as dragging the HMI data from the Data section onto the AIA map 2D image already opened with the 2D Image viewer, as these are spatially linked by the plugin using some pixel-to-pixel transformation via WCS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q0SWRNVOImWlLmpQ2k6_hQ.png" /><figcaption>Fig. 3. Overplotting HMI data with AIA data with colormaps</figcaption></figure><p>So the subject of attention that has been the focus of my glue-solar work, or my favorite “toy”, over the last few weeks has been firstly a prototype for a “SunPy 1D Profile” tool which plots a 1D spectrum at a spatial position as picked out by the pixel extraction tool currently resides within glue-solar. To upstream the changes I have made to glue, and with the help of my mentors especially Stuart, we have started work on a PR to move such changes to the “1D Profile” in glue proper, using my “SunPy 1D Profile” work as a check and basis. If one loads in a raster cube using some IRIS level 2 data using the IRIS Spectrograph file type enabled by glue-solar, plots a slice of the data cube with the “2D Image” viewer, and then extracts a pixel position in the 2D image in the viewer (with the “HPLN” as the x-axis in lieu of the “wavelength” as the default option), one obtains a 1D profile upon hitting the spectrum icon in the 2D Image viewer panel. The result is as depicted in the collapsing “Fig. 4” image below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WZdvkWlnqECjS66SIM9zbQ.png" /><figcaption>Fig. 4. Plotting a 1D spectrum with wavelength as the x-axis and “Maximum” as the default function option.</figcaption></figure><p>After which if one changes the “function” in the “Plot Options — 1D Profile” from the “maximum” to the newly added “slice” option in my PR, one would obtain a 1D spectrum without any collapsing as shown in the “Fig. 5” image below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8ha0cEHSzxaY1zX-iSgMLw.png" /><figcaption>Fig. 5. Visualizing a 1D spectrum at a pixel coordinate position after switching to the `Slice` function option that is non-collapsing.</figcaption></figure><p>This non-collapsing 1D spectrum plotting facility is new to glue with the glue-solar plugin, and is currently still under heavy development.</p><p>Overall it has been a great experience this second time around participating in GSoC at this early phase. The experience is especially positive given that I am engaged in some work that I could understand and really like. Previously I have been exposed to data cubes in my PhD studies in astrophysics, with the knowledge gained now comes in handy for my glue and glue-solar work. I look forward to contributing as much as possible to the project in the months to come during GSoC, and possibly beyond.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c2151e535e0c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSoC 2020: glue-solar project 0.1]]></title>
            <link>https://medium.com/@krisastern/gsoc-2020-glue-solar-project-0-1-aae452de5e9?source=rss-33703681b362------2</link>
            <guid isPermaLink="false">https://medium.com/p/aae452de5e9</guid>
            <category><![CDATA[glue]]></category>
            <category><![CDATA[solar-physics]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[sunpy]]></category>
            <dc:creator><![CDATA[Kris Stern]]></dc:creator>
            <pubDate>Sun, 17 May 2020 02:28:15 GMT</pubDate>
            <atom:updated>2020-05-17T02:28:15.663Z</atom:updated>
            <content:encoded><![CDATA[<p>I feel grateful for having been selected for the second time in a row to participate in <strong>GSoC</strong> with the <strong>OpenAstronomy</strong> organization with <strong>SunPy</strong> as the sub-organization. My mentors this year are <strong><em>Thomas Robitaille, Stuart Mumford, and Nabil Freij</em></strong>, whom I have come to know within the astrophysics community over the past year or so and have come to respect. I am definitely looking forward to having a summer of serious fun with glue (or glueviz) in order to develop a plugin called glue-solar for use in solar physics data visualization. But to start I simply cannot resist delving more deeply into the glue-solar project. First off, here is a <a href="https://summerofcode.withgoogle.com/projects/#5824429948403712">link</a> to my project description over at GSoC’s official website.</p><p>To introduce the glue-solar plugin, it is only natural to first introduce the glue package for which it operates on. As its official <a href="http://glueviz.org/">website</a> would suggest, glue is a package for multi-dimensional linked-data exploration. With glue, users can generate scatter plots, histograms, and both 2D and 3D images of their own data. The package emphasizes on the brushing and linking paradigm, where selections in any graph can propagate to all others. Moreover, glue uses the existing logical links between different data sets to overlay visualizations of different datasets, and to propagate the same selections across all other data sets. To clarify, these can be spatial and temporal links. These links are specified by the user, and are designed to be arbitrarily flexible. Finally, glue is written in Python, and built on top of its standard scientific libraries (e.g., Numpy, Matplotlib, Scipy), such that users can easily integrate their own python code for data input, cleaning, and analysis, enabling full scripting capability.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FqO3RQiRjWA4%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DqO3RQiRjWA4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FqO3RQiRjWA4%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c5d030f496449b3a2e665643fa02682e/href">https://medium.com/media/c5d030f496449b3a2e665643fa02682e/href</a></iframe><p>Back to the glue-solar project, it is to provide a foundation for interactively exploring and quickly analyzing large datasets (100Gb or larger) in solar physics to be built in Python. This software will enable multi-instrument interactive visualisation as a <strong>plugin</strong> of glue. While a fully featured GUI toolkit for solar data is not expected to be built in one summer due to time constraint, the goal is to provide the technical building blocks, but more importantly to demonstrate, and document, how this framework can be used by various instrument teams to build custom solutions for their solar data. Glue-solar, like glue is completely free for anyone to use and is open-source. Furthermore, glue-solar is a collaboration between glue and SunPy, hence its focus on solar physics.</p><p>The official start date of this year’s GSoC is June 2nd, 2020, immediately after the current community bonding period. But work has already begun and we have already opened pull requests (or PRs) at both the glue and glue-solar repos to enable loading of basic SunPy maps such as AIA and HMI data so that they can be overplotted as different colormaps. As per usual, GSoC will last for about three months, until August 25th, 2020. This summer is surely going to be filled with many fun hours of coding for both glue and glue-solar for me. I am definitely looking forward to enjoying working on my last GSoC project this year, with my amazing mentors’ guidance.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aae452de5e9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Installing IRAF/PyRAF on Mac with Linux VM]]></title>
            <link>https://medium.com/@krisastern/installing-iraf-pyraf-on-mac-with-linux-vm-767fb99ec757?source=rss-33703681b362------2</link>
            <guid isPermaLink="false">https://medium.com/p/767fb99ec757</guid>
            <category><![CDATA[legacy-package]]></category>
            <category><![CDATA[linux-vm]]></category>
            <category><![CDATA[pyraf]]></category>
            <category><![CDATA[astrophysics]]></category>
            <category><![CDATA[iraf]]></category>
            <dc:creator><![CDATA[Kris Stern]]></dc:creator>
            <pubDate>Thu, 16 Jan 2020 09:47:02 GMT</pubDate>
            <atom:updated>2020-01-16T09:47:02.714Z</atom:updated>
            <content:encoded><![CDATA[<p>The <strong><em>official institutional support for IRAF/PyRAF from STScI is finally over</em></strong> (for more see <a href="http://www.stsci.edu/contents/newsletters/2018-volume-35-issue-03/removing-the-institutes-dependence-on-iraf-you-can-do-it-too">http://www.stsci.edu/contents/newsletters/2018-volume-35-issue-03/removing-the-institutes-dependence-on-iraf-you-can-do-it-too</a>). While emerging successors to the legacy software exist such as Astropy (<a href="https://www.astropy.org/">https://www.astropy.org/</a>), no replacing software is fully mature enough to offer similar functionalities as IRAF/PyRAF does. In this transitional period, while stumbling on the obstacle of Apple’s macOS Catalina version 10.15 no longer supporting IRAF’s 32-bit binary package (for more info see Gemini Announcements dated October 11th, 2019 at <a href="http://www.gemini.edu/announcements">http://www.gemini.edu/announcements</a> *), I inquired about possible solutions on Astropy’s Slack channel, and someone with more experience in the field of astronomy suggested setting up a Linux virtual machine (or VM for short) with which to install the still functional IRAF version 2.7. So if you are in astrophysics and work with a Mac computer and have run into the same issues as outlined above such as the broken pipe error stemming from bad CPU type in executable, the following is a recipe is what worked for me to still use IRAF/PyRAF, as least for the time being…</p><p>Side Notes* — Gemini announcements verbatim as as released on October 11th, 2019 are as follows:</p><ul><li>As of this week’s v10.15 release, MacOS is no longer capable of running the 32-bit Astroconda IRAF distribution needed by Gemini IRAF. For the time being, Gemini IRAF users on Apple machines are advised to continue using MacOS 10.14 or earlier, or to install Astroconda in a virtual machine with a compatible OS. Gemini will look into providing a ready-made VM image to help with this while we are migrating our data reduction tools to Python.</li><li>Furthermore, MacOS 10.14.6 suffers from a bug that can cause a desktop session logout when attempting to display plots or images with PyRAF, DS9, Matplotlib or other software that uses Tk. We suggest that PyRAF users on 10.14 avoid updating their OS until such time as this problem is resolved by Apple and/or we can determine a reliable workaround (check here for further announcements). IRAF CL is unaffected, but note that we are no longer testing it routinely and are aware of occasional failures with Gemini IRAF.</li></ul><h3>Steps</h3><ol><li>First is to <strong>install VirtualBox</strong> on your Mac, for me I downloaded VirtualBox version 6.1 (released on January 14th, 2020) first. In here I assume the setup is quite simple as the instructions given after the user has opened the installer by double clicking on its icon is quite straightforward, so I will not dwell too much on it in here.</li><li>Then next thing to do is to <strong>run VirtualBox</strong> on your Mac. If all goes well a GUI should pop up with the welcoming message “Welcome to VirtualBox!…”. If that’s the case we will leave things as is with VirtualBox for now.</li><li>Then download the current <strong>LTS version of Ubuntu</strong> (my go-to Linux distribution) on your local machine. At the time of writing of this article the LTS version is 18.04. Say for example the link for the download is <a href="https://ubuntu.com/download/desktop">https://ubuntu.com/download/desktop</a>). The disk file downloaded is then one in the .iso format.</li><li>Next we go back to our VirtualBox GUI, we start a new VM by creating a “New” machine. You will then be prompted to give the VM a name at this stage. For me I have used “<strong>ubuntu-18.04</strong>” (not typing in the quotes in the name field) as the name for the new instance. But feel free to use anything you deem appropriate like “iraf-pyraf-vm” or “my-awesome-vm”. Then choose the default folder (i.e. leaving the folder field as is), the type “Linux”, and the version <strong>Ubuntu 64-bit</strong>. For the memory size just to be sure I have set it to be <strong>4096 MB</strong>, also since I can afford to given my host machine setup. Next set the <strong><em>Hard Disk</em></strong> option to <strong>Create a virtual hard disk now</strong>. Finally press “Create” button on the lower right corner to finish the VM creation process.</li><li>We leave the <strong><em>File Location</em></strong> as the default. Next we have choose for the <strong><em>File Size</em></strong> to be at least 10.00 GB for the Ubuntu disk file to enough space to function properly. And in my case to make sure things would work I have in face set this to be <strong>100.00 GB</strong>, since I have tried 10.00 GB but it didn’t work for a basic installation of IRAF/PyRAF the first time I tried. Then choose for <strong><em>Hard disk file type</em></strong> the option <strong>VDI</strong>, which is short for “VirtualBox Disk Image”. And, set <strong><em>Storage on physical hard disk</em></strong> to the option <strong>Dynamically allocated</strong>.</li><li>Next we will need to <strong>install the Ubuntu image</strong>. First we choose to start the VM instance in the “<strong><em>Normal Start</em></strong>” mode. Then, we choose from the dropdown menu the Ubuntu disk image in .iso format we have downloaded from Ubuntu in Step 3. If everything goes as expected, Ubuntu will then start. However, at this point at least, the display of the image might be too small and it is best to be adjusted by setting the <strong><em>Virtual Screen 1</em></strong><em> to</em><strong><em> </em></strong>“<strong>Scale to 200% (autoscaled output)</strong>” which is located at the 5th icon in the bottom right buttons panel<strong>,</strong> at least for the time being.</li><li>Next we are ready to <strong>install Ubuntu</strong> onto the VM by clicking “<strong><em>Install Ubuntu</em></strong>” on the Install window where it says “Welcome” on the top left corner, instead of “<strong><em>Try Ubuntu</em></strong>”. Note you can also select a different language other than English here.</li><li>Next is <strong>keyboard layout settings</strong>. The defaults are set to “<strong><em>English (US)</em></strong>”. But you can certainly choose to have different settings if so desired. Then click “Continue”.</li><li>Now we are at “Updates and other software” window, for convenience we can go with the default settings of “<strong><em>Normal Installation”</em></strong> with “<strong><em>Download updates while installing Ubuntu</em></strong>”. Then click “Continue”.</li><li>After that, choose “<strong><em>Erase disk and install Ubuntu</em></strong><em>” for the </em><strong><em>installation type</em></strong>, and click the <strong><em>Install now button</em></strong> to confirm. When prompted to confirm whether you would like to “Write the changes to disks?”, simply choose “Continue”.</li><li>Then next is to choose the timezone in the “Where are You?” window. Your <strong>time zone</strong> will be detected automatically so it is recommended that the defaults be accepted by choosing “Continue”.</li><li>Lastly, it is time to enter our personal credentials to complete the setup. Enter on the “Who are you?” window you chosen <strong>name</strong>, <strong>computer name</strong>, <strong>username</strong>, as well as an adequately strong <strong>password</strong>. It is recommended to choose both names and computer names as all-one-words with no spaces in between. After this, you will be prompted to restart the VM. Accept this to reboot your machine.</li><li>Next is to both download and install Miniconda for your VM once it has been restarted. First go to your home directory, by doing something as simple as typing and entering cd at the command prompt. You can download Miniconda with the following command at the Terminal:</li></ol><pre>$ wget <a href="https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh">https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh</a></pre><p>14. After the download has been successfully completed, install it with the command:</p><pre>$ bash ./Miniconda3-latest-Linux-x86_64.sh</pre><p>15. Then we are to install all the necessary dependencies with the following command:</p><pre>$ sudo apt-get install libc6:i386 libz1:i386 libncurses5:i386 libbz2-1.0:i386 libuuid1:i386 libxcb1:i386 libxmu6:i386</pre><p>16. Next do the following to first add the astroconda channel, and then to create a new virtual conda environment named “iraf27”:</p><pre>$ conda config --add channels <a href="http://ssb.stsci.edu/astroconda">http://ssb.stsci.edu/astroconda</a><br>$ conda create -n iraf27 python=2.7 iraf-all pyraf-all stsci</pre><p>17. If after solving the environment you are prompted to answer whether to proceed with the installations, simply type y and then press enter. If everything goes as planned a confirmation message will be produced in the text output and you will be given some brief instructions as to how to activate and deactivate this particular environment (“iraf27” in our case). Following the instructions and then at the command prompt please enter the following to source the correct environment:</p><pre>$ conda activate iraf27</pre><p>18. Then we first make a directory called “iraf”, change directory to it, then initialize pyraf with the following commands in sequence:</p><pre>$ mkdir iraf<br>$ cd iraf<br>$ mkiraf</pre><p>19. When prompted for the terminal type please enter xterm.</p><p>20. Finally, if no error or omission has been made, in the iraf directory, simply enter the following to start pyraf :</p><pre>$ pyraf</pre><p>Then you are all set to go with a functional copy of the PyRAF software! It should be noted that you can configure VM further such as the display resolution, and the shared (with one’s local machine) transient folder to be used.</p><p>Happy exploring astrophysics!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=767fb99ec757" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSoC 2019: Project IRISpy 3.2 — Reaching the Goals]]></title>
            <link>https://medium.com/@krisastern/gsoc-2019-project-irispy-3-2-reaching-the-goals-1ad1988ff9b5?source=rss-33703681b362------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ad1988ff9b5</guid>
            <category><![CDATA[sunpy]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[irispy]]></category>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[solar-physics]]></category>
            <dc:creator><![CDATA[Kris Stern]]></dc:creator>
            <pubDate>Sun, 18 Aug 2019 12:17:52 GMT</pubDate>
            <atom:updated>2019-08-18T12:17:52.707Z</atom:updated>
            <content:encoded><![CDATA[<h3>GSoC 2019: Project IRISpy 3.2 — Reaching the Goals</h3><p>It is my pleasure to report that with my mentors’ assistance as well as my many hours of contributing to the sunpy/irispy GitHub repo, I have been able to reach all four goals original set out by the primary mentor Danny Ryan, which are as follows:</p><ul><li>The time-dependent instrument function response code must be rewritten to be more efficient and Python-friendly.</li><li>Formal benchmarking between the results it produces and those found using the original IDL code must be performed.</li><li>Tests for the Python version must be written.</li><li>This software must be incorporated into methods and functions in IRISpy that depend on the instrument response function.</li></ul><p>Accordingly, the three outcomes have been accomplished as below:</p><ul><li>A function for deriving the time-dependent IRIS response function.</li><li>Benchmarking and unit tests so this new software can be reliably maintained.</li><li>Updated intensity conversion methods between instrument and physical units that correct for the time observations were taken.</li></ul><p>For a product of this effort, please go to <a href="https://github.com/sunpy/irispy/pull/119">https://github.com/sunpy/irispy/pull/119</a> , which is to merge the four PR’s already merged into the time_dependent_response branch into the master branch in order to incorporate our work into IRISpy officially.</p><p>I would particularly like to take the time to thank every one in the SunPy community for their support of me over the past few months, in particular my project mentors Danny Ryan and Laura Hayes. They have been very helpful in answering my questions and in helping me solve some very thorny IDL questions. The time I spent on GSoC this year is the moments I will not forget!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ad1988ff9b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSoC 2019: Project IRISpy 3.1 — the Way Down]]></title>
            <link>https://medium.com/@krisastern/gsoc-2019-project-irispy-3-1-the-way-down-ea622f00aaa6?source=rss-33703681b362------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea622f00aaa6</guid>
            <category><![CDATA[solar-physics]]></category>
            <category><![CDATA[irispy]]></category>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[sunpy]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Kris Stern]]></dc:creator>
            <pubDate>Sun, 04 Aug 2019 13:24:48 GMT</pubDate>
            <atom:updated>2019-08-04T13:24:48.616Z</atom:updated>
            <content:encoded><![CDATA[<h3>GSoC 2019: Project IRISpy 3.1 — the Way Down</h3><p>Grateful to report that I have eventually solved the issues encountered as stated in blog post 2.2 in the series for my GSoC project… and most important of all with my mentors’ blessings I have successfully passed the 2nd coding phase. Moreover, I am delighted to report that my most significant contribution on GitHub thus far, which is the PR to enable time-dependent effective areas determination of IRISpy, has been merged about 6 days ago. More can be found about this PR at the link <a href="https://github.com/sunpy/irispy/pull/108">https://github.com/sunpy/irispy/pull/108</a>.</p><p>Currently I am continuing on my efforts to complete the project by updating the intensity methods between instrument and physical units, in another PR at <a href="https://github.com/sunpy/irispy/pull/117">https://github.com/sunpy/irispy/pull/117</a> . My goal is after finishing up this PR then move on to completing the testing by tidying up loose-ends left in PR #108 and add to it the required tests. The challenges remain is to determine the test cases used and the best way to keep the tests neat. I have already begun work on the testing front as well, though a former PR has not been opened for it yet.</p><p>All in all everything is looking good. I am looking forward to continue working under the supervision of my project mentors further before GSoC 2019 comes to a close in about 2 to 3 weeks’ time. Their expertise and patience have been amazing, and I am grateful for their mentorship.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea622f00aaa6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>