<?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 Jaladh Singhal on Medium]]></title>
        <description><![CDATA[Stories by Jaladh Singhal on Medium]]></description>
        <link>https://medium.com/@jaladh_singhal?source=rss-2ef12fc1936------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*FnxhA9OVO6bUM4pKOuhs3g.jpeg</url>
            <title>Stories by Jaladh Singhal on Medium</title>
            <link>https://medium.com/@jaladh_singhal?source=rss-2ef12fc1936------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 12:19:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jaladh_singhal/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’20 Episode-3: Reading between the [Spectral] Lines]]></title>
            <link>https://medium.com/@jaladh_singhal/gsoc20-episode-3-discerning-elements-from-spectral-lines-58ef616952bc?source=rss-2ef12fc1936------2</link>
            <guid isPermaLink="false">https://medium.com/p/58ef616952bc</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[astronomy]]></category>
            <category><![CDATA[gsoc-2020]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[gsoc]]></category>
            <dc:creator><![CDATA[Jaladh Singhal]]></dc:creator>
            <pubDate>Fri, 11 Sep 2020 18:29:11 GMT</pubDate>
            <atom:updated>2020-09-12T22:09:26.285Z</atom:updated>
            <content:encoded><![CDATA[<h4>The final part of a three-month series about my GSoC’20 Project</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xiQks8NcwWpET89JDG8Hew.jpeg" /><figcaption>A very long spectrum of Sun, chopped in small chunks and then displayed one on top of another [Credit: <a href="https://www.eso.org/public/images/sunspectrum-noao/">NOAO/AURA/NSF</a>]</figcaption></figure><h3>On the Previous Episode</h3><p>In my last article in this series, I told you that I was developing a prototype for Line Info Widget as a part of my three-month GSoC project at TARDIS (i.e. to develop a GUI as Jupyter widgets for making the exploration of Supernova models easier). The Line Info Widget gives Astrophysicists information about the atomic lines with which light packets interact before escaping Supernova.</p><p>I also explained to you how amazingly TARDIS constructs a spectrum from the information contained in hundred-thousands of light packets coming out of a simulated Supernova. If you haven’t read my last article, you might like to go through it to understand all of this super cool stuff in a simpler way!</p><p><a href="https://medium.com/@jaladh_singhal/gsoc20-episode-2-unpacking-the-data-hidden-in-light-91cd7159b443">GSoC’20 Episode-2: Unpacking the Data hidden in Light</a></p><p>To further show how different interactions of light packets contribute to the luminosity in the model spectrum (wavelength vs luminosity plot), I started working on restructuring the legacy Kromer plot interface of TARDIS. But it needed a lot of improvements in its plot generation method. Thus keeping the GSoC deadline in mind, we have to put it on hold until I finish &amp; release the Line Info Widget with a simple spectrum plot. In this article, I will not only show how the finished line info widget looks like but also how I understood the underlying Astrophysics better by data exploration!</p><h3>Refining Line Info Widget and my Understanding of it!</h3><p>So last month, I converted Line Info Widget from a prototype to a fully-functional widget with a couple of additional features. Now it can be generated by a simple function call for any simulation model within Jupyter Notebooks, using the object-oriented interface I <a href="https://github.com/tardis-sn/tardis/pull/1264">wrote</a> for it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*Lg-qCY6uiPIVO97jCov-SQ.png" /><figcaption>Line Info Widget after refinement — now users can also control how to filter packets in the selected wavelength range and how to group packet counts for each line interaction.</figcaption></figure><h4>What’s the Line: How exactly Line Info Widget works?</h4><p>As I explained in the <a href="https://medium.com/@jaladh_singhal/gsoc20-episode-1-interactions-with-supernovae-f2e033beb5fc#5d13">first article</a> in this series,</p><blockquote>The elements present in a Supernova ejecta (or the guts of an exploded star!) imprint their characteristic features on the light spectrum obtained from it, due to <a href="https://www.khanacademy.org/science/ap-chemistry/electronic-structure-of-atoms-ap/bohr-model-hydrogen-ap/a/spectroscopy-interaction-of-light-and-matter">light-matter interactions</a>. While modelling a Supernova, TARDIS simulates each of these random interactions between light packets (photons) and atomic lines (possible transitions of electrons between excitation levels of an atom).</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/0*1z3epF49X7cN2mFF.jpg" /><figcaption>Different chemical elements present in the Supernova leave their mark on the spectra by imprinting characteristic features (regions highlighted in color) [Source: <a href="https://tardis-sn.github.io/gsoc/category/ideas-page.html">TARDIS Ideas Page</a>]</figcaption></figure><p>This is what Line Info Widget is made for — it allows Astrophysicists to explore the atomic lines responsible for producing features in the simulated spectrum. By selecting a wavelength range on the spectrum plot, you can see the species that produced the features within that range. This is determined by counting the number of escaping packets that experienced their last interaction with each species. Packets can be filtered by the wavelength at which they were absorbed or emitted, using the toggle buttons.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*B26QwKf1ek7J2w_-VgrX0Q.gif" /><figcaption>Demonstration of the working of Line Info Widget</figcaption></figure><p>You can then click on a species to see the packets count for each last line interaction it experienced. Using the dropdown menu, these counts can be grouped by excitation lines, de-excitation lines, or both.</p><h4>Moving Ejecta: Doppler shift of Light</h4><p>The fun part about science is you learn things from exploration better than reading or hearing them from someone. While developing this widget, my mentors explained to me a couple of times that the spectrum we have is made from the observed wavelengths of the packets in a moving frame instead of that in the rest frame. This means that absorption/emission wavelengths of packets don’t necessarily match with that of an atomic line they interacted with, due to the Doppler shifts because the Supernova ejecta is continuously moving outward with thousands of km/s. For example, a packet with an observed wavelength of roughly 5000 Angstrom gets absorbed in the excitation of Si II from the 15th to 22nd level, which otherwise happens at 5057 Angstrom in rest wavelength.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fh4OnBYrbCjY%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dh4OnBYrbCjY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fh4OnBYrbCjY%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/16c3a2ccaba30d4cb6726c388f2a173a/href">https://medium.com/media/16c3a2ccaba30d4cb6726c388f2a173a/href</a></iframe><p>When a spectrum is constructed by histogramming the observed wavelengths of packets (as I explained in my <a href="https://medium.com/@jaladh_singhal/gsoc20-episode-2-unpacking-the-data-hidden-in-light-91cd7159b443">last article</a>), this Doppler shift due to moving ejecta is evident as the shifted features. A feature in the spectrum for a particular interaction is no longer at the wavelength where it happens in the rest frame (i.e. the rest wavelength) but gets shifted by some wavelengths, i.e. it shows up at the observed wavelength which produced it in the moving frame.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*Wl_PLOhkB8u2AyAxbiEUdA.jpeg" /><figcaption>Note that this is kinda 1-D spectrum because it is roughly the same as what we have in Line Info Widget (above) except that it doesn’t have a luminosity axis (y-axis dimension). But it clearly shows how features (black lines) shift along the wavelength axis due to the Doppler Effect. [Source: <a href="https://www.atnf.csiro.au/outreach/education/senior/astrophysics/spectra_info.html">ATNF CSIRO</a>]</figcaption></figure><p>Even after understanding this phenomenon, I was still unable to grasp <strong><em>how it connects with the Line Info Widget</em></strong> I was developing. So one day while writing documentation, I was playing around with the widget to see how different selections change data in tables. And I finally observed it when I found that not all absorption lines’ wavelengths fall in the selected wavelength range of packets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*n71U-EppfecLPDyI1JIFMA.png" /><figcaption>Wavelengths of Si II excitation lines in 3700–3800 Angstrom selection, lie outside this range</figcaption></figure><p>As you can see that by selecting the 3700–3800 Angstrom wavelength range and filtering packets present in it by their absorption wavelengths, the absorption wavelengths for Si II are still greater than 3800 (i.e. outside the selected range) which wouldn’t have happened if interaction happened in the rest frame. This clearly shows that due to the moving ejecta, the packets with their observed wavelengths within 3700–3800 interacted with Si II atomic lines having higher absorption wavelengths (in 3850–3860). Therefore, the <em>imprinted feature (dip in selected wavelength range) is </em><strong><em>blue-shifted</em></strong><em> (moved toward lower wavelengths) in the observed spectrum because effectively an explosion moves matter in ejecta towards us!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/0*-IA1GphvtpQtd9hR.gif" /><figcaption>Source: <a href="https://in.pinterest.com/pin/267682771574693906/">Pinterest</a></figcaption></figure><p>This observation and followed inference was an Aha moment for me — I was like, “Oh yes! now I see what my mentors were talking about, in the context of Line Info Widget”. Like me, if you’re wondering if this blueshift is larger than the redshift of universal expansion that it neutralized it, then that’s not true! One of my mentors (Mark Magee) told me that when Astrophysicists talk about the blue-shifted features, it’s always relative to the rest wavelength i.e. they’ve already ignored the redshift of the host galaxy of Supernova.</p><h4>How all of this fits in: Matching Theoretical and Observed spectra</h4><p>When studying a Supernova observed in the sky, Astrophysicists use computer simulations for drawing conclusions about its properties and ultimately the explosion mechanism &amp; progenitor stars. First, they make some educated guesses about its properties like Supernova brightness and the abundances of the different chemical elements present in the ejecta. Then they use numerical code like TARDIS and pass these properties as input parameters to run the simulation for calculating the theoretical spectrum (which is being shown in Line Info Widget above).</p><p>The main goal of doing so is to reproduce the observed spectrum of the target Supernova by tuning input parameters of the simulation. Hence by finding a close match between theoretical and observed spectra, Astrophysicists identify the parameters that actually describe the Supernova. The Line Info Widget I’ve developed will allow them to interactively discern the chemical species and line interactions responsible for different features in the spectrum, thereby making this matching process easier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*QNONr--ckmzKdQIF4NWldg.png" /><figcaption>Observed spectrum of the Supernova 2011ay after 7 days of explosion (red) and theoretical spectrum from the fit of the velocity-dependent TARDIS model (blue). [Source: Figure 2 in <a href="https://arxiv.org/abs/1707.07848">Barna et al. 2017</a>]</figcaption></figure><h3>Final touches: Wrapping up my work</h3><h4>Tests and Documentation</h4><p>The essential step to make code maintainable is to write tests for it. Considering the complexity of Line Info Widget, writing unit tests for it was a daunting task for me. But by using some great suggestions of TARDIS members and by trying multiple ways to use PyTest, I finally managed to test the functionality of Line Info Widget for several interactions, along with all the edge cases I can think of.</p><p>For showcasing the widgets I developed, I created a section titled <strong>TARDIS widgets</strong> in the docs. Writing documentation also played an important role in improving my understanding of the underlying physics of the widgets because not only I got to verbalize it but also because my mentors pointed out what I was getting wrong in the <a href="https://github.com/tardis-sn/tardis/pull/1280">PR</a> review. <a href="https://tardis-sn.github.io/tardis/running/tardis_widgets">TARDIS widgets</a> (yet to be published) consists of two pages — one describing how to use each widget and its additional functionalities, and the other is a notebook demonstrating how to generate each widget using the <a href="https://github.com/tardis-sn/tardis/tree/master/tardis/widgets">widgets subpackage</a> I developed. By downloading this demo notebook, anyone (even you!) can quickly try out the new TARDIS widgets!</p><h4>Final Report of GSoC’20</h4><p>By the end of GSoC, student developers are required to submit a final report summarizing all the work they did during Summer so that it’s easy to access all the code from one place which can also act as a reference for the current state of their project. So I put together a brief summary of my work along with the links to all of my PRs as a web page. Since I was working with front-end web technologies, I wanted to try out publishing my report as a web page. I picked a nice template from <a href="http://html5up.net/">HTML5UP</a> and tweaked it as per my needs to finally create a nice-looking report that I’m kinda proud of! You should check it out to get a quick overview of all the work I did in the last three months:</p><p><a href="https://jaladh-singhal.github.io/gsoc20/">GSoC 2020 with TARDIS - Jaladh Singhal</a></p><h3>Post-credits: What’s ahead?</h3><p>This has been an incredible Summer since I got to learn a lot about Astrophysics Research along with software development. Besides, I am fortunate to work with a group of such amazing and talented people, who are helping each other and TARDIS to grow! Yesterday, GSoC’20 results were declared and I passed the final evaluation with very encouraging feedback from my mentors!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*fOpOHjpasFn2B7D-o1Chvg.png" /><figcaption>Final evaluation of my GSoC’20 project</figcaption></figure><p>Now, since the Line Info Widget is complete and ready to be merged, I’ve started working on fixing the Kromer Plot so that it can be integrated within the widget. Besides me and my mentors have several ideas to harness the power of GUI and interactive visualizations to make Supernova exploration easier. So there’s lots of interesting work to do, stay tuned by following us on <a href="http://twitter.com/tardis_sn">Twitter</a>!</p><p>Thanks for reading all the way to the end. I would love to hear your comments/suggestions, please feel free to comment below or contact me on <a href="http://linkedin.com/in/jaladh-singhal">LinkedIn</a>. Besides, if you find TARDIS cool, we always welcome new contributors to our open source project — get in touch with us.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58ef616952bc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSoC’20 Episode-2: Unpacking the Data hidden in Light]]></title>
            <link>https://medium.com/@jaladh_singhal/gsoc20-episode-2-unpacking-the-data-hidden-in-light-91cd7159b443?source=rss-2ef12fc1936------2</link>
            <guid isPermaLink="false">https://medium.com/p/91cd7159b443</guid>
            <category><![CDATA[gsoc-2020]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[astronomy]]></category>
            <category><![CDATA[gsoc]]></category>
            <dc:creator><![CDATA[Jaladh Singhal]]></dc:creator>
            <pubDate>Mon, 10 Aug 2020 18:29:17 GMT</pubDate>
            <atom:updated>2020-09-12T15:47:53.421Z</atom:updated>
            <content:encoded><![CDATA[<h4>2nd part of a three-month series about my GSoC’20 Project</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UW0Y-d2uE6Ja-W2M.jpg" /><figcaption>Photo by <a href="https://unsplash.com/@mischievous_penguins?utm_source=medium&amp;utm_medium=referral">Casey Horner</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>On the Previous Episode</h3><p>In my last article in this series, you learned about <a href="http://github.com/tardis-sn">TARDIS</a> — the org I’m working with, which allows Astrophysics researchers to simulate Supernova models. I told you that my project is to create a new enhanced GUI for exploring supernova models within Jupyter Notebooks using ipywidgets and interactive plotting libraries. I developed a Shell Info widget which gives information about the chemical composition of different shells in Supernova ejecta. Since it has been merged, you can access it using <a href="https://tardis-sn.github.io/tardis/running/jupyter-widgets.html">this notebook</a> in our docs. If you haven’t yet read my last article and are curious to know more, go check it out:</p><p><a href="https://medium.com/@jaladh_singhal/gsoc20-episode-1-interactions-with-supernovae-f2e033beb5fc">GSoC’20 Episode-1: Interactions with Supernovae!</a></p><p>Besides, I also developed a prototype for Line Info Widget which gives information about the atomic lines with which light packets interact before escaping Supernova (known as last line interactions). If you’ve been following through this series, you might be wondering about what are the next cool things I’ve added in the Line Info widget, so let me share what I did last month.</p><h3>The Story of Spectra</h3><h4>Adding more colors (info) to Line Info widget: Kromer Plot</h4><p>The prototype of Line Info widget I developed in June shows a simple spectrum (plot of wavelength vs luminosity) of a simulated Supernova model. As I shared in the last article, it looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/0*9yknXfHCy9N7t082.gif" /><figcaption>The prototype of Line Info widget (Don’t judge me for the poor layout of tables, it’s not finished yet!)</figcaption></figure><p>But what if we can also show the chemical elements which form this spectrum while making it look beautiful at the same time due to adding multiple colors! 😜 This is where the Kromer¹ Plot comes in picture!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DFupT4xRGE0o5Tq6.png" /><figcaption><a href="https://github.com/tardis-sn/tardisanalysis">Kromer Plot</a> made for the TARDIS simulation model</figcaption></figure><p>If you look closely, the spectra in these two plots are roughly the same² — compare the spectrum in the first plot with the virtual spectrum of Kromer plot. It’s just that Kromer plot is additionally showing information about how different interactions of light packets contribute to luminosity as stacked area charts. It’s quite complex to understand what these different colors mean at first, but my mentors helped me to understand this concept by making the following illustration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fpP1BHQxkFHAaY9FxbvQCw.png" /><figcaption>An illustration of light packets interactions within Supernova (a self-created version of what my mentor Wolfgang illustrated)</figcaption></figure><p>In the TARDIS simulation model, a hundred-thousands of such light packets are emitted out of Supernova and each one of them has data about energy (luminosity), frequency (wavelength), and interaction type which is then aggregated to form a spectrum. In the Kromer plot, the black region denotes packets coming directly out of the photosphere, grey denotes packets scattered by electron and other colors denote packets that interacted with different elements (line interactions).</p><h4>Restructuring the current Kromer Plot Interface</h4><p>TARDIS already has an interface to generate Kromer Plot — a class called <a href="https://github.com/tardis-sn/tardisanalysis/blob/master/tardis_kromer_plot.py#L34">tardis_kromer_plotter</a> which lives at <a href="https://github.com/tardis-sn/tardisanalysis">tardisanalysis</a> repository. But it depends on an intermediary object called <a href="https://github.com/tardis-sn/tardisanalysis/blob/master/tardis_minimal_model.py#L185">minimal_model</a> to create the Kromer plot and a Kromer plotter object can contain data of either only real or virtual packets. Thus before integrating Kromer plot with the Line Info widget (which we intend to do by moving it to <a href="https://github.com/tardis-sn/tardis/tree/master/tardis/widgets">widgets subpackage</a> I’m developing within tardis package), I needed to restructure this old interface of Kromer plot:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*zTBZm7XOAzFhbkY2IqHhhQ.png" /><figcaption>A schematic of data flow for restructuring Kromer plot interface in TARDIS (Note that this is neither a proper class diagram or data flow diagram, it’s just a rough illustration I made to solve the problem)</figcaption></figure><p>After getting the consent of my mentors on this approach of restructuring, I wrote a new interface from Kromer Plot (<a href="https://github.com/tardis-sn/tardis/pull/1241">PR#1241</a>) and was successfully able to generate the Kromer plot directly from the TARDIS simulation model (If you’re wondering what about HDF in this figure, I’ll talk about it in the next section). Moving to the next thing, I needed to re-implement <a href="https://github.com/tardis-sn/tardisanalysis/blob/master/tardis_kromer_plot.py#L350">generate_plot</a> method of Kromer plotter to produce an interactive plot (using Plotly) since it produces matplotlib plot which can’t be integrated with widget — finally, the work I like to do. But like anything<em>, there’re always surprises!</em></p><h4>Back to square one: How is a spectrum created?</h4><p>As I started exploring the code of generate_plot method, I faced a lot of difficulties in understanding how data is being transformed to produce the Kromer Plot. It was not only because matplotlib codes tend to be ugly but more because I wasn’t able to understand the computational physics of producing a spectrum.</p><p>After discussing with my mentors, we concluded that the current matplotlib code is indeed unnecessarily complex and outdated which needs to be simplified. Thanks to Marc (one of the GSoC’20 mentors) who started improving matplotlib implementation of Kromer Plot, which is essential before I can start building an interactive (Plotly) version of it. And to make me understand the computation required to produce a spectrum, Wolfgang suggested to me that first I should try to produce the TARDIS spectrum from scratch before looking into the Kromer plot. And it indeed proved an excellent learning exercise!</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5f9bad746778176ca8f3661e3a85e188/href">https://medium.com/media/5f9bad746778176ca8f3661e3a85e188/href</a></iframe><p>I figured out that with only three data attributes of a model (output frequency of packets, output energy of packets, and time of simulation), its spectrum can be produced. You can obtain wavelengths from frequencies and luminosity from energies (by dividing with time) and other than that you also need to choose a wavelength range of the spectrum. Rest is simple statistics, you divide your wavelength range in a specific number of bins (say 1000) and then you find the weighted count of packet wavelengths (say 100,000) across all the bins — here weight is the luminosity of packets. Now you see, <strong>spectrum is a luminosity-weighted histogram of packets’ wavelengths!</strong> Though it looks like a line plot because on X-axis we plot left edge of bins instead of their range.</p><h3>Interfacing with saved models (HDF)</h3><p>Since research is not a one day work, TARDIS allows users to save simulation models on disk as <a href="https://en.wikipedia.org/wiki/Hierarchical_Data_Format">HDF files</a>. Therefore we need to make sure that a class that requires a simulation object for instantiation can also be instantiated with an HDF file. So I developed two classmethods in the new KromerPlotter class I’ve been <a href="https://github.com/tardis-sn/tardis/pull/1241">developing</a>, to instantiate from both HDF file and simulation object.</p><p>But again it was not straightforward. I found that not all properties that we require in KromerPlotter are being saved by HDF writer so I made sure to save them. Besides this, the mechanism which saves virtual packet properties to HDF was also wrong, so I also <a href="https://github.com/tardis-sn/tardis/pull/1254">fixed this issue</a> before moving to the next thing.</p><h3>On the next episode</h3><p>Although we decided to add Kromer plot in Line Info widget because it gives more information than a simple spectrum. But since it needs time for fixing and as I’m running short on time (only 3 weeks left in completion of GSoC), we’ve decided to first roll out the widget with simple spectrum. Kromer Plot is an additional feature (not a priority) which we plan to integrate once this widget is accessible to users.</p><p>So in the coming weeks, I’ll finish the Line Info widget by adding a few remaining features (like filtering selection wavelength, sorting packet counts, etc.) and get it merged. And also I’ll push a better demonstration of widgets in TARDIS docs to show their true capability to researchers. Stay tuned!</p><p><strong><em>Update (Sep 11, 2020):</em></strong> 3rd episode (Season finale) is on air now! 🎉</p><p><a href="https://medium.com/@jaladh_singhal/gsoc20-episode-3-discerning-elements-from-spectral-lines-58ef616952bc">GSoC’20 Episode-3: Reading between the [Spectral] Lines</a></p><p>Thanks for reading all the way to the end. I would love to hear your comments/suggestions, please feel free to comment below or contact me on <a href="http://linkedin.com/in/jaladh-singhal">LinkedIn</a>. Besides, if you find TARDIS cool, we always welcome new contributors to our open source project — get in touch with us.</p><h4>Footnotes</h4><ol><li>This way of illustrating the spectral synthesis process was introduced in Kromer et al. “SN 2010lp — Type Ia Supernova from a Violent Merger of Two Carbon-Oxygen White Dwarfs” ApjL, 2013, 778, L18</li><li>Apparent differences are because the X-axis scale of both plots is quite different and because the former plot shows real spectrum (spectrum made from real packets) but the latter plot shows virtual spectrum (spectrum made from virtual packets which reduce noise, hence makes it smoother).</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91cd7159b443" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSoC’20 Episode-1: Interactions with Supernovae!]]></title>
            <link>https://medium.com/@jaladh_singhal/gsoc20-episode-1-interactions-with-supernovae-f2e033beb5fc?source=rss-2ef12fc1936------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2e033beb5fc</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[astronomy]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[gsoc-2020]]></category>
            <dc:creator><![CDATA[Jaladh Singhal]]></dc:creator>
            <pubDate>Thu, 09 Jul 2020 18:25:19 GMT</pubDate>
            <atom:updated>2020-09-12T15:48:46.031Z</atom:updated>
            <content:encoded><![CDATA[<h4>1st part of a three-month series about my GSoC’20 Project</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*i_0GmRwPOB89Zejq.jpg" /><figcaption>Artist’s Impression of supernova 1993J — ESA/Hubble (Source: <a href="https://en.wikipedia.org/wiki/Supernova#/media/File:Artist&#39;s_impression_of_supernova_1993J.jpg">Wikipedia</a>)</figcaption></figure><h3>Prologue: From GSoC’19 to ‘20?</h3><p>Last year, I stepped into the open source world by the means of GSoC — I got selected in GSoC’19 to work with open source Org <a href="http://github.com/starkit">StarKit</a> (under <a href="https://www.python.org/psf/">PSF</a>). It was a dream come true for a CSE Sophomore (also an Astronomy enthusiast), who never imagined that he’d get a chance to work with a FOSS community of professional Astronomers. The learnings and the sense of meaning I gained by working on my three-month project were strong enough that I decided to continue it — engineering software for Open Astrophysics Research.</p><p>Fast forward to Jan‘20, I applied at a Summer Research program at <a href="https://www.stsci.edu/">STScI</a> and they selected me to work on the <a href="https://jwst-docs.stsci.edu/jwst-data-reduction-pipeline">calibration pipeline</a> of <a href="https://webbtelescope.org/">JWST</a> (James Webb Space Telescope) — another dream come true moment for me! I started planning to fly off to the US but the year 2020 revealed what it is going to be infamous for and the summer program got canceled in March. (Yes, you guessed it right — the COVID-19 pandemic!)</p><p>But, when one door closes, another door does open — I realized it this year! I was fortunate that there was still time left in the application deadline of GSoC’20. I applied to <a href="http://github.com/tardis-sn">TARDIS</a>, a wonderful community of Astronomers and sister org of my last year’s organization. Thanks to the encouragement by Wolfgang (my GSoC’19 mentor), I had been contributing to TARDIS since last year and thereby I got selected in GSoC’20. And I didn’t know this but I’m enjoying this year’s GSoC much more than last year’s, let me share why!</p><h3>First, let me introduce you to the Setting</h3><h4>What’s TARDIS about?</h4><p>If you’re guessing TARDIS is related to time travel machine from Dr. Who’s Universe, you’re not entirely wrong!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fcc2xeIKDoqXIs%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fdoctor-who-david-tennant-tardis-cc2xeIKDoqXIs&amp;image=https%3A%2F%2Fmedia1.giphy.com%2Fmedia%2Fcc2xeIKDoqXIs%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="174" frameborder="0" scrolling="no"><a href="https://medium.com/media/9d61e296b408b9bdef6cd450f3f3624e/href">https://medium.com/media/9d61e296b408b9bdef6cd450f3f3624e/href</a></iframe><p>TARDIS (Temperature And Radiative Diffusion in Supernovae) is a <strong><em>scientific Python package for rapid spectral modeling of Supernovae </em></strong>— put simply, it helps Astrophysics researchers to simulate exploding Stars! And it is the very stardust (the material that came out of dying/exploding stars) which each of us is made up of. So essentially, we are <em>looking back in time</em> when studying Supernovae — now you see it, right?</p><p>If you’ve never heard about Supernova, then here’s a brief explanation for you:</p><blockquote><a href="https://en.wikipedia.org/wiki/Supernova"><strong>Supernova</strong></a> is a powerful stellar explosion that outshines its entire galaxy. This <a href="https://en.wikipedia.org/wiki/Transient_astronomical_event">transient astronomical event</a> occurs during the last <a href="https://en.wikipedia.org/wiki/Stellar_evolution">evolutionary stages</a> of a <a href="https://en.wikipedia.org/wiki/Massive_star">massive star</a> or when a <a href="https://en.wikipedia.org/wiki/White_dwarf">white dwarf</a> is triggered into runaway nuclear fusion.</blockquote><blockquote>Supernovae play a significant role in distributing heavier elements (from Oxygen to Rubidium) that are cooked in the nuclear furnace of Stars to the entire Universe — leading the formation of new Stars, planets and even lifeforms!</blockquote><p>Besides, similar to the Whovian TARDIS, the open source TARDIS collaboration I’m working with is also much bigger on the inside than outside. We have a pretty diverse community of Software engineers and Astrophysics researchers, from different countries, working together to develop TARDIS and using it in their research. Throughout the week, we meet virtually to discuss a variety of things from general Astrophysics to research papers, and from software concepts to hacking together on a problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HGlCpy2SeF3iED2YuS58EA.png" /><figcaption><a href="https://github.com/tardis-sn">TARDIS </a>— Open Source Collaboration</figcaption></figure><h4>What’s my Project about?</h4><p>TARDIS is excellent in the way it allows researchers to rapidly simulate a supernova model with the configuration they want. But when it comes to investigating the information of their interest from the model, there’s a lot of data to unpack. This is where a GUI shines since it allows users to explore the model without requiring to know its exact inner data structure. My project during this Summer is to build such interfaces that can run within Jupyter notebooks.</p><p>TARDIS already has an old GUI implemented in Qt but it’s no longer ideal since most of the work happens in Jupyter notebooks, these days. Thus I’m <strong><em>bringing up a new enhanced GUI to notebooks using Jupyter widgets &amp; interactive plotting libraries.</em></strong> It includes creating a widget subpackage within TARDIS which allows users to generate the required interface from any model, by a single function call within their notebooks. Besides it, I’m also showcasing the notebooks demonstrating the use of new GUI in <a href="https://tardis-sn.github.io/tardis">TARDIS docs</a> so that users can quickly try it out themselves.</p><h3>Now let’s come to the main Story: The Craft I did</h3><p>I can go in lengths about the things I have developed in last month. But I won’t bore you with the details of HOW (let’s save that for some other article) rather I’ll show you the WHAT. Due to my growing interest in making data interactive &amp; attractive, I have been super excited to work on this project since the application time. And this excitement has led to some interesting results!</p><h4>Shell Info Widget</h4><p>The first widget (or interface) I developed last month, gives<strong><em> information about the chemical composition of Supernova ejecta</em></strong> (the expanding shell of ejected material).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WaeO4cI3zdI2rDhagINycw.gif" /><figcaption>Shell Info Widget produced for the ”<a href="https://github.com/tardis-sn/tardis/blob/master/docs/models/examples/tardis_example.yml">tardis_example</a>” supernova model — it gives abundances of each shell, all the way from elements to ions &amp; levels.</figcaption></figure><p>Here, shells are the computational partitions (hypothetical concentric shells) in which various properties of a supernova model are calculated by TARDIS. You can click on one shell to see the amount of each element present in it in the following table. In the same way, you can explore the amount of ion species in which a particular element is present and similarly the excitation levels of each ion species.</p><p>After developing this interface in the notebook, I put the entire code in a Python module so that users can access it by a single line of code. For this, we chose appropriate OOP design pattern and then documenting each method and writing unit-tests were worth the effort considering code quality. Finally, my <a href="https://github.com/tardis-sn/tardis/pull/1166">PR#1166</a> got merged and now users can access this widget from <a href="https://github.com/tardis-sn/tardis/tree/master/tardis/widgets">tardis widgets</a> subpackage — you can try it out by running <a href="https://tardis-sn.github.io/tardis/running/jupyter-widgets.html">this notebook</a> in our docs!</p><h3></h3><p></p><h4>Line Info Widget (Prototype)</h4><p>To develop the next widget, I needed to know the underlying physics to understand how it works. This has been the most interesting part where several Astronomers of our community made the complex Astrophysics concepts graspable for me! I learned how the <em>elements present in a Supernova imprint their characteristic features on the light spectrum obtained from it, due to light-matter interactions</em> (known as <a href="https://en.wikipedia.org/wiki/Astronomical_spectroscopy">spectroscopy</a>).</p><p>TARDIS simulates each of these random interactions between light packets (photons) and atomic lines (possible transitions of electron between excitation levels of an atom) using <a href="https://tardis-sn.github.io/tardis/physics/montecarlo/index.html">Monte Carlo Radiative transfer</a> techniques. I’ve been developing a widget that gives this <strong><em>information about line interactions present in a supernova spectrum</em></strong> — here’s a prototype since it is still work-in-progress:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*fLNxQ4dAxRp170KMql9V0w.gif" /><figcaption>The prototype of the upcoming Line Info Widget — it requires some layout improvements and there are more cool things to be added soon!</figcaption></figure><p>Using this you can select a particular wavelength range in the spectrum and see the amount of ion species present in it. And then clicking on an ion species, you can explore the line counts — how many packets interacted with a particular line. Before developing this, I never thought atomic physics can be so cool during my highschool. Thanks to TARDIS, now I know how useful it is!</p><h3>On the Next Episode</h3><p>This is just the beginning — we’ve planned to add more effective (and of course beautiful) plots to the line info widget, which will give more essential information about the Supernova model. Besides, I will put all of the line info widget code in the python module so that you can try it out in a notebook like the shell info widget. And there are still more new interfaces to be built and more cool Astronomy stuff I want to share. Stay tuned!</p><p><strong><em>Update (Aug 10, 2020):</em></strong> 2nd episode is on air now! 🎉</p><p><a href="https://medium.com/@jaladh_singhal/gsoc20-episode-2-unpacking-the-data-hidden-in-light-91cd7159b443">GSoC’20 Episode-2: Unpacking the Data hidden in Light</a></p><p>Thanks for reading all the way to the end. I would love to hear your comments/suggestions, please feel free to comment below or connect with me on <a href="http://linkedin.com/in/jaladh-singhal">LinkedIn</a>. Besides, if you find TARDIS cool, we always welcome new contributors to our open source project — get in touch with us.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2e033beb5fc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dataset or Research Question: Which comes first?]]></title>
            <link>https://medium.com/swlh/dataset-or-research-question-which-comes-first-d24fc7cdde1e?source=rss-2ef12fc1936------2</link>
            <guid isPermaLink="false">https://medium.com/p/d24fc7cdde1e</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[research]]></category>
            <category><![CDATA[dataset]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Jaladh Singhal]]></dc:creator>
            <pubDate>Mon, 29 Jun 2020 22:10:36 GMT</pubDate>
            <atom:updated>2020-07-01T00:16:50.828Z</atom:updated>
            <content:encoded><![CDATA[<h4>A realistic solution to “Chicken or Egg dilemma” for aspiring Data Analysts</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LiJ1ToVNPA3CKRkZ.jpg" /><figcaption>Source: <a href="http://blog.heptabrain.com/2019/01/what-came-first-chicken-or-egg.html">Heptabrain</a></figcaption></figure><blockquote>Data analysis is hard, and part of the problem is that few people can explain how to do it.</blockquote><blockquote>— Art of Data Science by Roger D. Peng &amp; Elizabeth Matsui</blockquote><p>Out of several books &amp; articles defining the <strong><em>process of data analysis</em></strong> differently, one thing is reasonably common that it always starts with <em>formulating a research question</em> — stating the problem you seek to solve by analysis. Followed by collecting relevant dataset(s) and then all steps of EDA up to interpretation &amp; communicating results.</p><p>But in reality, when you start learning data analysis, almost courses/tutorials that we encounter start with a dataset first, with an already chosen question that can be answered from analyzing it. And rest explanation is all about applying the data analysis techniques using a programming language of your choice. Moreover, whenever it comes to practicing data analysis on popular platforms like Kaggle, datasets come first and the research question remains secondary.</p><p>The difference between these two approaches — <strong><em>choosing a research question first and then finding dataset(s) </em></strong><em>vs</em><strong><em> choosing a dataset first and then asking question(s) </em></strong>— may not seem very perplexing at first. It’s even common to overlook this if your experience with data analysis (until now) is limited to only practicing analysis techniques on data, like cleaning, pre-processing, modeling, visualizing, etc.</p><p>But what if you decide to do a data analysis project — taking one step up to become a Data Analyst who is capable of finding a solution to a real-world “problem”. Now you see, right? It makes sense to head on to a question first and then find datasets like a professional. But at the same time, it also makes sense that question should originate from a dataset that can answer it. Since the decision of where to start needs to be made by you this time (not by a course/tutorial), the above-mentioned difference will soon manifest itself as a dilemma of choosing <strong><em>what comes first </em></strong><em>— dataset or research question?</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/0*UVfnPGHTR7Iw1n4j.gif" /><figcaption>Source: <a href="https://giphy.com/gifs/chicken-bro-KGTEppMWKRVvsCB0pw">Giphy</a></figcaption></figure><p>Like anything in Science (be it of Data), we can figure things out by experimenting, so <strong><em>let’s try sticking to asking a research question first and then finding dataset</em></strong>. Put this dilemma aside for a while, and start cleaning the cobwebs in your mind to search for a forgotten project idea, i.e. a shiny research question to put your data analysis skills in use! It’s okay if your question is vague in the beginning because as per the data analysis process, it is refined only after we dive into dataset. So at this stage, you start thinking:</p><blockquote>What should I analyze — it should be definitely something unique? What are those research topics which often pop up in my head and I become curious to find their answers (though I never tried to find them yet, due to my laziness)?</blockquote><p>By this time, you’ll get at least a couple of ideas and you’re able to form some <em>unique vague questions</em> from them. Let’s consider what I came up with:</p><blockquote>Is there any correlation between the number of tabs open in one’s browser and specific psychological traits? *eyes gleaming with excitement — time has come to get the answer of why I have 50 tabs open right now*</blockquote><blockquote>But here’s a catch: Is this question “answerable <strong>by data</strong>” which is “already present” and is “accessible to you”?</blockquote><p>Many may wonder (at least I used to did), we’re living in<strong> </strong><em>the age of Big Data &amp; Internet</em>, data is present everywhere and to access it we just need some searching on Google. But in reality, it’s not that simple! Let’s break down <strong>why</strong> is it so, to the three phrases I’ve quoted above:</p><h4>1. Answerable by Data?</h4><p>When you put <em>“data for the number of browser tabs open and psychological traits”</em> in Google search box, you will get a list of articles explaining internet FOMO, multi-tab mania, etc. But notice that they do not present any dataset about the question we have, rather they are themselves answering the question — conclusive reports which discuss possible psychological reasons. So the question we started with does have an answer (partial, though). But what we are looking for is some data that we can analyze to answer it ourselves. Maybe we’re not searching it the right way, let’s try searching directly on the data sources.</p><h4>2. Accessible to You?</h4><p>Some of the articles which appeared in our search did mention the results of some research and cited the research paper’s link. But when you click over them, you’ll find that they haven’t made their data accessible to the public — this brings us to the next part. There is another limitation of our unique &amp; vague research question, that the data we’re looking for should be freely available. So you go to the free data sources on the web as enlisted here:</p><p><a href="https://towardsdatascience.com/top-10-great-sites-with-free-data-sets-581ac8f6334">Top 10 Great Sites with Free Data Sets</a></p><p>Or search it with <a href="https://datasetsearch.research.google.com/">Google’s Dataset search engine</a> with “free” filter but unfortunately you still won’t find any relevant dataset for the question we started with.</p><h4>3. Already present?</h4><p>At this point, it starts to make sense that maybe no such <a href="https://en.wikipedia.org/wiki/Open_access">open access</a> research has been conducted yet that’s why no dataset is present — openly! But is it possible for us to collect it? Sometimes, it is easy to do so by scraping it from multiple webpages or by using an API, thereby preparing a dataset ourselves. Otherwise, you have to conduct a survey to collect data as researchers do. Unfortunately, the research question we started with, falls in the latter category where we will need to involve psychologists to design a survey and then conduct it on web browser users. Not only it is time-consuming but also infeasible unless you’re backed by the R&amp;D department of an organization. Are you?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/0*d_8zz3a5wSAKaDNv.gif" /><figcaption>Source: <a href="https://giphy.com/gifs/maid-regret-hit-the-wall-lQCV6K36nJfJYNxXbC">Giphy</a></figcaption></figure><p>So what’s the feasible solution? Reverse engineer it! Find a dataset first and then ask the question. But like me, you might be wondering doesn’t it limit<em> the uniqueness we wanted in our research question — </em>this way it will be the same as what others have already done. Well, here’s a subtlety we were missing from the beginning in this way of thinking. If we were searching for a dataset for a unique research question, then the datasets (if present) would be those which someone has collected for their research, i.e. our research question would not have been unique in the first place. It can be entirely unique only when you are the first one to collect the data. But, if you use some accessible dataset, it can still be partially unique because chances are — someone has not asked a question on the dataset which you may come up with!</p><p>So <strong><em>does this settle the debate — dataset comes first?</em></strong> Not exactly, let’s not forget the big picture and take a moment to consider how data analysis happens in a business industry or scientific research.</p><p><a href="https://summerofcode.withgoogle.com/projects/#5290824201404416">Working</a> with a <a href="http://github.com/tardis-sn">FOSS community</a> of Astrophysics researchers, I’ve come to know that when they begin new research, they do always start with a question. Then the relevant data is collected either from a data archive or directly from an Astronomical observatory based on requirements. So data processing and analysis is the second component of their entire research process.</p><blockquote>While a study includes developing and executing a plan for collecting data, a data analysis presumes the data have already been collected.</blockquote><blockquote>— Art of Data Science by Roger D. Peng &amp; Elizabeth Matsui</blockquote><p>Based on excellent case studies in this great book, it does appear to me that the research question also comes first in the business industry. After that, analysts dig the variables of interest in the consumer database to find the answers which drive profit. But in both the cases of business or science, it’s noteworthy that question is always refined after matching expectations with data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/933/1*Lpa3hlopJDJ36zAp4Dst7Q.png" /><figcaption>Epicycle of Analysis on the first stage of Data Analysis i.e. Stating Question — Art of Data Science</figcaption></figure><p>Puzzled again, huh? See the quote at the very beginning of this article! ;)</p><p>In my opinion, there’s no definitive answer to this question about what comes first because<strong><em> the answer depends</em></strong> — both on your situation and on how you perceive the process of Data Analysis.</p><p>If there’s no definitive answer, then what about the subtitle of this article — <strong>the realistic solution to this dilemma <em>for aspiring data analysts</em>?</strong></p><p>Since I’m myself in a situation of an aspiring data analyst, I do have a sensible solution that can help you to mitigate this dilemma when starting a data analysis project, independently! I see it as a hybrid of both “research question first” and “dataset first” approaches:</p><blockquote>Don’t start with a research question but with an area of inquiry. Then find relevant dataset(s), explore them, and let your curiosity ask the research question(s).</blockquote><p>I believe that this approach might also resemble what happens out there in business or science, to an extent. Because choosing an area of inquiry in this approach, resembles the particular domain within which professional Analysts ask targeted questions. But unlike them, we aspirants (or tinkerers!) don’t have access to consumer data or data archives specific to their domain. Thus we have to rely only on openly accessible data.</p><p>Besides, if you use this approach with a little bit of creativity, you can also make sure that you’re not losing the (partial) uniqueness in your research question that we talked about earlier. Let me tell you how, considering my first data analysis project as an example:</p><ol><li><strong>Start with an area of inquiry:</strong> I picked<em> the observable Astronomical event(s). </em>Besides, it is good to have some narrow interest area within your chosen broad area of inquiry — I chose, <em>how it affects the lives of humans</em>.</li><li><strong>Find relevant datasets:</strong> This may be intimidating at first and requires some cleverness in searching openly accessible datsets. I went to <a href="https://www.kaggle.com/datasets">Kaggle Datasets</a> and entered the closest matching keyword “astronomy” in the search box and looked at the description of each dataset that seemed interesting.</li><li><strong>Let your curiosity ask the research question:</strong> My curious eyes got stuck at a <a href="https://www.kaggle.com/kapastor/sundown-and-sunset-data-20102020">sunrise-sunset dataset</a> because it gave me an idea that I can collect the year-wise data of any astronomical event of any location, from a <a href="https://www.timeanddate.com/">website</a> that author used.</li><li><strong>Repeat (if required):</strong> I decided to collect the moonrise, moonset &amp; phases data but I was wondering, what question could I ask out of this. This is where the narrow interest area that we decided earlier comes in use. I remembered that I once read on Quora about a myth that full moon makes humans act crazy, like increased road accidents, etc. (known as <a href="https://www.scientificamerican.com/article/lunacy-and-the-full-moon/">lunar lunacy</a>). I searched Kaggle Datasets again and fortunately found a <a href="https://www.kaggle.com/tsiaras/uk-road-safety-accidents-and-vehicles">UK traffic accidents</a> dataset. Hence I formulated a well-defined specific research question to start the data analysis — <em>test the myth of lunar lunacy on road accidents in the UK. </em>If you are curious, you can find my results in <a href="https://www.kaggle.com/polytopicowl/testing-the-myth-of-lunar-lunacy/">this notebook</a>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/246/0*IAL9l2xIKxlaOCCO.gif" /><figcaption>Source: <a href="https://giphy.com/gifs/chicken-bro-U1mBWiStiHyJAw6ayl">Giphy</a></figcaption></figure><p>Congratulations, now you have solved the dilemma that was keeping you stuck from starting your own data analysis project!</p><p>Thank you for reading all the way to the end. If you have a better approach to solve this dilemma or have anything to add, I would love to know. Please feel free to comment below or reach out to me on <a href="https://www.linkedin.com/in/jaladh-singhal/">LinkedIn</a>.</p><p><em>And a </em><strong><em>Spoiler at last</em></strong><em>:</em> If you don’t yet know which came first: <a href="https://en.wikipedia.org/wiki/Chicken_or_the_egg">chicken or egg</a>?</p><blockquote>The egg came first — laid by a bird that was not a chicken.</blockquote><blockquote>— Neil deGrasse Tyson, a popular Science Communicator</blockquote><p>Now, YOU tell me what do you think is Egg here — Dataset or Research Question?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d24fc7cdde1e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/dataset-or-research-question-which-comes-first-d24fc7cdde1e">Dataset or Research Question: Which comes first?</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GSoC’19: From Dream to Reality]]></title>
            <link>https://medium.com/@jaladh_singhal/gsoc19-from-dream-to-reality-3bf07d6f17bb?source=rss-2ef12fc1936------2</link>
            <guid isPermaLink="false">https://medium.com/p/3bf07d6f17bb</guid>
            <category><![CDATA[goals]]></category>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[dreams]]></category>
            <category><![CDATA[ambition]]></category>
            <dc:creator><![CDATA[Jaladh Singhal]]></dc:creator>
            <pubDate>Thu, 09 May 2019 17:44:53 GMT</pubDate>
            <atom:updated>2019-05-09T17:44:53.313Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*iLP2DeVnyYZmuuHiGN0FAg.png" /><figcaption>That’s how a turning points look like!</figcaption></figure><p><strong><em>May 6, 2019 @UTC 18:00</em></strong> After a decade long wait, the <a href="https://summerofcode.withgoogle.com/projects/#5799260895838208">results of GSoC</a> were finally out! I took a deep breath to settle the butterflies in my stomach, and opened my GSoC Dashboard. The verdict of my past three-months struggle was before my eyes. <em>What was a mere dream for me 4 months ago, has now become an unbelievable reality!</em></p><p>This was <strong>the best moment</strong> of my life, I was supposed to be like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*IrLHylycpsSKHRSOvdmv_w.gif" /></figure><p>But <em>NO that didn’t happen at all!</em> TBH, apathy struck me. My whole family was rejoicing and I was literally struggling to feel happy! 😬 It took me nearly 5 hours in actually believing and accepting this achievement.</p><p>All those struggles from figuring out how to fix a issue to creating a PR; from exploring an unheard tech to finally implementing it; from bringing myself out of self-doubt to self-belief; each one of them paid off really well!</p><p>The journey upto here was not easy! I started as an absolute beginner to Open Source World with a newly developed interest in Data Visualization using Python. Until Jan end, I was only a simple programmer who was drowning under the pile of to-dos accumulated since past 5 unproductive months. Hence I was not much serious about the preparation of GSoC’19, which was another To-do for my list. But fortunately my sister helped me getting out of that rut by making me realize <strong>the power of ONE THING -</strong></p><blockquote><em>Narrow down your focus to a single thing that matter the most and put all of your energy to achieve it, irrespective of howsoever big it is! And that’s how you get the extraordinary results.</em></blockquote><p>She convinced me to read this book <em>“</em><strong><em>The One Thing </em></strong><em>— by Gary Keller”</em> which changed my entire mindset about productivity. So throughout my journey until now, I have read this book &amp; simultaneously implemented the mind-blowing notions presented by it. One of my favorite is <a href="https://www.youtube.com/watch?v=y97rBdSYbkg">Geometric Domino Progression</a>:</p><blockquote><em>You do one right thing, then you do next bigger right thing, and so on. Over time this sets up a chain reaction — a geometric domino effect — that knocks off the largest domino (the BIG thing you decided to achieve) at the end.</em></blockquote><p>Once I made GSoC preparation my One Thing, everything fell into place. I put all of my energy and attention in this single goal and with persistent efforts, I have finally reached upto here, as a GSoC Qualifier! 😊</p><h3>Journey until now:</h3><p>If you don’t know much about GSoC, here is the brief up of what one does for getting selected in GSoC:</p><ol><li><strong>Researching &amp; Getting ready:</strong> GSoC is famous for the extensive research it demands. It takes time to understand the phases of this program and how to crack them. After that I was supposed to shortlist open source organization(s) participating under GSoC’19. Being an astronomy enthusiast, I chose <a href="https://github.com/starkit">StarKit</a> (a sub Org under <a href="https://www.python.org/psf/">Python Software Foundation</a>) that is developing a Python package for <em>stellar spectroscopy.</em>✨ And it even had an appropriate project idea as per my interest — data visualization, on its ideas list.</li><li><strong>Active communication &amp; contribution: </strong>Then I introduced myself in the communication channel of my org. I still remember what a brand new experience it was for me, when I completed the initial task and shared it on the channel. 🤩 The golden rule is keeping the loop of communication &amp; contribution alive, I did the same. As per my project idea of interest, I asked mentors what should be my next task, they explained what they expect. It all sounded pretty new but I googled it, learned it, figured out solution and created a PR (Pull Request is a request to merge the code one adds, in the main codebase of an Org). I started with one PR (fixing a typo in readme) and ended up with 7 PRs to enlist in my proposal. Gradually with each contribution, I understood their codebase and became aware of the areas where work is required.</li><li><strong>Drafting Proposal(s): </strong>This was the most struggling part where you’ve to brainstorm your ideas for the project &amp; consolidate them into a solid proposal. It was a daunting task to convert a two sentence long idea statement and few conversations made to understand the project goals, into a complete project plan broken down into a 3-month timeline of Summers. I devised the suitable use cases, researched about various visualization techniques &amp; tools I could use and shortlisted what would work best for my project. And after filling lot of pages in my diary with brain-maps &amp; decisions, I was ready with my idea. Next essential part was to write it as an understandable proposal by incorporating all the elements expected from a good proposal (abstract, goals, deliverables, implementation details, wireframes, timeline, milestones, past contributions, personal background info, etc.). After some sleepless nights, I successfully wrote a 13 page long proposal, and asked for feedback from my mentor to do the required changes. Then I let my Grammar Nazi sister proofread it and after few tweaks, I finally uploaded it on my GSoC Dashboard. 😪 <em>*Sigh of relief *</em></li><li>Then I continued contribution in the 3 weeks window students get before the results are declared. Since I knew what needs to be done, I did some major fixes and created two PRs consisting my significant contribution to the Org until now. 🙃</li></ol><h3>Benefits of being a part of Open Source Community:</h3><p>Everyone knows the importance of work experience besides just learning skills. To gain that professional hands-on experience in our field, we seek an opportunity to work in a reputed organization. But we can’t overcome the walls present around such an opportunity unless we raise our skills to a significantly high level, that too by undergoing a competitive struggle! But that’s not the case with Open Source World.</p><p>Anyone with a minimal skillset (like I had), can get started by contributing to any Open Source Organization, whether large or small. Your 1st contribution can be as small as fixing a typo in docs, or raising an issue. And then gradually by keeping your contribution persistent (keep fixing issues, adding features, etc.), you gradually enhance your skills by learning the stuff required thereupon. This basically works on the idea of <em>Learning by Doing rather than Learning for Doing things later on (which never comes for most of people)</em>. I was completely convinced by this idea since an year ago, but experienced its real power in my Open Source journey. You can find me on GitHub as <a href="https://github.com/jaladh-singhal">jaladh-singhal</a>.</p><p>Another great thing is that almost every Open Source Org is very welcoming (they don’t have any walls). The members of their community will help you getting started. They will answer you queries on their official mailing list, but only thing to keep in mind is to Google before you ask. I am extremely thankful to the mentors of my Org — StarKit, who helped me a lot in understanding their codebase and answered many of my questions. The challenges they put before me to start working on XYZ, helped me to push myself and learn multiple things which I could have never did. And above all, I find it true what I heard: <em>“Nothing gives you more happiness than getting your PR merged”.</em> The morning of May 6 (result date) when I found that 2 of my PRs were merged, gave me more happiness than the evening when results were out! 😅</p><p>I still wonder as well as feel proud on what this three-month journey had made me learn! I now have a sound knowledge about many things which I never heard/tried before: Linux OS, Git, Python packaging &amp; virtual environments, Jupyter Notebooks &amp; IPywidgets, Sphinx documentation, Jinja templating, various Data Visualization techniques, Plotly.py (Dash), Continuous Integration using Travis CI, and several others. During this period, my Googling &amp; problem solving skills have also improved considerably, that are vital to anyone in the CS field.</p><p>In spite of various challenges I faced when I wanted to give up, the only thing which kept me moving was these exciting learnings I were gaining. My inspiration was the notion of my favourite book — <strong><em>The Alchemist:</em></strong></p><blockquote><em>It is the evolution of self during a journey, which matters more rather than the destination itself.</em></blockquote><p>OK! So now I’ve just noticed that it has become quite long and may sound kind of a self-help “lecture” to some. But at the same time, I am also realizing that this is how things start to sound like when your dreams become true. 😉</p><h3>What’s next: Onset of a new Journey!</h3><p>This was just my three-month journey of Preparation. The real work: <strong>three-month Coding Period of Summers</strong>, when I will be developing my proposed project, is yet to start from May 27. What can be more pleasing to an astronomy enthusiast than working with the real world astronomers — my mentors. 😍 I am thrilled for the upcoming Summers!</p><p>Although no one is a fan of Summers when he is living in India, but <em>this is the 1st time when I’m eagerly waiting for the Summers:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*OBjCbD5be_rmQNzT" /></figure><p>Thanks for reading! I would love to know your responses or to answer your queries.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3bf07d6f17bb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>