Tuesday, July 14, 2015

Dark Side of a Planet

This is a long one, folks, but hold in there. I think it's one of my best yet. 

Since I declared Astrophysics as my major a year and a half ago, my friends seem to have delegated it to one of my primary defining characteristics.  "Do you know Moiya?"  "Oh yeah, she studies astrophysics, right?"  I'm okay with this.  One, there are weeks when I spend more time at the Center for Astrophysics than I do in my own room, so I can't deny that my life pretty much revolves around the subject.  Two, I absolutely love talking to people about astronomy.

My friends know this, so they ask me a lot of questions about the universe.  Sometimes, their questions are very specific: "What do they mean when they say the universe is expanding?"  But most of the time, their questions aren't really questions at all, but requests to hear something, anything, about astronomy.  Because of this, I've developed a sort of astro fact kitty that I keep in my back pocket at all times.  One of my favorite facts to pull out is: The moon is tidally locked with the Earth, which means that the time it takes the moon to rotate is exactly the same as the time it takes to revolve around Earth, so that we always see the same side of it. 


"Tidal locking of the Moon with the Earth" by Stigmatella aurantiaca - Own work. Licensed under CC BY-SA 3.0 via Wikimedia Commons - https://commons.wikimedia.org/wiki/File:Tidal_locking_of_the_Moon_with_the_Earth.gif#/media/File:Tidal_locking_of_the_Moon_with_the_Earth.gif

I love this fact because it's quick, relatively simple, and I spent a week last year learning about the science and math that explains itBut I never thought much about the broader applications of this knowledge.  In my mind, the moon was tidally locked with the Earth and that was it.  But my mind was wrong, because all sorts of things get tidally locked, including planets!

