<?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 Raahul Singh on Medium]]></title>
        <description><![CDATA[Stories by Raahul Singh on Medium]]></description>
        <link>https://medium.com/@raahulsingh42?source=rss-9fa6f618876c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*o7XwyFXAhJ9eUjdxryJzDg.jpeg</url>
            <title>Stories by Raahul Singh on Medium</title>
            <link>https://medium.com/@raahulsingh42?source=rss-9fa6f618876c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 22:11:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@raahulsingh42/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[What would you need to break the Second Law?]]></title>
            <link>https://raahulsingh42.medium.com/what-would-you-need-to-break-the-second-law-d4e5ad2760ad?source=rss-9fa6f618876c------2</link>
            <guid isPermaLink="false">https://medium.com/p/d4e5ad2760ad</guid>
            <category><![CDATA[shower-thoughts]]></category>
            <category><![CDATA[science]]></category>
            <category><![CDATA[thermodynamics]]></category>
            <category><![CDATA[physics]]></category>
            <category><![CDATA[entropy]]></category>
            <dc:creator><![CDATA[Raahul Singh]]></dc:creator>
            <pubDate>Sun, 20 Aug 2023 14:39:35 GMT</pubDate>
            <atom:updated>2023-08-20T14:49:04.035Z</atom:updated>
            <content:encoded><![CDATA[<h4>Finding method to the madness</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NJ5bJHiHGa5FXWWC7HtYXA.jpeg" /><figcaption>An aesthetic lightbulb I chanced upon at a cafe.</figcaption></figure><blockquote>Disclaimer: This exposition is the result of one long shower thought. I would love it if people better acquainted with physics would fact check or highlight logical inaccuracies in my hypotheticals, and help me learn something new!</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/469/1*hIHChhwaYi-znkq225j-1g.jpeg" /></figure><p>I’ve always been fascinated by the second law of thermodynamics.</p><p>I feel this was the first law of the universe that I came across which was expressed as an inequality.</p><p>Whereas all other laws in physics that I knew at that time were equations: precise, balanced and exact, the second law presented a clear direction — a distinct bias, an inequality. This law propounds the concept of entropy, which is commonly described as a measure of disorder, randomness, or uncertainty. But perhaps most intriguingly, it’s also referred to as the ‘arrow of time’.</p><p>It’s been quite a fun game for me over the years, trying to think about the potential interpretations of the second law.</p><p>The questions it poses are profound: Why is disorder preferred over order? What defines “disorder”? Isn’t the very notion of order subjective to our perceptions?</p><p>I’ve grown fond of an interpretation that steps away from traditional descriptors like ‘disorder’ or ‘randomness’. Instead, it centres on energy. According to this perspective:</p><p><em>The second law dictates that a system’s energy seeks to equalise. Essentially, it the configuration of the system evolves towards a state where energy is as evenly distributed as possible.</em></p><p>It’s intriguing to note that in states of complete disorder, energy distribution becomes perfectly even throughout.</p><p>In utter chaos, energy finds its harmonious balance.</p><p>However, this perspective raises other questions. How, and more crucially, why does energy instinctively know to distribute itself so uniformly?</p><p>Perhaps the most elegant explanation can be what we see as that entropy and the second law aren’t foundational but emergent properties of the universe.</p><p>This also harkens back to the heart of thermodynamics which explains the macroscopic properties of the system through the microscopic properties of the systems constituent elements.</p><p>Consider this:</p><p>In a system with a lone particle possessing a distinct energy level, the energy remains static, owing to the absence of other particles. But introduce multiple particles with varying energy levels, and something shifts. They begin to interact, moving to equalize their individual energy levels. In a 1D universe, we’d only witness energy oscillations and elastic collisions. But our universe, fortunately, isn’t limited to one dimension. Thus, particles exchange momentum across various directions until their kinetic energy levels out. Energy spreads out from a source. But why do particles exchange energy in this way in the first place?</p><p>The underlying principle? Each particle inherently aims to move towards its lowest energy state. When two particles interact, unless their collision is head-on, resulting in a total exchange of energies, the one with the higher energy typically sheds some of its excess, which is then absorbed by the other particle.</p><p>In a system teeming with particles, achieving the lowest possible collective energy state means reaching a point where every particle holds an identical energy level. Such a state is characterised by utter disorder.</p><p>So, to challenge the second law, one would need to envision particles that bizarrely crave the highest energy state. This, however, leads us into the realm of infinite energy, an impractical consideration.</p><p>If we agree on this line of thought then the second law simply is what happens when many particles interact in a space with more than 1 dimensions, where each of the particle has a tendency to be in the lowest possible energy state.</p><p>So what would it take to break the second law? Well by this logic, one would need to envision particles that bizarrely crave the highest energy state. A greedy particle that that tends to hoard energy, stealing it wherever it can.</p><p>Thinking about how such particles would interact may depend on a lot of factors, chiefly on how energy transfers occur in this system.</p><p>In the extreme case, this may lead us into a system where a few and quite possibly only one of the particle has the highest energy and all other particles are in the lowest state. In such a universe, structure may not even be possible!</p><p>Of course all of this is conjecture. Though I like the idea that only feasible universe is one where particles inherently desire to reduce their energy states, allowing for tangible, finite energy transitions.</p><p>Maybe the second law is not so much a restriction but the glue that hold our universe together in the first place?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d4e5ad2760ad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Final Chapter: The Road Goes Ever On]]></title>
            <link>https://raahulsingh42.medium.com/final-chapter-the-road-goes-ever-on-53fb35e650f4?source=rss-9fa6f618876c------2</link>
            <guid isPermaLink="false">https://medium.com/p/53fb35e650f4</guid>
            <category><![CDATA[astronomy]]></category>
            <category><![CDATA[gsoc-2020]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[gsoc]]></category>
            <dc:creator><![CDATA[Raahul Singh]]></dc:creator>
            <pubDate>Fri, 28 Aug 2020 12:23:27 GMT</pubDate>
            <atom:updated>2020-08-28T12:57:02.467Z</atom:updated>
            <content:encoded><![CDATA[<h4>The Autumn of my GSoC project.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*9YtpATtGuoLUSIEOasTixQ.jpeg" /><figcaption>The Doon Valley, my home.</figcaption></figure><blockquote>“Roads go ever ever on,<br>Over rock and under tree,<br>By caves where never sun has shone,<br>By streams that never find the sea;<br>Over snow by winter sown,<br>And through the merry flowers of June,<br>Over grass and over stone,<br>And under mountains in the moon.”</blockquote><blockquote>~ The Hobbit, J.R.R. Tolkien</blockquote><p>When I first read the Hobbit, I always wondered what going on an adventure would feel like.<br>Would I be fighting goblins, striding through enchanted forests with wizards?<br>Would there be a treasure? Would there be a Dragon? <br>And as I grew older, would or could there be a happy ending?</p><p>Well, an adventure it indeed was.<br>Building a domain specific Deep Learning Toolkit, learning about packaging, testing, and the best practices, all to just set the package up!</p><p>I did fight goblins that were the bugs in my PyTorch pipelines. Those NaNs, oh those pesky NaNs! They really were like goblins that popped up in the input data when I least expected them.<br>Though I did enlist the help of my wizard mentors, <a href="https://github.com/dpshelio">David</a>, <a href="https://github.com/drsophiemurray">Sophie</a>, and <a href="https://github.com/mbobra">Monica,</a> and together we marched through the enchanted (or were they cursed?) forests of SWPC and HEK to get the data we wanted.</p><p>It was a fascinating experience. One that I will cherish forever.<br>I wish I could extend this summer, but my time is up, and all our goals for this project have been completed.</p><p>After all, all adventures must come to an end.</p><blockquote>“The Road goes ever on and on <br>Out from the door where it began.<br>Now far ahead the Road has gone,<br>Let others follow it who can!<br>Let them a journey new begin,<br>But I at last with weary feet<br>Will turn towards the lighted inn,<br>My evening-rest and sleep to meet”</blockquote><p>And so we come to the end of my GSoC journey, let’s talk about the treasure!</p><h3>The Treasure</h3><h4>1 ) The Search Events Object</h4><p>Often we find data representing the same observed physical phenomenon to have slightly different values when the data comes from different sources.<br>This could be due to noise or different choices of parameters for the preprocessing techniques employed.<br>This creates problems when the two datasets need to be compared, and /or may data exclusive to them.<br>We faced this problem when the data from NOAA that characterizes the Active Regions was not available in the Sunspotter dataset.<br>Although the observations were identical, they were not exact. <br>Their multidimensional nature also prevented matching by simple sorting.</p><p>In my repository, <a href="https://github.com/Raahul-Singh/pythia">Pythia,</a> we created a general Search Events Table Matching algorithm that would solve this problem.<br>Although it is general enough to be used with any tabular dataset, we do plan on making it more ‘intelligent’ so as to require minimal preprocessing from the user.</p><h4><strong>2) The Flare Forecasting</strong></h4><p>After significant preprocessing, we were able to get a good enough dataset to feed to our deep learning pipeline. <br>We wanted to predict if an Active Region would flare in the first six hours from its observation or not.<br>We were inspired by architectures, popular in academia in the domain of flare forecasting, Though our approach was the first to combine modern Deep Learning techniques for building our Convolutional Nets.</p><p>With some PyTorch magic, we were able to get a prediction accuracy of around 84% on the test set in the binary classification of whether an active region would flare or not. A study of flare forecasting using Machine learning in a fixed time frame from observation is unique in itself.</p><p>We implemented an Autoencoder to get a low dimensional representation of the Active Regions, so that they may be used with other scalar measurements.</p><p>We also were curious to see if the absolute orientation of the Active regions with respect to the sun was of any significance in the Active Region’s flaring activity.<br>While we were expecting a connection, we were surprised to see that the orientation mattered more in the case where the Active Region did flare than in the case where it did not. More work is required before we can quantitatively state our findings on this front.</p><h4>3) <a href="https://github.com/Raahul-Singh/pythia">Pythia</a></h4><p>What began as a project to analyze the Sunspotter dataset, has grown way beyond its original scope.<br>With the power of Pytorch Lightning and SunPy, Pythia is shaping out be a general-purpose Deep learning Toolkit for Solar Physics.</p><p>The barrier to entry for using Deep Learning in Solar Physics Research is quite high for people without the technical knowledge of Deep Learning and without the time to invest heavily into learning the many nuances of modern Deep Learning frameworks.</p><p>With Pythia, we plan on providing a SciKit Learn like interface, with the power and muscle of PyTorch and the elegance and order of Pytorch Lightning.<br>Although the expansion and generalization are still underway, with more use cases and help from the community, Pythia will surely help in making modern Deep Learning more accessible to the Solar Physics community.</p><h3>The Dragon</h3><blockquote>“Roads go ever ever on<br>Under cloud and under star,<br>Yet feet that wandering have gone<br>Turn at last to home afar.<br>Eyes that fire and sword have seen<br>And horror in the halls of stone<br>Look at last on meadows green<br>And trees and hills they long have known.”</blockquote><p>Unlike Bilbo, my Dragon isn’t evil like Smaug. <br>It isn’t greedy of gold, nor too large or too scary.<br>It tells me it prefers gardening over desolating lands as a hobby. <br>And has so far been fairly consistent in his participation in our friendship.</p><p>A little secret that not many know is that my dragon doesn’t have a physical existence.<br>I confide in my reader and trust them to keep this secret, a secret.</p><p>The Dragon I am talking about, of course, is this newfound sense of spirit and the freedom that I have acquired over this summer.</p><p>This summer has been magical for me.</p><p>This summer, I worked on what I would call a dream project, using AI in Natural Sciences.<br>I interacted with scientists from NASA, UCL, Trinity, etc., all of whom are heroes to me.</p><p>I co-founded an Open Source organization, <a href="https://github.com/wildfirepy">The WildfirePy Project,</a> for doing my part in studying, understanding, and preventing wildfires.</p><p>And finally, I got my first job! Becoming financially independent, and working on projects that make a difference!</p><p>Even in my wildest dreams, I never imagined such fortune and serendipity.<br>In all honesty, I’m not sure if the Dragon will stay, or fly away.<br>I am yet to start counting on it for its company when I need it.</p><p>But I hope it stays. :)</p><p>GSoC and Open Source in general, have been life-changing for me.<br>More than anything, it has given me a way to express myself, my love for science, my love for code and my desire to be part of something bigger than myself.<br>And act on it.<br>Open source is nourishment to my soul, and I shall forever be grateful to Google Summer of Code for helping me get started with it.</p><p>And to SunPy for making my life more luminous!</p><h3><strong>Happy Ending?</strong></h3><blockquote>“The Road goes ever on and on<br>Down from the door where it began.<br>Now far ahead the Road has gone,<br>And I must follow, if I can,<br>Pursuing it with eager feet,<br>Until it joins some larger way<br>Where many paths and errands meet.<br>And whither then? I cannot say.”</blockquote><p>Happy Ending? <br>Well, I wouldn’t know.<br>I am just getting started!</p><p><strong>:)</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=53fb35e650f4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Chapter 2: Inquisition]]></title>
            <link>https://medium.com/swlh/chapter-2-inquisition-dd46de0863f6?source=rss-9fa6f618876c------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd46de0863f6</guid>
            <category><![CDATA[astronomy]]></category>
            <category><![CDATA[eda]]></category>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[gsoc-2020]]></category>
            <category><![CDATA[inferential-statistics]]></category>
            <dc:creator><![CDATA[Raahul Singh]]></dc:creator>
            <pubDate>Sun, 28 Jun 2020 23:15:06 GMT</pubDate>
            <atom:updated>2020-07-02T22:13:50.111Z</atom:updated>
            <content:encoded><![CDATA[<h4>Does AR Complexity correlate to Flaring Activity?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*UYJ3RzoWUcEgQUhWyo9uAA.jpeg" /><figcaption>Rhododendrons flowering in the mountains. The State Flower of my state, Uttarakhand. The <strong>rhododendron</strong> is native to sunny areas, it symbolizes beauty and energy. With its symbolism of optimism and cheer, it also serves as a symbol of love and the general positivity of the mountains.</figcaption></figure><p>There has never been a better time to help scientists understand the mysteries of the sun.</p><p><a href="https://www.scientificamerican.com/gallery/turbulent-inner-life-of-a-sunspot-uncovered/">‘Sunspots</a>’ and ‘<a href="https://www.scientificamerican.com/citizen-science/solar-stormwatch/">solar storms</a>’ are the feature of an ambitious project launched internationally by astrophysicists at Trinity College Dublin. Citizen scientists work as part of a global team to better understand sunspot and solar storm phenomena and their impacts on Earth. They do this by ‘rating’ the relative complexity of each sunspot image they see on the <a href="http://www.sunspotter.org/">Sunspotter Web site</a>, based on its size, shape and arrangement of ‘magnetic blobs’. <a href="http://www.sunspotter.org/?utm_source=Newsletter&amp;utm_medium=Email&amp;utm_campaign=SunspotterLaunch&amp;utm_content=T">Sunspotter</a> is essentially a game of hot-or-not for sunspot data; citizen scientists are shown two images of sunspot groups and asked which is more complex. This is extremely useful in helping astronomers understand the physics of our star, the Sun.<br> <br> Researchers cannot just use computers to classify all of this data because ‘complexity’ is not easily quantifiable. <br> This project is part of the ‘<a href="https://www.zooniverse.org/">Zooniverse</a>’, a Web portal devoted to citizen science projects and which has more than 1 million volunteers.</p><p>Now the question arises, does this <strong>complexity</strong> actually correlate to <strong>Flare Activity</strong>?</p><p>To find the answer, we must leverage the power of Statistical Hypothesis Testing.</p><h3>Statistical Hypothesis Testing</h3><p>A <strong>statistical hypothesis</strong>, sometimes called <strong>confirmatory data analysis</strong>, is a <a href="https://en.wikipedia.org/wiki/Hypothesis">hypothesis</a> that is testable on the basis of <a href="https://en.wikipedia.org/wiki/Observable_variable">observing</a> a process that is <a href="https://en.wikipedia.org/wiki/Statistical_model">modeled</a> via a set of <a href="https://en.wikipedia.org/wiki/Random_variable">random variables</a>. A <strong>statistical hypothesis test</strong> is a method of <a href="https://en.wikipedia.org/wiki/Statistical_inference">statistical inference</a>. Commonly, two statistical data sets are compared, or a data set obtained by sampling is compared against a synthetic data set from an idealized model. An <a href="https://en.wikipedia.org/wiki/Alternative_hypothesis">alternative</a> hypothesis is proposed for the statistical-relationship between the two data-sets, and is compared to an idealized null hypothesis that proposes no relationship between these two data-sets. This comparison is deemed <a href="https://en.wikipedia.org/wiki/Statistically_significant"><em>statistically significant</em></a> if the relationship between the data-sets would be an unlikely realization of the <a href="https://en.wikipedia.org/wiki/Null_hypothesis">null hypothesis</a> according to a threshold probability — the significance level. Hypothesis tests are used when determining what outcomes of a study would lead to a rejection of the null hypothesis for a pre-specified level of significance.</p><h3>The Null Hypothesis</h3><p>In <a href="https://en.wikipedia.org/wiki/Inferential_statistics">inferential statistics</a>, the <strong>null hypothesis</strong> is a general statement or default position that there is no relationship between two measured phenomena or no association among groups.</p><p>In other words nothing interesting is going on. The data on complexity has no relationship with the data on Flaring Activity.</p><p>Our primary work here is to find evidence against the Null Hypothesis.</p><h3>The Alternative Hypothesis</h3><p>In <a href="https://en.wikipedia.org/wiki/Statistical_hypothesis_testing">statistical hypothesis testing</a>, the <strong>alternative hypothesis</strong> is a position that states something is happening, a new theory is preferred instead of an old one (<a href="https://en.wikipedia.org/wiki/Null_hypothesis">null hypothesis</a>).</p><p>For our present study, the alternative hypothesis states that there indeed is<strong> </strong>a<strong> positive correlation </strong>between<strong> AR complexity and Flaring Activity.</strong></p><p>It is this hypothesis that gets proved if we can successfully disregard the Null Hypothesis</p><p>I take a statistical approach to determine if the complexity indeed does correlate to Solar Flare Activity.</p><h3>p-Value</h3><p>In <a href="https://en.wikipedia.org/wiki/Statistical_hypothesis_testing">statistical hypothesis testing</a>, the <strong><em>p</em>-value </strong>or <strong>probability value</strong> is the best probability of obtaining test results at least as extreme as the <a href="https://en.wikipedia.org/wiki/Realization_(probability)">results actually observed</a>, assuming that the <a href="https://en.wikipedia.org/wiki/Null_hypothesis">null hypothesis</a> is correct. A very small <em>p</em>-value means that the observed <a href="https://en.wikipedia.org/wiki/Outcome_(probability)">outcome</a> is possible but not very likely under the null hypothesis, even under the best explanation which is possible under that hypothesis.<br>A smaller p-value would indicate that the Alternative Hypothesis is more likely than the Null Hypothesis. A small p-value is necessary but not sufficient to disregard the Null Hypothesis.</p><p>The task at hand, thus, is to find the correlation between the AR complexity and the Flaring Activity, should any exist, and to find the p-value for the correlation.</p><h4>To calculate the correlation and the associated p-value,</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2e5b9911891a95b71ac8552bf4a33585/href">https://medium.com/media/2e5b9911891a95b71ac8552bf4a33585/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9edb4aec3096ee9f1e50d2f69850bc4d/href">https://medium.com/media/9edb4aec3096ee9f1e50d2f69850bc4d/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/80c3c7f9805376f4fdfb9a6cc1c377bb/href">https://medium.com/media/80c3c7f9805376f4fdfb9a6cc1c377bb/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a13636850986a3fbebbf8db3c25da0bd/href">https://medium.com/media/a13636850986a3fbebbf8db3c25da0bd/href</a></iframe><p>Now that we have the DataFrames, we move on to use Point-Biserial Correlation.</p><h3>Point-Biserial Correlation</h3><p>A point-biserial correlation is used to measure the strength and direction of the association that exists between one continuous variable and one dichotomous variable. It is a special case of the Pearson’s product-moment correlation, which is applied when you have two continuous variables, whereas in this case one of the variables is measured on a dichotomous scale.</p><h3>Assumptions for using Point-Biserial Correlation</h3><h4>Assumption 1</h4><blockquote>One of the two variables should be measured on a continuous scale. In this analysis, the <strong>Complexity</strong> is continuous.</blockquote><h4>Assumption 2</h4><blockquote>The other variable should be dichotomous. In this analysis, the whether an AR <strong>flares</strong> is dichotomous, <strong><em>0</em></strong> denoting no flaring and <strong><em>1</em></strong> denoting flaring.</blockquote><h4>Assumption 3</h4><blockquote>The continuous variable should have equal variances for each category of the dichotomous variable.</blockquote><h4>Assumption 4</h4><blockquote>There should be no outliers for the continuous variable for each category of the dichotomous variable.</blockquote><h4>Assumption 5</h4><blockquote>The continuous variable should be approximately normally distributed for each category of the dichotomous variable.</blockquote><p>Having already satisfied assumptions 1 and 2,</p><h4>For Assumption 3</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ef13a7a8d2ae7170f901d2653794b912/href">https://medium.com/media/ef13a7a8d2ae7170f901d2653794b912/href</a></iframe><h4>Thus Assumption 3 holds.</h4><blockquote>Continuous variable in both positive and negative classes has equal variance.</blockquote><h4>For Assumption 4</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/42d552cf02963d648621c29a8ee0c652/href">https://medium.com/media/42d552cf02963d648621c29a8ee0c652/href</a></iframe><p>This script gives the following two plots:</p><p>In both plots <strong><em>1 </em></strong>denotes that a flare has been observed and<strong><em> 0 </em></strong>denotes no flaring activity is observed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*5qHyB09_s4XL75Q9TrnLAw.png" /><figcaption>Box plot</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*KEp3Tx0v27ftK46duSSFfw.png" /><figcaption>Violin Plot</figcaption></figure><blockquote>These plots show some outliers. For the current analysis, it is assumed that the outliers do not affect the correlation significantly. It is of interest to see the quantitative effect that the outliers have on the overall forecasting.</blockquote><h4>For Assumption 5</h4><h4>Plotting the distribution of positive and negative classes</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b4c3a28d823e308a396667756e76a167/href">https://medium.com/media/b4c3a28d823e308a396667756e76a167/href</a></iframe><p>Which gives,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/990/1*OxNolvY3nxrDCA9XqWbUGQ.png" /><figcaption>Distribution plots for both classes</figcaption></figure><blockquote>From the distribution plots, the distribution of the normalized complexity in the negative and positive classes can be considered Gaussian.</blockquote><h4>Thus Assumption 5 holds.</h4><h3>Point-Biserial Correlation</h3><p>Since all the assumptions are satisfied, we move on to the actual correlation.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4a0e4ec72ca37503044c4a6fd141e54a/href">https://medium.com/media/4a0e4ec72ca37503044c4a6fd141e54a/href</a></iframe><p>Thus,</p><blockquote>The Point-Biserial Correlation shows a moderate positive correlation between AR complexity and Flare Production.</blockquote><p>The moderate positive correlation of 0.45 indicates that there indeed exists a positive relationship between AR complexity and Flare activity.</p><p>Although the negligible <strong>p-value </strong>of<strong> </strong>0.0<strong> </strong>is necessary to disregard the the Null Hypothesis, it is not sufficient.</p><p>My mentors and I are devising a strategy to firmly establish the<strong> alternative hypothesis.</strong></p><p>This post marks the end of the first month of my GSoC journey, and my oh my what a month it has been!<br>I am used to working long hours but somehow working on Pythia always makes these long hours pass me by in minutes.</p><p>July brings with it, Deep Learning. The next month will be the most fun as I get to play around with neural networks and actually work on forecasting flares!<br>I just hope the gods that govern CUDA and PyTorch are benevolent and do not curse me with exploding gradients.</p><p><strong>:)</strong></p><p><em>References </em>: <br>1) <a href="https://www.scientificamerican.com/citizen-science/zooniverse-sunspotter/"><em>On Sunspotter</em></a></p><p>3) <a href="https://en.wikipedia.org/wiki/Statistical_inference"><em>Statistical Inference and related sub topics</em></a></p><p>3) <a href="https://statistics.laerd.com/spss-tutorials/point-biserial-correlation-using-spss-statistics.php"><em>Point-Biserial correlation</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd46de0863f6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/chapter-2-inquisition-dd46de0863f6">Chapter 2: Inquisition</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[Chapter 1: Apricity]]></title>
            <link>https://medium.com/swlh/chapter-1-apricity-aef3bd172dab?source=rss-9fa6f618876c------2</link>
            <guid isPermaLink="false">https://medium.com/p/aef3bd172dab</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[openastronomy]]></category>
            <category><![CDATA[sunpy]]></category>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[gsoc-2020]]></category>
            <dc:creator><![CDATA[Raahul Singh]]></dc:creator>
            <pubDate>Mon, 15 Jun 2020 00:26:29 GMT</pubDate>
            <atom:updated>2020-06-16T20:17:21.732Z</atom:updated>
            <content:encoded><![CDATA[<h4>An endeavour to better understand our Sun’s choleric disposition</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*tAMsUBRSvq7pUUyMNRAEuQ.jpeg" /><figcaption><strong>The Bhagirathi Massif</strong>. The mountain is named after <a href="https://en.wikipedia.org/wiki/Bhagiratha">Bhagiratha</a>, the legendary king of the Ikshvaku dynasty who brought the River Ganges, to Earth from the heavens. It symbolizes the flow of divine knowledge, or the knowledge of liberation (Ganga), into human consciousness (earth) by the grace of God (Shiva) and the austere efforts of enlightened masters (Bhagiratha).</figcaption></figure><blockquote><strong>ॐ भूर् भुवः स्वः।</strong></blockquote><blockquote><strong>तत्सवितुर्वरेण्यं भर्गो॑ देवस्य धीमहि।</strong></blockquote><blockquote><strong>धियो यो नः प्रचोदयात् ॥</strong></blockquote><p>There is some beauty in the fact that the essence of my undertaking needs not more than 24 letters of explanation.</p><p>What I have written above in the <a href="https://en.wikipedia.org/wiki/Devanagari">Devanagari</a> script is one of the most important and highly revered Vedic hymns, the Gayatri Mantra. As translated by <a href="https://en.wikipedia.org/wiki/S._Radhakrishnan">Dr S. Radhakrishnan,</a> it states,</p><blockquote>“We meditate on the effulgent glory of the divine Light; may he inspire our understanding.’’</blockquote><p>The goal of my project is to study solar flares. The effulgent glory, the flares, that the divine Light, our Sun, produces. I shall meditate on them over the summer and better my understanding and appreciation of the mechanisms that govern them.</p><p>I shall also dare to predict them.</p><p>And there you have it,<br><strong>Solar Weather Forecasting using linear algebra.</strong></p><h3><em>The Dataset</em></h3><p>When thinking about flares, you may imagine something like this :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*YC4dFQkU03gCMsuZI36RfA.jpeg" /><figcaption>On August 31, 2012, a long prominence/filament of solar material that had been hovering in the Sun’s atmosphere, the corona, erupted out into space at 4:36 p.m. EDT. Seen here from the <a href="https://en.wikipedia.org/wiki/Solar_Dynamics_Observatory">Solar Dynamics Observatory</a>, the flare caused auroras to be seen on Earth on September 3.</figcaption></figure><p>Flares indeed are mesmerizing. <br>To analyze the properties of flares, we must understand what flares are.</p><p>A <a href="https://hesperia.gsfc.nasa.gov/sftheory/glossary.htm#FLARE">solar flare</a> occurs when magnetic energy that has built up in the <a href="https://hesperia.gsfc.nasa.gov/sftheory/glossary.htm#SOLAR_ATMOSPHERE">solar atmosphere</a> is suddenly released. <a href="https://hesperia.gsfc.nasa.gov/sftheory/glossary.htm#ELECTROMAGNETIC_RADIATION">Radiation</a> is emitted across virtually the entire <a href="https://hesperia.gsfc.nasa.gov/sftheory/glossary.htm#ELECTROMAGNETIC_SPECTRUM">electromagnetic spectrum</a>, from radio waves at the long <a href="https://hesperia.gsfc.nasa.gov/sftheory/glossary.htm#WAVELENGTH">wavelength</a> end, through <a href="https://hesperia.gsfc.nasa.gov/sftheory/glossary.htm#OPTICAL">optical</a> emission to <a href="https://hesperia.gsfc.nasa.gov/sftheory/glossary.htm#X_RAY">x-rays</a> and <a href="https://hesperia.gsfc.nasa.gov/sftheory/glossary.htm#GAMMA_RAY">gamma rays</a> at the short wavelength end. The amount of energy released is the equivalent of millions of 100-<a href="https://hesperia.gsfc.nasa.gov/sftheory/glossary.htm#MEGATON">megaton</a> hydrogen bombs exploding at the same time!</p><p>These flares emanate from active regions (ARs) in which high magnetic non-potentiality resides in a wide variety of forms.</p><p><strong>Active regions</strong> on the Sun are places where the Sun’s magnetic field is disturbed. These <strong>regions</strong> frequently spawn various types of <strong>solar</strong> <strong>activity</strong>, including explosive “<strong>solar</strong> <strong>storms</strong>” such as <strong>solar</strong> <strong>flares</strong> and coronal mass ejections (<strong>CME</strong>).</p><p>What you see below, is a full disk Line of Sight (LOS) Magnetogram, which is an image of the sun’s magnetic field in the line of sight of the observer.</p><p>The data used in this project comes from <a href="https://www.sunspotter.org/">Sunspotter,</a> which is a dataset of such magnetograms with some measured properties for each Active Region.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oegoLxwR316N4RUuqfKoVw.png" /><figcaption>A full disk Magnetogram</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*MNeHF04MLtDXL_0U0D15uw.jpeg" /><figcaption>An Active Region</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*zH_kdPqd0HymM1j94CRjMg.jpeg" /><figcaption>Another Active Region</figcaption></figure><p><a href="https://www.sunspotter.org/">Sunspotter</a> is a citizen science project that asked volunteers to classify solar active regions by their complexity — as it’s believed complexity has a direct relationship with their activity. With more than 25,000 volunteers and millions of classifications produced, we’ve got a <a href="https://zenodo.org/record/1478972#.XI4YPqHgqr8">very nice dataset</a>. The images used come from the <a href="http://soi.stanford.edu/science/obs_prog.html">MDI instrument</a>, which is onboard of <a href="https://en.wikipedia.org/wiki/Solar_and_Heliospheric_Observatory">SOHO</a> — the NASA-ESA mission that’s been observing the sun for more than two decades.</p><p>All of the Active Region observations have a corresponding image, like the ones you see here.</p><p>The dataset is composed of five files:</p><ul><li><strong>lookup_timesfits.csv</strong>: lists the filenames and the date of the data acquisition.</li><li><strong>lookup_properties.csv</strong>: lists the properties of the active region observed in each frame to be classified.</li><li><strong>classifications.csv</strong>: lists each classification made by the volunteers.</li><li><strong>rankings.csv</strong>: lists the final ranking on complexity.</li></ul><p>The score provided on the rankings file follows the <a href="https://en.wikipedia.org/wiki/Elo_rating_system">Elo rating system</a>.</p><p>I have <a href="https://github.com/Raahul-Singh/pythia/pull/26">recreated the ELO rating algorithm in python</a>, to reassign complexity score to the Active Regions. This gives us better control over the range of values, which in turn can be tuned to match the sensitivity of the forecasting model.</p><h3>Apollo’s chosen one</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/345/1*OQvcPJAalRluEumfTTZwcA.jpeg" /><figcaption><em>Priestess of Delphi</em> (1891) by <a href="https://en.wikipedia.org/wiki/John_Collier_(Pre-Raphaelite_painter)">John Collier</a>, showing the Pythia sitting on a tripod with vapour rising from a crack in the earth beneath her</figcaption></figure><p>Apollo, the Greek god of the Sun, was also the god of prophecies. It is said that when Apollo wished to speak to the mortals, he would speak through his chief priestess, the Oracle of Delphi. She, who alone could understand Apollo’s whims and fancies. The High priestess, <a href="https://en.wikipedia.org/wiki/Pythia"><strong><em>Pythia</em></strong></a><strong><em>.</em></strong></p><p>In reverence, I have thus decided to name the repository that holds the code for this project, <a href="https://github.com/Raahul-Singh/pythia"><strong>Pythia</strong></a><strong>.</strong></p><p><strong>Pythia</strong>, <strong>for Solar Active Region Data Analysis.</strong><br>Although we have just started, there is a lot you can do with Pythia already.</p><p>To install Pythia, for now, run the following command:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/43055aa62917cd54a819f498174ce0f5/href">https://medium.com/media/43055aa62917cd54a819f498174ce0f5/href</a></iframe><p>Some of the functionalities that Pythia offers, as of writing this post are:</p><p>Using Pythia, you can get the measured properties of any AR in the Sunspotter dataset. This is done using <a href="https://docs.sunpy.org/en/stable/guide/acquiring_data/hek.html">SunPy’s HEK </a>module. This is the function description.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/339c9dc8054c807970ce6a1823d0e284/href">https://medium.com/media/339c9dc8054c807970ce6a1823d0e284/href</a></iframe><p>You can also download the full disk MDI magnetograms. This uses <a href="https://docs.sunpy.org/en/stable/guide/acquiring_data/fido.html">SunPy’s FIDO</a> module to get the magnetogram as a FITS file. The following function returns an <a href="https://docs.sunpy.org/en/stable/guide/data_types/maps.html">MDI map</a> for a given observation date. Should the observation date not be in the Sunspotter dataset CSV files currently loaded in the Sunspotter object, the observation date nearest to the given observation date is used.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c19b389e053b71b99ada4301c317e5b1/href">https://medium.com/media/c19b389e053b71b99ada4301c317e5b1/href</a></iframe><p>Should you wish for all the maps in a given range, you can use:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/501b65fb40960a2b1af47fbaa1d36962/href">https://medium.com/media/501b65fb40960a2b1af47fbaa1d36962/href</a></iframe><p>Finally, if you wish to plot all the ARs on a full disk magnetogram for which we have data, for any observation date,</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/83603bbd1bd1805d5c0885e08143e66b/href">https://medium.com/media/83603bbd1bd1805d5c0885e08143e66b/href</a></iframe><p>Which, when used for observation date <strong>2002–03–18 09:39:01 </strong>gets you the following plot. I have magnified it to highlight the fact that Active Regions come in all shapes and sizes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TyCM1QtLG2yYXXiToq6eZQ.png" /><figcaption>ARs Plotted on an MDI map</figcaption></figure><p>What I have given is a brief introduction of the project, along with some code examples. Pythia is in active development and there are modules which I have not mentioned here. I encourage my readers to install Pythia and play around with the code!</p><p>If you find any bugs or would like me to add any features, feel free to <a href="https://github.com/Raahul-Singh/pythia/issues">open an issue on the main repository</a>.</p><p>My next post will be all about the Exploratory Data Analysis of the Sunspotter data, where we shall delve deep into the Sunspotter dataset.</p><p>Till then,</p><p><strong><em>Divina Luceit Vos!</em></strong></p><p><strong><em>:)</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aef3bd172dab" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/chapter-1-apricity-aef3bd172dab">Chapter 1: Apricity</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[Chapter 0: The Prelude]]></title>
            <link>https://medium.com/swlh/chapter-0-the-prelude-320751d2e61e?source=rss-9fa6f618876c------2</link>
            <guid isPermaLink="false">https://medium.com/p/320751d2e61e</guid>
            <category><![CDATA[gsoc-2020]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[sunpy]]></category>
            <category><![CDATA[openastronomy]]></category>
            <category><![CDATA[gsoc]]></category>
            <dc:creator><![CDATA[Raahul Singh]]></dc:creator>
            <pubDate>Tue, 12 May 2020 05:54:46 GMT</pubDate>
            <atom:updated>2020-05-12T05:54:46.429Z</atom:updated>
            <cc:license>https://creativecommons.org/publicdomain/mark/1.0/</cc:license>
            <content:encoded><![CDATA[<h4>Getting selected for Google Summer of Code 2020 @ SunPy (OpenAstronomy)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2ZB6NauqjUa8o_XSQ0um_g.jpeg" /><figcaption>Dawn over the Annapurna. The mountain is named after <a href="https://en.wikipedia.org/wiki/Annapurna_(goddess)">Annapurna</a>, the Hindu goddess of food and nourishment, who is said to reside there. The name Annapurna is derived from the <a href="https://en.wikipedia.org/wiki/Sanskrit">Sanskrit</a>-language words <em>purna</em> (“filled”) and <em>anna</em> (“food”), and can be translated as “everlasting food”, which also symbolizes <strong>contentment</strong></figcaption></figure><h3><strong>An Ode to the Sun</strong></h3><p>I don’t remember much of my childhood. I mean, most of us don’t, but I have a particularly poor memory. <br>One of the earliest memories that I do remember, however, is my mom getting me this thin blue picture book from the Sunday flea market.</p><p>There was this strange orange-yellow orb on the cover that got my attention.</p><p>“<em>Our Sun</em>”.</p><p>To my seven-year-old self, the book didn’t make sense. The sun was supposed to be a big ball of fire in the sky. I think we had an agreement over this. Now, what do you mean by this <em>fusion-fission </em>jargon? And what in the world are nuclei? More importantly, how am I supposed to pronounce this word in the first place ?! We must excuse seven-year-old me for this aberration.</p><p>To my mom’s credit, she simply asked me to read more. To the thin blue book’s credit, it simply said that nuclei were like bricks but really really really small. They made up the sun.</p><p>“<em>So far so good.</em>”</p><p>Fission was breaking these bricks, Fusion was joining them.</p><p>“<em>Hmmm, cool, if you say so.</em>”</p><p>Like when a firecracker explodes, it produces energy, fission does so too!<br>* <em>Imagines Diwali fireworks</em> * “<em>Yep. This ain’t that difficult to wrap my head around.</em>”</p><p>Oh, and by the way, in Fusion you get these bricks together real real close it produces more energy apparently. *Chapter ends*</p><p>“<em>But Firecrackers, when mushed together, don’t explode! This makes no sense!</em>”</p><p>It’ll be years before I would finally understand nuclear fusion in all its magnificent glory. I say years because it hasn’t happened as of yet. :)</p><p>This is one of my fondest memories. All those summer days I spent reading encyclopedias; all those science projects; reading about plants eating the sun through this process called photosynthesis and instantly being enamoured by biology; reading about glucose (that sweet sweet molecule) and being fascinated by chemistry (though chemistry would later haunt my high school years); learning that math could serve as a bridge between all these seemingly unrelated ideas. And the ecstasy. Oh lord, that dopamine rush when you finally understood a concept!<br>All of it started on a cosy Sunday afternoon with that thin blue book about the sun.</p><p>Fast forward a few years, now in my sophomore year pursuing a Bachelor of Tech in Computer Science and Engineering, I am a nervous kid who thinks he knows nothing. I mean take away stack overflow and what am I but a pretender? Surrounded by tech overlords conversing in bash commands where I struggle with C pointers. : )</p><p>I got to know about GSoC from my seniors (my college has a pretty cool GSoC participation culture) and I decided this was it. This would be my tech redemption saga!</p><p>All I needed now was an Org. <br>And to get over my dread of open source and imposter syndrome. Yeah.</p><p>And here my struggle began (continued, formalized?). I couldn’t understand **any** codebase. In retrospect, mostly because I felt that a mere mortal wasn’t competent enough to understand this holy cypher written by them tech titans. I tried at least ten different orgs. Lurked in their chats, texted so many people asking for guidance. Never actually implementing any of their suggestions though.</p><p>After a few months of going nowhere and on the brink of convincing myself that GSoC wasn’t gonna happen this year, I happen to find myself on the Python Software Foundation’s GSoC site.</p><p>“<em>Friends of the PSF: OpenAstronomy </em>”</p><p>Hmm, seems interesting….</p><p>SunPy, for Solar Physics. Might as well check out its good first issues. Some docstring fixes about sorting something by dates, which I somehow understood. I go to my friend’s room, nervously asking him about making PRs (Because I was too dumb not to learn<em> git </em>beforehand), git commands and stuff.<br>And just like it, magic happened. I made my first real PR!</p><p>It didn’t solve the issue and the maintainers had to make suggestions in the comments, effectively solving the issue themselves. But it was my PR! I made this! And so, in December 2019, the sun, which got me started in STEM in the first place, came back in my life when I needed it the most. SunPy took me in with open arms. Whatever I do in my professional life in the future, whatever I make, whatever I achieve, it would be because of the guidance given by and more importantly the kindness shown by, the SunPy community to that novice, hacking away at sorting by dates.</p><p>Five months later, I can’t fathom how much I’ve grown. From a kid too scared to read code, lest he is confronted by his incompetence and inability to understand it, to actually founding my own organization for wildfire data analysis! More on that, sometime else :)</p><p>Google Summer of Code, with all the prestige and praise it gets me, would be the first major milestone in my professional life. But that doesn’t matter. SunPy has already given me so much.<br>Skills, a loving community, a sense of purpose and most importantly, confidence and peace of mind.</p><p>Looking back, I can’t describe what rush of excitement I felt as I clicked on that green button asking me if I wanted to make that PR.<br>I do know what went through my mind right after I clicked on it though.</p><p>Sheer Panic.<br>“<strong><em>sunpy-bot</em></strong>, what in the world is a changelog and what do you mean this PR doesn’t have it? Oh Lord, did I break something already?”</p><p>:)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=320751d2e61e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/chapter-0-the-prelude-320751d2e61e">Chapter 0: The Prelude</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>
    </channel>
</rss>