One question you might have at this point (especially if you didn't follow the link above) is:  How does tidal locking work? 

If you want a really in-depth answer, I'm here to tell you that Google is your friend.  If a more qualitative answer will suffice, Googling isn't necessary.

Say you have two massive bodies in space, A and B, where A is much more massive than B.  The gravitational force from A literally changes the shape of B, forcing it to elongate, or bulge, along the axis that points towards A.  So, instead of looking like a basketball, planet B now looks more like a rugby ball.

Image result for basketball        Image result for rugby ball black background

Before B is tidally locked to A (B's rotation speed does not yet match its orbital speed), that bulge travels around B.  Depending on the relationship between the rotational and orbital periods (which one is longer than the other), the bulge will lag behind the planet in its orbit or point in front of it.  This asymmetrical bulge creates all kinds of messy forces, which act on the system until the bulge faces planet A, thus tidally locking B to A.


Cool. Now you (hopefully) have a better understanding of how tidal locking works.  But that's not really the point of this blog post. The point is to explore what it would be like to live on a planet that was tidally locked to its star. (Just the scientific implications, because, as a student of mythology, I could go on an on about the mythological and cultural implications of having one side of a planet in perpetual light and the other in perpetual darkness.)

I'm going to try to do some math later, so let's make some assumptions about this tidally locked system.
  1. The planet is about 1/10th the size of Earth:  \(R_P = 6.4\times10^6 m\)
  2. The planet's atmosphere is made of mostly oxygen.
  3. The star around which that planet orbits is roughly the same size and temperature as our Sun:  \(R_{sun} = 7\times10^8 m\) , \(T_{sun} = 5800K\)

The way I understand it, there are two possible outcomes.

In the first, the planet rests right on the edge of the space where oxygen freezes:

$T_P^4 = \frac{T_*^4R_*^2}{4a^2} \Rightarrow a = \sqrt{\frac{T_*^4R_*^2}{4T_P^4}}$

This was found by setting the flux received by the planet from the star equal to the flux emitted by the planet. 

A quick Google search told me that oxygen freezes at \(\approx 50K\), so that's the temperature we'll use to find the distance, a, from the planet to its star. 

\(a_P \approx 10^{12} m\)
For reference, this is about 10 times farther than the Earth is from the Sun.

 Because it's just on the edge of oxygen's freezing point, the side of the planet that faces the star is almost frozen, and the side of the planet that faces away from it is frozen solid. Eventually, the ice would encroach upon the "warm" side and the entire atmosphere would become ice.  That would be the end of any life that could have possibly lived under such extreme conditions.

The second outcome is, at least for me, more exciting.  In this case, I want the planet to be close enough to its star that the whole planet would be warm enough to sustain life.  

When I was originally thinking about this, I toggled back and forth between thinking such a thing was possible and thinking the dark side would freeze no matter what.  I had memories that backed up both theories. I remembered reading about a deep, deep crevice on earth that was colder than the coldest places on the moon because it never received any sunlight, and I remembered spending summer afternoons sitting in shady spots that never really felt cooler than the sunny spots a few feet away.  Eventually, the memories of lazy summer days won, but I needed to back that intuition up with science.

To do this, I needed to revisit my old friend (when I say "friend," I really mean "bane of my existence") from a class on partial differential equations, the Heat Equation.  This equation, intuitively enough, can be used to describe the distribution of heat in an area over time.  Sounds pretty perfect for what I'm doing.  I recognize that this might be giving some people flashbacks to traumatic physics class experiences, so I won't treat this as a rigorous physics problem, but will instead do some mostly qualitative assessments.

We can project the sphere of a planet onto 2 dimensions because we're concerned with the distribution of heat over its surface.

Image result for projecting a sphere onto a plane 

This projection becomes an oval, and it's fairly simple to solve the heat equation over a plane.  

$T_t = c^2\left ( \frac{\delta^2 T}{\delta x^2} + \frac{\delta^2 T}{\delta y^2}\right )$

where c is determined by the initial conditions, which are just how much flux the bright side of the planet is receiving.  Now that I have all of the equations, all I need to do is set my boundary conditions (an acceptable range of temperatures, say \(275K < T_P <320K\) that can sustain life) and I can solve for the right set of initial conditions.  Yay!  

Okay, now we know how the math behind creating a habitable, tidally locked planet would work.  But how would that manifest itself physically? In other words, what must the physical characteristics of this planet be in order to maintain a reasonably uniform temperature? 
  • The planet has to have a lot of liquid (maybe water).  
    • Those of you who use water to heat your home know that it's a really efficient way of transporting and re-radiating heat.
  • There has to be some way to trap the heat in. 
    • This could be like our Greenhouse Gas Effect, which uses Carbon Dioxide and other gases to trap the heat within our atmosphere. 
      • If there's a Greenhouse Gas Effect, it means there has to be something producing that much greenhouse gas, which likely points to life existing on the planet! 
  • There has to be some internal heat source.

I don't quite know what the implications are of all this yet; I just thought it was fun and cool to think about. Do with this what you will  :)  

Sunday, July 12, 2015

If I'm a Bitch, You're a Bitch

Warning: there is some (more) profane language ahead.  

Last Friday, Prof. Brittney Cooper, professor of Women & Gender Studies and African American Studies at Rutgers University, came to talk to the Banneker Institute.  She was asked to talk about intersectional feminism, and though the things she talked about weren't necessarily new to me, it did remind me of a discussion I had with some of the other Banneker students the week before.

First, for those not hip with the social justice lingo, I'll define intersectional feminism.

"Intersectionality" is a phrase coined by black women like Kimberle Crenshaw and Audre Lorde in the second half of the 20th century.  It is a concept that refers to the fact that different people experience different types of oppression based on their various traditionally-discriminated-against identities.  For example, a White Gay Man and a Straight Black Woman each experience their own complicated forms of oppression.

"Intersectional feminism" (as I understand it) is the idea that, in order to be a feminist -- someone who seeks to establish equal rights for men and women -- one cannot ignore intersectionality.  Being a feminist means gaining equality for all women -- black, latina, gay, trans* -- so to be a feminist is to be an advocator for all of these marginalized groups.

Okay, definition time is (probably) over.  Now let's talk about that discussion I had with the other students.

I don't remember how we ended up talking about this, but, during our lunch break, we were talking about what words are appropriate to say and when and who is allowed to say them.  More specifically, we were talking about the use of the word "bitch." 

One of the male students announced that most women don't mind when gay men call them a bitch.  Let's unpack this and talk about what's wrong with that statement.

First, I'd like to point out that it was a man who decided to speak for the women in the room about how women feel when they're called a certain name.  Men, it is never okay to tell a woman how she should feel about something.

Second, what is the difference between a gay man calling a woman a bitch and a straight man calling a woman a bitch?  Absolutely nothing.  This statement was made based on a widespread idea that gay men and women share a special bond, that one (women) fully embraces the other (gay men) as one of their own.  Where did this idea come from? Well, it likely came from the media.  Shows like Will & Grace and Sex & the City and movies like Mean Girls and Clueless all show the "gay guy best friend" dynamic.  This trope has invaded our culture so much so that even I grew up wondering when I would find my GGBF.

But what do all of those shows and movies have in common? Oh yeah, everyone's white.  I would absolutely LOVE it if anyone could tell me about a well-known show or movie where the GGBF trope was used with two black characters, But I don't think you'll be able to find many.  Do you know why? Because you can have a white gay guy on a TV show, and you can have a straight white woman.  (Hell, you can even have a white lesbian, but she would serve a totally different purpose than the GGBF.)  But you can't have a black gay dude or a black lesbian or a black woman without turning them into caricatures, because that would just be too much otherness.

The point of that rant is that we've been conditioned to think that white gay men and white women inherently go together and that they share equal social footing.  The GGBF can call a woman a bitch and it's okay, because he's just one of the girls.  No.  A gay man is not the same thing as a woman.  Saying so just reduces a gay man to his stereotypical femininity and reduces the woman to her interest in men.

My response in the moment, because saying all of that would have taken too long, was "My reaction to being called a 'bitch' depends first and foremost on the person's intention and then on my relationship with that person."

Thinking we were done with the topic, I turned back to my soup.  But I was wrong.  That same student told the room that he would never react well to someone calling him a bitch.

I tried, readers, I really, really tried not to say anything, but I couldn't let it go.  I had to ask him why.

His response: "Because a bitch is what you call a female dog, and I'm not a dog."

I didn't quite believe that this was the whole reason, so I asked which was worse, being called a bitch or being called a dick?  I don't remember how he answered, but this is an important place to stop and unpack the situation.

As a man, no regardless of the circumstances, he would be offended if someone called him a bitch.  Could it be because the word is so deeply associated with women?  Would he have the same strong reaction if someone called him a whore, which is also almost exclusively used to refer to women?  What about any of the other tens of words that are used as derogatory terms for women, as opposed to the handful of male-specific phrases?

All of this points toward one thing that I wish we had spent more time discussing on Friday with Professor Cooper: the Patriarchy.

I recognize that this is kind of a buzzword.  It's been thrown around so much in the past few years that it's started to lose its meaning for some people, and for others, it's become a joke to use when talking about man-hating, bra-burning feminists.  But it needed to be overused, because the Patriarchy over-exists.

How do you know it's there?  You can tell because the only time women and men are put in the same group is when that man is gay, and therefore considered by many to be "less of a man."  You can see it in the fact that the number of derogatory slang terms for women is literally orders of magnitude higher than the number of exclusively negative slang terms for men.  I see it every time I or one of my friends get catcalled on the street.  It's there every time one of my male colleagues/peers thinks he needs to explain simple concepts to me.  It's in so many places that I would run out of allotted characters in this blog post if I tried to name them all.

I don't know how to take down the Patriarchy any more than I know how to end racism.  But I know that the first step is getting everyone to recognize that it exists.  Maybe blog posts like this are the answer.  Or maybe it's funny, culturally relevant videos.


Whatever it is, I hope we find it soon, because I'm pretty damn tired of this. 

Thursday, July 9, 2015

You Are Here

I grew up without TV or siblings, so I spent most of my time as a child playing in the woods and reading Trixie Belden books (it's like Nancy Drew, but she's way more tomboy-ish and the mysteries are way more interesting).  This means that I've read a lot of books that most people have never heard of, which is pretty cool.  But it also means that I am seriously behind on my Disney/Pixar game.

Snow White, Cars, The Little Mermaid, Monsters University, Sleeping Beauty, A Bug's Life.  Haven't seen any of them.  One of the other Banneker students, Ana Colon, learned my secret and made it her goal to educate me in the ways of Pixar films. Her lessons started two nights ago with Toy Story.

Toy Story is a great movie. (I can say that now, because I've actually seen it.)  But one thing bothered me.  Where do they live???  Do you know that scene where Andy's mom takes him to Pizza Planet? The one where Buzz and Woody get lost, which sets up the whole conflict of the movie?  Well, if you don't know what I'm talking about, I really can't judge you because two days ago I was right where you are now. But here's the scene I'm talking about:

 

I saw that scene two days ago and, being the astronomy nerd that I am, I couldn't stop wondering where the movie is set.  They never mention it in the movie, or at least I didn't notice any clues pointing toward the setting. (Neither did the super observant people who write buzzfeed articles about the things no one ever notices in movies.)  But LOOK AT ALL THOSE STARS!!!  

I figured I could use those stars (and other clues from the movie) to pinpoint a location for this movie that I'm told is a classic for my generation. 

My plan was to try and use common sense to find a place in the U.S. (the first of my basic assumptions) where you could see so many stars.  The very fact that you can see so many stars means that the movie is set in a place very far away from a major city.  I grew up in the middle of nowhere in Pennsylvania, and I couldn't even see that many stars, just because Pittsburgh was two hours away. 

Light pollution map of the U.S. from darksitefinder.com

What else can the stars tell us? 

Well, we know it's summer, because we never see Andy go to school.  We also know that days are longer in the summer, so stars come out later at night.  Let's make our second assumption and say that Andy's mother wouldn't take him and his sister to dinner any later than 7:30 PM.  This means that the time stamp in the picture above would be around 8 or 8:30.  In the summer, the sky is not dark enough at 8:30 to see that many stars.  

UNLESS you live in Arizona, where Daylight Savings Time doesn't exist.  Right now, I'm sitting in Cambridge, Massachusetts where it is \(\approx\)11:30 PM Eastern Time.  In Utah, it is currently \(\approx\)9:30 Mountain Standard Time and it's dark enough to see stars.  In Arizona, it is currently \(\approx\)8:30 Mountain Standard Time, and even though it's "earlier" there than it is in Utah, it's dark enough to see stars. 

Based on this (late-night) logic, I would be willing to bet that a) Toy Story is set in Arizona or b) Andy's mom has him and his sister on a messed up eating schedule. 

Also, you can't see any distant mountains in any outdoor scene in the movie, which tells us Andy and his family live far from any tall mountain ranges.  

All of this together tells me (and maybe tells you) that Toy Story 1 takes place in South or Southwestern Arizona.  


So there you have it!  With just a little bit of common sense and a picture of some stars, I was able to answer a question that's been bothering me for the last two days.  This is the power of astronomy.  



P.S.  To check myself, I also tried running the picture through this really awesome website called astrometry.net , but it didn't return any matches.  So now I "know" where the movie was set AND I know that the Toy Story animators just drew random points of light when they made this scene.  Yay science!!

Tuesday, July 7, 2015

Nemo me impune lacessit

So far this summer, this blog has been so serious!  If I didn't know anything about myself besides what I read in this blog, I would think I was really boring.  So this post is a story of something utterly ridiculous that happened to me last week.

A few of the other Banneker students and I were watching Game of Thrones (one of them had never watched it before!) when we heard a strange noise coming through the window. After a few minutes, we realized it was someone playing the bagpipes!  Like, seriously, who expects to hear someone casually playing the bagpipes on a Wednesday night? Not us, so we got pretty excited about it.

The sound stopped, and we still couldn't figure out where it was coming from, so we went back to watching GoT. Fifteen minutes later, it started up again.  This time, we were determined to find the source of the music. 

Ana, one of the other Banneker students, and I ran downstairs to the courtyard (I was in such a hurry to find this bagpiper that I didn't even put on shoes), where we saw another student yelling up at a window.  Breathless, Ana looked at him and screamed "Are you looking for the bagpipes, too?!?!"  He just stared at us, so we ran away. 

We walked around our dorm, trying to figure out where the bagpiper could possibly be hiding, and then we heard it again. We ran back to the courtyard and there he was.  Just walking around.  Playing the bagpipes like that's something everyone does on a Wednesday evening in a college dorm courtyard.  It was the same guy Ana had yelled at minutes earlier.  He looked at us and said "You found him."

Obviously, Ana and I needed a way to document this adventure, so she asked if we could take a selfie with him.  He looked confused, but said yes.


We left him, telling him that he should definitely keep playing.  I'm pretty sure he thought we were insane, but, I mean, we weren't the ones playing bagpipes for everyone in the dorm to hear.

He was playing again today.  We didn't run down to see him, but we sat and listened to his song. 

I still have no idea what it's supposed to be.  

Sunday, July 5, 2015

You Shall Not Pass!

This post isn't going to be scientific. It's not going to be about some revelation I had, or about my new-found interest in racial social justice. It's basically just going to be me whining about things.

I'm blocked. I have three or four different projects going on right now and I can't seem to move forward on any of them.

I tried to read up on radiative transfer modeling, but just ended up staring at my computer screen for an hour before I fell asleep.  I tried to work on some coding, but couldn't get my fingers to type anything. I tried to start work on my thesis and my mind was a total blank; no words would come to it.  It's like there's a little Gandalf inside my brain stopping me from moving anywhere.  I'm surprised I've been able to type anything in this blog post.

I guess all I can do is wait, because trying to force myself to produce results has already given me enough of a headache.

On the bright side, all of the sitting around I've done today gave me the chance to remember that I asked a riddle a few weeks ago, but never provided the answer like I promised I would. If any of you managed to solve it, congratulations!  I spent so long trying to figure it out before it drove me crazy and I had to ask my friend for the answer. If you didn't get it, don't feel bad. It's a doozy.  Anyway, here's the solution.  I know I asked about cubes, but cue balls work just as well.

Saturday, July 4, 2015

Tips for Wannabe Allies

Last night, I had my first experience calling someone out for making a racist comment.  I figured this was the perfect time to write my first social justist-motivated blog post.

First, I should explain what happened.

I'm at Harvard this summer to do astronomy research, which means the people I spend most of my time with are self-proclaimed astronomy nerds, so much so that we all wanted to hang out around a telescope at 1:00 AM on a Friday night.  We also all happen to identify as people of color. 

When we got to the door that leads to the telescope, a man in the next room immediately assumed we didn't have access (despite the fact that we were able to open the door) and told us we had to leave. We bypassed that situation and made it to the telescope, but some people wanted to talk about it more.

One member of the group said he thought that the man had assumed we didn't have access because most of us presented as people of color, and POCs aren't expected to belong in places like Harvard astronomical observatories. He also said he thought that some people in the group had automatically accepted this man as an authority figure because he presented as a white male.  Another member of the group (let's call him Shaun) said that was ridiculous. He had accepted the man as an authority figure because he spoke so confidently. 

There was some back and forth between the two, so I decided to jump in and try to end it. I told Shaun that
  1.  The man was able to speak so confidently because he was a white man and white men are made to feel comfortable in most predominantly white spaces.
  2. With knowledge of the white supremacy culture we live in today, it's safe to assume that many interactions like this one are racially motivated.
  3. Assuming that it was racially motivated, his reaction was a result of being brought up in a culture that assumes POCs don't belong in academic settings, as was Shaun's acceptance of this man's word as law. 
I've been reading up on this subject lately, thanks to the reading assignments we have as part of the Banneker Institute.  I've read that when people get called out for their actions, they often get defensive or angry, or they try to detour the conversation and distract the person who called them out.  But it's one thing to read about these tactics and another thing entirely to see them in action.

Shaun immediately jumped to defend himself and say he wasn't a racist.  In fact, according to him, he couldn't be a racist because he was a minority, too, and by saying that the man questioned us because we were POCs, we were being reverse racist.

That was when I lost most -if not all- of my respect for Shaun. But I still felt like I needed to turn this into a teachable moment (I'm actually awful at letting things go and allowing moments to pass without making them worse).  It's now been about 24 hours since the incident, so I don't remember exactly what was said, and even if I did I wouldn't transcribe it all here, but there was an argument that went on way longer than it needed to. 

By the end of the night, some people's feelings were hurt, at least one relationship was irreparably damaged, and everyone was frustrated.  All of this because one person couldn't distinguish between being told that his actions were borne of a racist culture and being called a racist.

So, I'd like to give the following advice to anyone who reads this post:
  1. If someone says that something you've said or done was offensive (whether it was racist, sexist, homophobic, etc.), recognize that they are not calling you a bad person. Instead of jumping to defend yourself, simply apologize, learn from your mistake, and move on.
  2. If you are in a position of power in a setting, or you pass for someone who traditionally holds a position of power, and someone from a marginalized group says they think they experienced prejudice, do not tell them they are wrong. If you don't understand the situation, ask them to explain it (but don't be upset if they say no, because it is not their responsibility to educate you). Otherwise, express sympathy, ask what you can do to make the situation better, or shut the hell up. 
  3. Do not use the term "reverse racism."  Ever. Like, seriously, that's just a dumb move.
If we lived in a perfectly logical world, I don't think these guidelines would be too hard to follow, but apparently we live in one where these are easier said than done.  But we can't expect it to get easier to do if we don't say it a lot, so let's spread them around and educate the Shauns of the world. 

Thursday, July 2, 2015

Data Fitting

Oh hai there, folks. This one's going to be super heavy on the statistics.  But this blog is supposed to be a record of what I do this summer, and I've spent at least 1/3 of my time this week learning and practicing statistics with a coding twist.  By the end of this blog post, hopefully you'll know more about statistics, too (or, at least a kind of stats that astronomers use a lot).

First, I'll say that for some background on the material covered in this post, you should check out this one.  It talks about sigma and normal distributions, which have been really integral to the work I've been doing this past week.

Now let's get to the new stuff.  I said it had a coding twist, which meant that I had to write Python (learn more about Python here) functions that took in a few input variables and returned useful values and plots. In this post, I'm going to describe those functions and maybe even a little bit of the frustration I felt while I was writing them.

The first function I wrote is used to generate data sets. It does this by returning the dependent values of a polynomial function of any degree. To make this work, the user has to input an array of independent variables (or x values) and the coefficients to each term in the function and they have the option of including a sigma value.  That all sounds kind of abstract, even to me, so let's use a concrete example.

Let's say you want to make fake data that follows the function \(y = x^2+4x-3\), and because you know from the "Sigmas" post that no measurement is perfect, you want to add some "noise" or uncertainty to that data.  Let's say that each measurement could be as much as 2 off from the "true" value.

To do this, the user would input an array of x values: 0, 2, 4, 6, 8, 10
and the coefficients for each term (in order of increasing degree): -3, 4, 1
and the sigma value: 2
and the function produces these y values: -2.380, 6.168, 28.457, 56.444, 94.166, 134.499


Yay! But now we have to actually use that data, which is what the other functions are for.

The second function  is used to calculate how well modeled data matches observed data. In statistics, this is known as the likelihood.  The function takes as input the data (either real or the set you generated using the first function), the array of x values you used, and coefficient values like you used before.

The function works by generating a list of \(\mu\)s using the x values and the coefficients. Those \(\mu\)s are then used in the following equation:

$ln(L) = -\frac{1}{2}\sum ln\left ( 2\pi\sigma_i^2 \right )-\frac{1}{2}\sum\left ( \frac{D_i-\mu_i}{\sigma_i} \right )^2$

Because there are sums, this function returns a single value that basically just tells you how close your model is to your observation. That value us used in the next function.

The third function is my favorite.  It was one of those things that wouldn't work for the loooooongest time, but once I figured it out and looked at it, it was almost embarrassingly simple. It takes as input the "observed" data you have, the x values, and arrays of values that you want to test for each coefficient.  For example, with the values above, I would test out arrays from [-4,-2], [3,5], and [0,2].  This way, it's guaranteed that when the function tests out all these different values, it will test out the true ones.

All it does is create a grid or cube where the axes are the arrays of coefficients you want to test and calculate the likelihood at each point.  By the end, if you make a contour plot of the final grid, you can literally see which coefficients have the highest likelihood of matching your observed data. If you put those coefficients through the first function, you end up with a line that claims to be the best fit to your observed data. It's so cool!  
But, with more than 3 coefficients (higher degree polynomials), you can probably imagine that the grid or cube will get really big and calculating the likelihood that many times would cost a lot of computer time.  Lucky for us, there's another, simpler, more mathematical way to find the best fit to the data.

 Thank you, Adventure Time, for expressing my exact feelings about times like this so well. 

The fourth function  is just a lot of matrix math. This isn't a math blog, so I'm not going to write it all out for you, but I'll give you the gist. 

The second term in the long equation above?  The bit after the summation symbol is Chi Squared (\(\chi ^2\)).  Chi Squared is really important to statisticians, but the most important thing I learned about it this week is that we want it to be minimized.  How do you minimize things in math? You take the derivative and you set it equal to 0.  So that's what we did.  We differentiated \(\chi ^2\) (with respect to the coefficients we're trying to find), translated the summation terms into matrices, and set it equal to 0. 

The function returns the best-fit values for the coefficients, just like the last one.  But this function can do polynomials of any degree and it's so much faster than the last. 


So, that was my week.  Well, that and a little bit of research, but I'll save those stories for another blog post.