Brought to you by Michael and Brian - take a Talk Python course or get Brian's pytest book


Transcript #234: The Astronomy-filled edition with Dr. Becky

Return to episode page view on github
Recorded on Wednesday, May 19, 2021.

00:00 Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds. This is episode 234, and it's May 19th, 2021. I'm Michael Kennedy.

00:11 And I'm Brian Okken.

00:12 And we have our special guest, Dr. Becky Smithers. Welcome.

00:15 Hi, I wasn't sure whether I was supposed to introduce myself then. I was like, should I jump in? Should I wait?

00:21 This is standard fare for our podcast. We do a bad job preparing our guests for jumping in. Welcome.

00:27 - It's a casual podcast, they're my favorite to listen to and they're now my favorite to be a part of as well.

00:32 - Yeah, absolutely.

00:34 Yeah, so it's really good to have you here and you're doing so many neat things out on the internet.

00:41 First of all, you're an astrophysicist at University of Oxford. - I am.

00:45 That is my day job, technically.

00:46 - Yeah, yeah, yeah.

00:47 You've written some books, you can tell folks about that.

00:51 You are doing quite a bunch of interesting things over on YouTube, which is how I came to know you.

01:00 Your work on YouTube is really neat.

01:01 And yeah, maybe just tell people real quickly about yourself.

01:05 - Yeah, sure.

01:06 So I'm an astrophysicist.

01:08 My day job is essentially to study supermassive black holes and figure out the effect that they have on their galaxies and how they might stop their galaxies from forming stars, which is kind of awesome.

01:19 I'm living the dream that I had as an eight-year-old to become like a natural space scientist.

01:25 And yeah, I just love talking about science and space with people as well.

01:28 And I've sort of found my niche a little bit on YouTube, really, that I can put out videos each week about fun things in space, or even react to old sci-fi and stuff like that about what they got right and what they got wrong necessarily.

01:40 And it's just a great platform to communicate with people and respond to people's questions that they've never been able to Google.

01:48 The tagline is your friendly neighborhood astrophysicist.

01:52 - Yeah, I absolutely recommend that people check out, why that doesn't work.

01:57 I absolutely recommend that people check out your YouTube channel, it is super neat.

02:01 And yeah, there's a ton of fun videos there.

02:04 There are very good sort of general science, just like interested in science, not scientists type of presentations.

02:11 So super cool, super cool.

02:13 All right, Brian, you got the first item, right?

02:14 You wanna take it away?

02:16 - Yeah, sure.

02:18 Dustin Ingram just recently released an updated version of an article called "Powering the Python Package Index in 2021." Apparently there was one, I think, like in the name, Donald Stuff did one about five years ago to tell us how this was going on.

02:40 So this is kind of amazing to read.

02:44 There's just some cool information here.

02:47 There were three maintainers, but it was mostly Donald five years ago.

02:52 And now there are still three maintainers, but it's Donald, Ernest Durbin, and Dustin Ingram, all doing the maintainers, but there's also more people.

03:03 So there's more people involved.

03:05 There's five different moderators and three committers that help with the project.

03:11 So that's the, and we've all seen it.

03:13 It's just, people are using it a lot more And it's a it's more central part of our everyday life. So yes, what are some of the you know, I remember one of the really interesting things was just how much it costs to run pipe.ai.org in the whole like all the data transfer behind the scenes and stuff like that.

03:32 Yeah, so let's let's jump to some of the data. The, the data that they showed was just sort of mind blowing. We've got one, We're up to 1.7 billion requests on PyPI per day, sometimes in 55.4 terabytes every day.

03:53 That's like five times more than even from 2018.

03:56 That's ridiculous.

03:58 Yeah, so this is an amazing amount of data goes through there.

04:01 And then they have data on files.pythonhosted.org.

04:06 Also, there's some data on there.

04:09 The money that goes into it, Fastly takes care of a lot of the brunt of the work.

04:15 So, Fastly apparently is donating about, what's the number?

04:21 $1.8 million of services a month, if we were to have to pay for the Fastly services directly.

04:28 Oh my gosh.

04:30 And they give PyPI a 100% discount, so that's great.

04:33 About $10,000 worth of services a month from Google and 7,000 from AWS, and then a whole slew of other people that help out too, like Datadog, which is cool.

04:46 And then there's some other funding sources that we've had some grants, and we've talked about some of the grants that came through, but these are funding some amazing projects like the rewrite of PyPI, localization, some malware detection, which is really needed when everybody's depending on this.

05:06 And now some support staff, they're hiring a project manager soon.

05:11 Yeah, that's fantastic. Google came on as a visionary sponsor specifically to work on this and the security side of that, I believe.

05:18 Yeah, one of the things I didn't know about, which we're going to provide a link to is the team maintains a thing called a fundables markdown page, which is a non-exhaustive wish list of large projects they'd like to see happen.

05:33 >> Nice.

05:35 >> It's looking for what are we going to do, but if we can do it, we'd like to do this. That's kind of neat.

05:43 >> That's amazing. I'd never stopped to think about how much work and how many people must use PyPI.

05:50 PyPI, I don't know how many, I say PyPI.

05:53 But every time I type in pip now, I'm going to think differently.

05:56 >> Just to say a little thank you.

05:59 >> Yeah. Now I feel like I should go to this fundables list and give something back for all the types I've used it.

06:07 Probably in frustration as well because something hasn't worked and not appreciated all the behind the scenes stuff.

06:14 >> Yeah. The first time I learned about this, I was blown away at how much it takes to keep it going.

06:20 Think about how much we all depend upon this as people working on Python.

06:24 What if it went away tomorrow?

06:26 - Yeah, it was terrible.

06:26 - I can't even think about that.

06:28 (both laughing)

06:29 Most scientific research would probably collapse.

06:32 So please don't.

06:33 - You know what I wanted to ask you, Dr. Becky, is I suspect that you use Conda and Anaconda a lot in the data science space, or are you a pip person?

06:41 - I'm a pip person.

06:42 I don't really use Conda.

06:43 Some of my colleagues do.

06:44 It's all just personal preferences, really.

06:46 I remember for a long time on the departmental computers, the ones that were owned by the physics department, they didn't give you install control, and so pip wouldn't work and it drove me insane.

06:57 (laughs)

06:58 - Oh wow.

06:59 - I had to beg them to put pip on.

07:02 I was like, no, you can only install like, software that has been approved, like by the IT department.

07:08 And I was just like, oh God.

07:10 - It's not gonna work.

07:11 (laughs)

07:14 - Yeah, that's really rough.

07:16 All right, super cool.

07:17 Well, I wanted to try to bring in some astronomy type things that have to do with Python, because of course you're here, Dr. Becky.

07:26 And Shahran Ahmed, didn't really know that he contributed this to today, but just more of a general conversation item put out on Twitter, like, "Hey, I was looking for a Python generated star atlas, "like the Leuven star atlas." Have you heard of this thing?

07:42 - No, I haven't.

07:44 The Herschel star atlas is the most famous one, but I'm guessing Leuven is a bit of an update.

07:48 - It's a project by...

07:52 First off, I'm sorry, I'm forgetting their name.

07:54 Let's see if I can, yeah, they just say, I have to go back and pull it up later.

07:59 So they wrote this.

08:02 I doesn't help me, I'm sorry.

08:04 So it's the goal is to make a publication quality Stellar Atlas from scratch using Python.

08:13 So it's pretty neat and the project's not finished and who knows what the timeline is on it, but I wanted to just give it a shout out more as a way to think about what are the tools that people are using for astronomy and Python and also just building maps.

08:29 You know, maybe you want to build a map of something completely different.

08:31 Maybe you're really into river floating.

08:33 You want to build like amazing maps of like river floating or whatever.

08:36 I think you could take the public data and like overlay the things kind of like they did here.

08:40 So with this, I'll go and find some pictures down here at the end.

08:44 It's, it's quite a long article talking about how all this works, but there's some really neat graphics that we can find.

08:51 There we go.

08:52 So they've got pictures of stars, variable stars, galaxies, nebula, planetary nebula, and all kinds of things that you might care about.

09:03 Fast moving stars, I suspect a lot of those might be looping around black holes.

09:07 What do you think?

09:08 - I mean, yeah, you probably wouldn't see those astrometrically, but you'd probably get all sorts of variable stars that vary in brightness.

09:14 - Yeah, yeah, they call those out, particularly with like a double circle type of icon.

09:19 - Yeah, yeah.

09:20 So astrometrically means like the astronomy position.

09:23 So like incredibly precise.

09:25 So those kind of like what you just described like a wobble from a black hole orbiting it, you probably wouldn't see on a starless like this.

09:31 It'd be like too fine of a detail, like too much, too small of a change.

09:35 Yeah.

09:36 - Yeah.

09:37 Well, so talks about how do you go and create this thing says there's a one plot map.py that's 1,500 lines long.

09:45 trying to write all this together.

09:47 They talk about using the different libraries.

09:50 So it was NumPy for all kinds of data handling.

09:53 It was PyLab and Matplotlib.

09:57 So all the graphics that you see here are just layers of Matplotlib renderings over and over and over.

10:02 Yeah, and then there was this library called BaseMap, which takes care of projections and transformations because I think one of the challenges was how do you project this onto paper?

10:14 You know, when it's on, you know, a spherical thing.

10:17 I think they said they used stereographic projections.

10:21 I don't know.

10:22 - I think it sounds about right, yeah.

10:22 - That sounds right, yeah.

10:24 SciPy, and then of course Astropy, which I know Dr. Becky used a lot, and then--

10:29 - Round of applause for Astropy.

10:31 - Woo!

10:32 And PyEFEM for celestial coordinate transformations.

10:36 So, yeah, a lot of neat, a lot of neat libraries on there.

10:41 - Yeah.

10:41 or use astropy?

10:42 Like any of the others sound familiar?

10:44 - All of them.

10:45 I've used everything on one of those packages before, especially astropy.

10:48 Like I have the same problem with like, I've taken an image with a telescope and it's been taken by a flat digital detector, but there's coordinates that are sort of overlaid on that, that come from the sort of the surface of a sphere.

11:02 You can think of it as, right?

11:04 And so you project that down using astropy and PyFM as well, 'cause sometimes people work in different coordinates.

11:11 So you can work in sky coordinates, which is sort of how high you are above the horizon and how far around you are.

11:16 Or you can work in galactic coordinates, like with respect to the center of the Milky Way, like how far out are you and round and I don't ever work in those, but people, people who are Milky Way astronomers do, and then you've got to like, so some objects, their coordinates are given in Milky Way coordinates and not sky coordinates, so they'll have to have done so many transformations to get maps like this.

11:38 What's cool about this map.

11:39 It's the constellation Cygnus, if you can see that there.

11:42 So that's the swan.

11:43 It looks like a big cross in the northern sky.

11:46 But that is the constellation or the area of sky that the Kepler space telescope stared at.

11:51 - Oh, nice.

11:52 So that's where the exoplanets have been discovered, yeah.

11:54 - Pretty much, yeah.

11:55 All of the exoplanets we know of, so some like 5,000 of them, will pretty much be in that patch of sky.

12:00 So I'm really glad they chose that constellation to show in this piece. - Oh yeah, how neat.

12:04 - Yeah. - How neat.

12:06 Yeah, and then over here, let's see if I can find it, talked about the sources of data.

12:10 There's all these different public sources of data that they put together.

12:14 Then if you read through the article, you'll find that they were talking about, well, I think they spent a month and a half getting this far on the project.

12:23 And they're like, well, I went through here and I had to correct all of these things 'cause they were, this data was a little bit off here and that data was a little bit off there.

12:31 And then I had to label them.

12:33 And another thing that was talked about a lot is how do you create these pictures without text that overlaps?

12:39 So we mentioned this thing's called - Pain of my life. - Adjust text.

12:43 And where it'll actually take a matplotlib thing with labels and then rearrange the labels on the graph so that the text doesn't overlap, which is really cool.

12:53 And it has a nice- - You've just changed my life.

12:56 - Really?

12:57 - Yes, this is like a huge problem.

13:00 It's been solved, it exists, and it's just Python code.

13:03 - Oh my God, I love when this stuff happens.

13:06 - Isn't this cool?

13:06 It's awesome, I'm glad.

13:07 - I'm just like, jaw on the floor, like, oh, someone figure it out.

13:11 (both laughing)

13:12 - Super cool, that's awesome.

13:14 So yeah, there's a bunch of stuff.

13:15 And one of the things that I really took away from this was it reminds me of this quote that in the whole data science, scientific computing world, like, "Data cleaning isn't the grunt work, "it is the work," sort of thing.

13:27 'Cause it's so much about, oh yeah, I could just run these together, but then I spent a month fixing this and correcting that and offsetting that, yeah.

13:34 So, pretty neat.

13:37 - That's really cool.

13:38 - Yeah, I guess the final--

13:39 - I wanna know where I am in galactic coordinates.

13:42 (laughing)

13:43 - I can't remember off the top of my head, but yeah, it does have galactic coordinates.

13:47 I just don't know what they are.

13:49 - So is the supermassive black hole at the center of the universe, is that at zero, zero, zero?

13:53 - The center of our galaxy, yeah.

13:56 So there's many galaxies in the universe, our galaxy's the Milky Way.

13:58 The supermassive black hole at the center of it would be, - Yes, L equals zero, B equals zero.

14:02 (laughing)

14:04 - Okay, awesome.

14:05 Awesome, yeah, I guess final thought is they say it takes about four hours to generate this map running using four cores running in parallel to actually render it 'cause it has so much data and whatnot, but anyway, pretty neat.

14:16 If you're looking to build maps with Python, here's a bit of a case study, I suspect.

14:21 - Is it open source?

14:23 Like is it on GitHub?

14:24 Can you grab it yourself and have a play around?

14:26 - I wish, no.

14:28 It's not, I looked around, I couldn't find much of the code.

14:30 There's little snippets of code shown, but yeah, that's all.

14:34 - I was thinking like, can I get a section of sky?

14:37 I'm gonna print it out, I'm gonna frame it.

14:39 It's gonna look really cool.

14:40 - Exactly, yeah, this is the one I wanna put on the wall.

14:42 Yes, I think you could do that.

14:43 - Millennials love maps on walls.

14:44 (laughs)

14:45 That's what I'm gonna do. - Exactly, exactly.

14:47 All right, before we move on this, just a quick shout out to Dr. Becky from ProdFund on the live stream.

14:53 Yay, Dr. Becky is back.

14:55 Bought your book after watching the live stream with Michael.

14:58 Really enjoyed it, even though you don't have a space background.

15:00 So very cool.

15:01 - That's awesome.

15:02 I'm so glad you enjoyed it.

15:03 - Yeah.

15:04 All right.

15:05 Speaking of things that we couldn't all enjoy and can take us back, calculators.

15:08 - Yes.

15:09 - Tell us about it.

15:10 - I was thinking about how I haven't thought about my graphical calculator in a long time.

15:15 Like I swear I was attached at the hip to that thing throughout high school and then a little bit into university but not so much because they were like banned in our university exams because they thought that like it was, it was help us cheat, I guess.

15:28 I don't know.

15:29 But it was so weird going from high school where they were like, "Use your graphical calculators." And then at university, they said, "No, don't use them." And I remember thinking, like, after that, I barely even thought about it.

15:39 I don't even use it in my everyday, like, work or life anymore.

15:44 When a lot of the things I do, I can just use Spotlight on my Mac to do a quick calculation or whatever, or I'll do it in Terminal or something like that.

15:54 And then I saw this the other day, was just amazed by it because I remember this graphical calculator showing you, you could get up graphs of, you know, like e to the x or sine x or cos x or something on your calculator.

16:08 But the screen like was, it was like an old Game Boy or like a Nokia 3310, right?

16:14 It was the most pixelated screen in the world.

16:18 And making those graphs was so frustrating.

16:21 Like it just wasn't intuitive.

16:23 It wasn't fun, I didn't think.

16:26 And then I saw this the other day where look at what kids can use these days.

16:31 They have this graphical calculator that has this proper, beautiful, actual color screen and that you can use Python on to make plots and do calculations.

16:43 And I just think this is such a fantastic idea because teaching kids to code early is so important.

16:50 Like it can be used in so many different areas of work and life and science and everything like that.

16:57 But I always find learning to code without a purpose necessarily is really difficult.

17:02 Like just deciding one day, I'm gonna learn how to code.

17:04 Where do you start?

17:06 Like, unless you've got a project, like what do you do?

17:08 So the idea of learning as you're going through and actually learning the math or learning the science with your graphical calculator is so good because then it just starts to come naturally to you.

17:17 It's like the first thing you think of to do to solve a problem is to use Python.

17:22 So I'm just so excited that this is a thing And I hope it becomes like the calculator that kids have to buy, like if they're going to do maths at like a higher level or something.

17:32 Yeah, it's so cool.

17:33 I'm so excited.

17:34 Instead of those weird programming languages that come, you know, like Polish notation, reverse Polish notation and stuff, like this is preparing them for proper programming.

17:44 Exactly.

17:45 Yeah.

17:46 And I think that if you learn it in this way, it will just become so second nature that then it's not a barrier for you to go on and do anything else.

17:52 Right?

17:53 becomes a tool that you can use to solve problems like in science or in sort of development or software development or something like that.

18:03 As you get into university and wider world, like having that knowledge from that age is so good.

18:10 I mean, I got mine at like 16.

18:12 I don't know about if you guys remember when you got your graphical calculator, but I feel like at that age I was impressionable and it stuck with me.

18:19 - Exactly.

18:21 - Yeah, I think I might've gotten mine.

18:24 It really was a decent one right when I got to college.

18:26 But yeah, I even had one of the TI-93s that had a full QWERTY keyboard on it for a while.

18:32 It was that big one, yeah, that was fancy when I was a TA in grad school.

18:36 - Yeah, that's the thing.

18:37 I think I got them early 'cause we specialize early in the UK, so I was only doing maths and science by 16 to 18, so that's why I got mine earlier.

18:49 But yeah, learning Python then would have been so helpful 'cause I got to university and they were like, "Oh, okay, now turn to learn Python." But let's do it while we learn general relativity.

18:58 (laughing)

18:59 And let's code up some general relativity.

19:01 I was like, "Oh, yeah, I'm still printing hello world." Like, I was like, slow down.

19:05 Yeah, so the fact that you can learn it there, here, it's so cool.

19:08 - How do you type into this thing, though?

19:10 - Like a calculator. - Very slowly.

19:12 - Very slowly, first of all.

19:13 Yeah, I imagine it probably just has like an old phone keyboard.

19:17 So, you know, three letters per number, but it might have one of the full queries like Michael was talking about.

19:22 - I think it's the more skinny tall ones, the more like an old phone.

19:26 You know, it'd be awesome if you could transfer Python files over, but yeah, it has like a REPL and everything.

19:31 Just pretty interesting.

19:32 - That's pretty neat.

19:33 - I hope they have auto-complete.

19:34 (laughs)

19:35 - Yes, oh.

19:36 - That would be great.

19:37 - Oh yeah, I hadn't even thought about that, but yes, it'd be better.

19:41 The cool comments from the live stream, Marcel says, "Polish notations are opposite of method chain." And yeah, and Kim says, "Graphical calculators "would have been really handy in high school.

19:49 "I never even seen one before.

19:51 "Got into engineering, Python, "and reverse Polish notation." Sounds tricky.

19:55 And then Pamphil Roy from the SciPy World, he says, "Oh yeah, and Elsa told me "you can't put things like SciPy on there, sadly." But hopefully soon, maybe this is just, you know, V1.

20:08 Yeah, I guess packages in general, right?

20:12 They talk about having turtle and stuff, but I'm not sure how much they have added modules.

20:17 - How cool would it be to have SciPy on there?

20:18 Because then you could like plot a function and then you could like optimize and you could like find the solutions to a function that way.

20:26 Probably skipping the differential equations that you're supposed to be learning in math.

20:30 - Exactly.

20:31 I just partial differential equations are easy.

20:33 I just say like solve and give it the number.

20:36 - Yeah.

20:37 I would check your answers in SciPy.

20:40 - I think Turtles is kind of neat on there also because I mean, I programmed a sub hunt on my single line reverse polar notation, HP calculator, just because I could sort of thing.

20:53 So I think doing some games in there, it might be kind of neat.

20:57 - Yeah, yeah.

20:59 We feel definitely agrees with you about how cool that would be.

21:02 - Yeah. - Awesome.

21:04 All right, before we move on to the next one, let me tell you about our sponsor this week.

21:08 So this episode of Python Bytes is brought to you by Sentry.

21:11 I love Sentry.

21:12 We use Sentry.

21:14 So how would you like to remove a little stress from your life?

21:16 Do you worry that users might be having difficulties or encountering errors with your app right now?

21:21 Would you even know if they did until they send that email?

21:24 How much better would it be to have error or performance details immediately sent to you including call stacks, tracebacks, values of local variables, and even the logged in user that ran into the error?

21:35 With Sentry, it's not just possible, but it's simple.

21:38 We use Sentry, like I said, on all of our web apps, on Python Bytes and Talk Python, Talk Python Training courses.

21:43 And I actually had somebody run into an error.

21:47 I got a Sentry notification that this user had a problem doing this thing.

21:51 I fixed it and sent them an email and they said, "Oh, that is incredible.

21:55 I was about to email you about this problem I had, but it was late, so I was gonna do it tomorrow and you already fixed it.

21:59 So what a surprise." So surprise and delight your users today.

22:03 Create your Sentry account at pythonbytes.fm/sentry.

22:07 And when you sign up, please, There's a button that says, get a promo code.

22:12 Make sure that you enter Python bytes, all caps, all one word, and then you'll get the team plan, which gives you more features and more errors and so on.

22:19 Not that you want more errors, but maybe more features is good.

22:21 So, pythonbytes.fm/sentry and promo code Python bytes.

22:25 Brian, you got the next one.

22:27 - Okay.

22:28 I gotta say though, that the artwork on that GetSentry page was great.

22:34 - Yeah, it's very cool.

22:35 Well done.

22:36 So I've been trying to shift doing a little bit more work with GitHub Actions on my projects.

22:43 But, you know, there's probably great documentation somewhere.

22:48 I just don't know where it is.

22:49 And I'm impatient, so I kind of want somebody to just say, "For Python, this is what you do." So there's a few of these walkthroughs, but I like this one that I just saw recently.

22:59 This one's Python package CI/CD with GitHub Actions.

23:05 just write what it says on the tin.

23:08 But this is a nice walkthrough of some of the different things, and they're going through an example project, of course, but it's nice.

23:19 First off, talks about when you want actions to happen.

23:26 In talking about when they happen, this project happens on pull request and on push to certain branches.

23:34 in this case, main branch.

23:36 But you really can pick several branches that you can do this on and to have actions happen on those.

23:44 I kind of like having a couple of different development branches, especially on things that I'm active on and don't want to release yet.

23:50 So these are nice.

23:51 And then what else?

23:54 I'm going through a matrix of stuff.

23:56 So most of the article is talking about syntax checking on different things.

24:01 I don't know if really that's important, but I would probably do a Pytest on multiple matrices.

24:09 But the notion of a matrix is interesting, the having the different environments.

24:15 In this case, this person is talking about maybe running on multiple versions of Python across Ubuntu, macOS, and Windows.

24:25 That's exactly what I want, those sorts of combinations to make sure something's working.

24:30 With all the devices and stuff that you have, do you see this maybe even some at work as well, like with all the hardware devices and the different ways it's configured?

24:38 Well, couldn't use GitHub Actions, but we definitely use matrices to figure out which tests have to run on different configurations and different hardware.

24:48 And it's just exploding. But yeah, that's a different nightmare.

24:52 But this one is taken care of for you.

24:56 So it's a neat thing to test across all those.

25:01 I knew how to do it on TOCs, I knew how to do it on Travis, and getting it to work and get have actions is just different.

25:08 It's not harder, it's just different.

25:10 So I appreciate this walkthrough.

25:12 Then what?

25:15 Example of running tests, of course, and checking artifacts, which is interesting.

25:20 I hadn't thought about that.

25:22 your build might generate documents or other artifacts that you want to keep around.

25:29 Having some checks around those is a good idea too.

25:32 Then the last couple of bits, and really why I'm highlighting this is because I didn't really know how to do this, is doing auto-merges on some branches.

25:42 There's some branches that maybe you're maintaining and nobody else has access to.

25:47 But if you push to that, you want test to run and then automatically to merge to something.

25:52 Setting up auto-merge, there's some steps around that, which is pretty darn cool.

25:59 The last bit is pushing to PyPI.

26:03 >> Nice.

26:04 >> Release automation so you can automatically, in this case, setting up a rule so that if you push a tag that starts with a V, that means you've updated the version and you want that to push automatically out to PyPI.

26:20 So hooking that up with GitHub Actions.

26:22 - Oh, that's clever.

26:23 I'd never thought about triggering it off of a tag name.

26:25 I've always thought of it just certain branch means go, but yeah, that's clever.

26:30 - Yeah, so that way you can even have like a main branch that has updated workflow, updated things, but it doesn't get pushed until there's a new version, which makes sense.

26:40 - Yeah.

26:41 Dr. Becky, what's the story with GitHub Actions and all of your colleagues, people use it?

26:46 - I don't think I even know what GitHub Actions is to be quite, I had a drink and I spared you from hearing me gulp before. Yeah.

26:53 I don't even think I know what I've used GitHub actions to be quite honest.

26:58 I'm sure some of my colleagues, I use GitHub all the time, obviously, but GitHub actions, I'm trying to remember. I don't think so.

27:06 I'm sure somebody has though, but no.

27:08 Yeah. I'm sure some people maintain some of the packages and stuff.

27:10 That's what I was thinking. Yeah. I don't think I have anything like that.

27:14 to maintain a lot of my colleagues put out stuff, but really my code is for my use and for any specific colleague that has a science case use for it.

27:24 But GitHub, I love GitHub because one of the things I love doing with it is committing.

27:30 When I've written a scientific paper, I'll even put the latex on GitHub, what we code our scientific writing in.

27:39 The PDF is included in your commits and then you can make a GIF from your commit history of your PDF, building up, adding parts and all the words adding.

27:49 It's one of my favorite things to do once I've finished because it feels like, it's like, "Oh, I've done this project and now I can see it fully take form." I remember I wrote my thesis, my entire PhD thesis in about two months because I got a job and I had to finish my PhD and I had to write it up.

28:07 I don't remember much from that whole two-month time.

28:10 It's a huge blur, except one vivid memory of the fire alarm going off in the department.

28:16 I'm being like, "Panic! Git commit, Git push!" I was just...

28:23 Remember this, I've got this one commit message in my thesis repo that's basically just, I just mullet the keyboard because I was just like, "The firewall's going off!" Git commit anything and Git push because I was like, "What if I don't have a backup of the past eight hours of writing I've just done?" It was a huge bulk and I was just like, "I'm not losing this!" And people were pulling me out of the room because the firewall was going off.

28:45 You've got to run away.

28:47 Oh my gosh, that's so funny.

28:49 But, ugh.

28:50 Yeah.

28:51 That reminds me of a sign I saw once.

28:53 Yes.

28:54 [laughter]

28:56 Exactly.

28:57 A case of fire.

28:58 One, get commit.

28:59 Two, get push.

29:00 Three, leave building.

29:01 I actually went through this, but during a PhD thesis write-up, which I would never recommend to anybody.

29:09 [laughter]

29:11 I'm amazed that you found this image so fast.

29:14 (laughing)

29:15 - Oh yeah, no problem.

29:16 I'm on, I got you.

29:18 Couple of comments from the live stream.

29:20 Justin Boyce says, "Love being able to use "GitHub Actions for deployment.

29:23 "Keeps me from botching deployment by making mistakes." I agree.

29:27 Do it more often if it's automatic.

29:29 And then Jared Chung says, "Looks great.

29:30 "Definitely gonna hook this up to the packages I maintain, "but which change infrequently "so you don't have to remember the workflow," and so on.

29:38 And finally, Marcel Milsent says, Her GitHub is now offering free tier for institutions with unlimited contributors for private repos and $2,000, or 2,000 actions a month for $0. So, yeah.

29:52 That goes alongside with the academics package as well, right?

29:55 For students, it's not just students, it's also anybody with like a .edu email or .ac.uk, which is the universities over here.

30:02 So I have like a loads of free repos and stuff like that, which is great.

30:06 I'm so good at them.

30:07 Yeah, fantastic.

30:08 - Well, cool.

30:09 All right, moving on to number five.

30:11 Not this one, this one.

30:13 - Another spacey one.

30:14 - Another spacey one.

30:16 Garrett Dunn gave us a shout out saying, "SpaceX is now using Python for prototyping their Starlink satellite software." Which I don't know how you feel about Starlink, Dr. Becky.

30:31 I mean, as an astronomer, it's like in your way, but as a way to empower people in remote places, it's kind of cool.

30:37 I'm really split about it to be honest, because I want it to go ahead.

30:40 I think it's a really cool project, but I think there's more compromises need to be made in order for it to work in the way that it could, like the most efficiently the way that it could.

30:50 And I know like even before this launched, I'd take an image and I'll end up with a satellite trail and at least one of 10 I've taken at a telescope that evening.

31:00 And there's going to be more, right?

31:02 Exactly.

31:03 Yeah.

31:04 And it's not like something you can remove.

31:05 People are like, "Oh, just remove it as a source of noise." thing goes like right over your, you know, 15 minute exposure of a galaxy that's millions of light years away. And this massive bright thing just goes right over the middle. It ruins it, right? There's no rescuing that. So I do want it to go ahead. I do want it to work. But it's really cool that they're going to use Python. Like that could be something we could get warnings from, you know, like if it's something as accessible as Python, so to say, something's going over, pause observation, carry on or something like that, you know?

31:33 Yeah, I would actually love to see SpaceX work more closely with all the satellite locations and observatories and say, "All right, here's how we're going to help you solve this problem." Yeah, that would be great.

31:46 Yeah, diving into this. So Stack Overflow actually did a four-part series on the software that SpaceX used to build all of their things in space. And this one in particular is about about the network protocols.

31:59 So if you look at how the Starlink system works, it turns out that most of the stuff is C++ both on the ground systems and the things in the sky.

32:11 So they talk about that their software breaks into two parts, software that flies and software that supports the things that fly.

32:19 So the software that flies is all C++ that's on embedded chips on the satellites.

32:25 But then on the ground, there's a whole bunch of communication APIs and coordination APIs.

32:30 If you look over at where these satellites are and where they're covering, there's these cool real-time maps.

32:37 And I'll put one on the screen here.

32:39 You could actually see them flying by here where Brian and I are.

32:42 Please zoom in on that area.

32:44 And you can see the overlap of the signals of the different ones and how they're oriented and all kinds of stuff.

32:51 So they need to adjust and move these satellites around in orchestration and orchestrate them basically.

32:56 So the software that does that, it's in production version in C++, but they do a lot of simulations and prototyping in Python to figure out how that works.

33:06 Because think about the in-body problem, but for thousands or hundreds of thousands of these things, to keep them all working together, the combinatorics of it get out of control really quick, they say.

33:17 So there's a lot of simulations that need to be done, and they do that in Python.

33:20 Once they get the working version, then they rewrite that in C++.

33:24 What do you two think?

33:25 This is a cool picture, right?

33:27 Mm. Yeah, that's really cool.

33:29 It is neat.

33:29 Yeah. And speaking of GitHub Actions, they probably are actually using GitHub for this, but it doesn't explicitly say.

33:35 But you think of organizations that have a hard time deploying their code, like you'll go to a website, like our website is down all of Sunday because we're deploying a new version.

33:43 Like, are you kidding me?

33:44 This is 2021.

33:45 Like this should be Git push, wait a few seconds, and it's now the new version.

33:49 Anyway, this is pretty interesting because they say the software is developed in a continuous integration environment with teams merging into the master development branch often and deploying to all of the satellites weekly.

34:02 - Huh.

34:03 (both laughing)

34:05 - That adds an extra level of panic to you, Git push, doesn't it?

34:08 - It definitely does.

34:10 Oh, whoops, I wasn't ready.

34:11 All the satellites stopped responding.

34:13 Whoops.

34:14 So yeah, it says the Python version allows them to wrap for rapid iteration during the design phase.

34:20 And once it's all happy, they write in C++.

34:22 So yeah, anyway, pretty cool.

34:23 I'll link to some of these maps that track it and the four-part series and so on.

34:27 So Garrett, thank you for that.

34:29 - It's really cool to see 'cause it's very similar to what Space Telescope are doing for the James Webb Space Telescope.

34:36 Sorry, Space Telescope is the institution in Baltimore that manages the Hubble Space Telescope and the new one that's gonna hopefully launch in October is called the James Webb Space Telescope.

34:45 And I think that's a similar sort of platform and a lot of the spacecraft sort of mechanics is done with sort of the usual comms that they have, possibly C++, but a lot of the tools they put together for astronomers who are planning observations, like where to point, how long that will take, and all those kind of things when they're sort of deciding, I wanna use this to do this science, that's all been done in Python.

35:07 Like all of the sort of tutorials of like how to figure out how much like James Webb Space Telescope will be able to see of this thing you wanna look at is all done in like IPython notebooks.

35:17 Jupiter, I guess we should call them now.

35:19 >> Yeah.

35:20 >> So it's really cool to see that it's not just like these major academic institutions that are picking up Python, because they know it's the academics that use that, but it's companies like SpaceX as well, I guess because they know their employees work well with Python.

35:34 >> That's really cool. I knew a lot of the telescopes were using Python, but that's going to be a massive new telescope, the James Webb telescope, it's going to be a big deal, right?

35:45 >> Yeah, it's going to be a huge deal.

35:46 We've all got fingers crossed that launch actually happens because it was originally planned for 10 years ago and three years ago.

35:52 Yeah, fingers crossed I guess for coming soon. All right, Dr. Becky, you got the next one.

36:00 Yeah, so I feel like I've done the scientist thing of bringing a scientific paper to a Python podcast, but I'm bringing what I know.

36:08 So I found this paper a while back when I was sort of, you know, doing the the thing of like you're an expert in something because you know what to Google.

36:16 But I was looking for something and I found this paper, the Beginner's Guide to Working with Astronomical Data. And it's very much written as if you're a poor PhD student that's come in and your professor has said, "Hey, here's a lot of data, please analyze it." And you're like, "I don't know where to start." So that's kind of who it's written for. And I think if you are a really keen amateur astronomer, and I know a lot of people do want to get into astrophotography, and possibly did during the pandemic with lockdowns and stay at home orders, and perhaps might have set up something with like a Raspberry Pi, you know, to control a telescope, to know where it's pointing, something like that, or even to adapt it with a camera as well.

36:59 And then they have all these images that they then want to remove noise and get like a beautiful color image of something as well.

37:08 And they're not entirely sure how to do it, but they might know Python.

37:12 I use Python to analyze the images that come off the back of professional telescopes.

37:17 So you could do it with amateur telescopes or amateur camera, just an SLR camera you've set up in your back garden to take an image of something.

37:25 But you want to see fainter and fainter things.

37:27 You have to take lots and lots of short images so you don't get motion blur and stuff like that with actually the rotation of the earth.

37:35 But they're all the wrong coordinates.

37:36 So what do you do?

37:37 Because they're not all in the same place.

37:38 So you use Astropy to figure out how to do this.

37:41 Does it like realign the images to adjust for that rotation?

37:44 Exactly. Yeah, yeah. And so, but there's obviously lots of other steps that you need to do, like taking out noise. So this actually talks through like all of the steps that would go into what a professional would do. And I reading it, I think it's so well written that I think someone who is a really keen amateur and who wants to get into astrophotography and do the, you know, reduction, as we call it, of the images, you know, make them look extra pretty by the end of it, with Python, because they're a keen Python person, I think this would be the thing to be like, right, I'm going to make this my bedtime reading. It's very, very long. But I think you could definitely make this like a project if someone was keen enough to do and so that's why I thought I'd I'd bring it and I feel like obviously, we need a huge shout out to Astropy and Matplotlib and and everything like that for making these kinds of things possible with images that you can take in your back garden and stuff that you can get at.

38:40 But someone in a month or so, if they're really keen on Python and they're really keen on taking photos of the night sky, you could be getting images of galaxies and nebula that look amazing.

38:51 So that's why I thought of bringing it.

38:52 That'd be amazing.

38:53 Print them out.

38:54 Yeah, print it out and put it up as artwork in your house or something.

38:58 That'd be fantastic.

38:59 Instead of just saying, "That's a cool picture of a galaxy." I took that picture of that galaxy. That's totally different.

39:04 Exactly. Yeah, you know, I can imagine someone getting an amazing picture of Andromeda, you know, and following these steps that it outlies. And I think it's easier because, especially if you know Python, there's no learning curve with a new tool or a new or like frustration with a GUI, right?

39:20 That's just this like, interface, what's going on, I don't have to use it. Because it's just pure Python.

39:25 I think if you already know Python, it's definitely the easiest way to get into this, because it'll be something familiar with something new.

39:33 So even though it's a scientific paper, (laughing)

39:36 I think it would pass, so.

39:39 - Yeah, it looks super interesting.

39:40 The code doesn't look terribly challenging, but it's exactly what you need to solve the problems, right?

39:45 - Exactly, yeah.

39:46 - Cool, cool.

39:47 All right, I think that's it for our six items.

39:50 Brian, you got anything?

39:51 - No, I just apologize to the stream people.

39:54 For some reason, my video stream is frozen.

39:56 - I think that we might just be really, really zen and still.

40:01 - I thought he was just really interested in the paper, but he was like, "Wow, look at that." - You've mesmerized him, absolutely.

40:07 All right, so before we move on, actually, Justin Boyd says, "Thanks for bringing this, Dr. Becky.

40:12 "I did pick up astrophotography barely as a hobby "during the pandemic and it looks good." So yeah, already, I already got one person into it.

40:19 - Taking that like biggest step to go from like, "Oh, cool, I managed to photograph some stars," to getting like the galaxy's nebula.

40:25 I think this will help people take that step, I think so.

40:29 - Yeah, for sure.

40:31 - I'm glad it helped.

40:32 - I got a couple of quick shout outs at the end.

40:34 First, I wanna point out that if you like this conversation, check out episode 303 of Talk Python, where Dr. Becky and I dive all into the Python astronomy world, that was fun.

40:48 And then I just met with one of the founders of this company called Kabuntu Focus, which I thought was a pretty interesting idea.

40:56 So what they're going for is, you know, the way that Apple works is right, you know, they make the Mac and then they make macOS and that tight integration of those two things works better than just, you know, bringing pieces together and building your own sort of thing, right?

41:13 So that's sort of the same idea, but for Linux.

41:15 And so it's really focused on people who do AI type of work or just want to have a really good desktop Linux environment.

41:21 So for example, down here at the bottom, keeping it in the space world.

41:26 We have Chris Mattman, who, if I refresh it, it'll come up at the right time, maybe.

41:31 It's supposed to cycle, anyway, Chris Mattman said he, who works at JPL, who he did some machine learning training on his MacBook Pro, and it took like 37 hours.

41:41 And on this thing, because they have these crazy GPUs, these like GeForce 3080s and stuff in the laptop, they did it in like an hour and a half instead of 37 hours or whatever it was.

41:52 So, and by the way, you can actually buy it.

41:55 Like these new GeForce chips are cards.

41:57 They're basically unobtainium, right?

42:00 You can't get to them.

42:01 So yeah, anyway, pretty, pretty interesting.

42:04 If you're looking for a desktop Linux world, check that out.

42:07 Dr. Becky, anything you would like to give a shout out to?

42:10 Maybe I could throw out your Amazon page.

42:14 - Yeah, sure.

42:14 - Anything else you can tell us, yeah?

42:16 - Yeah, so I've written a book.

42:18 So it's got different names everywhere in the world just to confuse everybody.

42:21 So in the US and Canada, it's called "Space at the Speed of Light." In the UK and pretty much everywhere else in the world, it's "Space 10 Things You Should Know." And then there's also the German edition as well, which I'm not trying to butcher.

42:33 (speaking in foreign language)

42:37 Yeah, exactly.

42:37 It's a good book title.

42:39 It's essentially, it's written for, I think anyone who is a complete beginner in space, but has always maybe been a little bit curious would love this book.

42:48 It's like the 10 things that if you were gonna be at a dinner party and you'd be like, "Hey, did you know this?" These are the things you should know about space, right?

42:56 But I also think that anybody who's--

42:57 - Dr. Becky told me about it.

42:58 - Yeah. (laughs)

42:59 I also think anybody who's been keen on space as well will also get a kick out of it because it takes ideas that you might have heard before, but then just adds a little extra level of where we are right now on the edge of our understanding of this thing.

43:14 So it's a really short read as well.

43:17 It's not heavy, it's not a big hefty thing.

43:19 It's really skinny.

43:20 My laptop's currently propped on top of it, otherwise I would show you how skinny it is, but I disrupt everything.

43:26 So yeah, if people want to check that out, please do.

43:30 Or if you have like, I don't know, an uncle or an aunt or a nephew or a niece or whatever that you think would like that.

43:38 - Yeah, fantastic.

43:39 - I've been told it's a good gift, so.

43:41 - Yeah.

43:41 Rehan asked, is it really big?

43:43 Nope, it's not that big.

43:44 - It's about 200 pages or so.

43:47 Yeah, Proud Van says, "I can vouch for the book." Yeah, absolutely.

43:50 - Thank you, Proud Van.

43:50 - And then also says that Bryant imported Zen.

43:55 It's just very cute.

43:55 (laughing)

43:56 - I like that.

43:57 - Well, I've got a close friend that has a telescope and he always wants to talk about space and I know nothing.

44:04 So I'm definitely gonna read this book so I can talk to him.

44:07 - There you go. - Oh, fantastic.

44:08 - Perfect for that.

44:10 - All right, I have, we always close out the show with a joke, but I've went and found some space memes 'cause Dr. Becky is here, and you've done a couple of videos on reacting to space memes, and so I thought maybe some space memes would be appropriate as our jokes for the week. - Yeah, they're so fun, because people click on them and they're like, "I just learned more in this 15-minute video "about space memes than I did in my entire "high school career in physics." And I'm like, "That was always my intention, wah-ha-ha." (both laughing)

44:39 I draw you in with the memes, and then I hit you with the science.

44:43 - Exactly, exactly, it's so good.

44:45 Yeah, so maybe we can link to some of the proper ones you've done.

44:49 There's a lot.

44:49 So I'm going to throw out four quick little space names at the four is it.

44:53 I got to remember what the names I gave them each a title.

44:56 So the first one is Uber.

44:57 So there's Matt Damon sitting on ours alone.

45:01 Remember he gets abandoned there and he says, where's my Uber?

45:04 And then there's the Elon Musk.

45:06 Rose tree shot in the spaces.

45:08 I'll be there in a minute.

45:08 I mean, I don't know whose definition of minute that is.

45:15 Seriously, why did they launch a Tesla into space?

45:21 Every time I'm reminded that they did this, I'm like, but why?

45:25 Why?

45:26 There's no reason.

45:28 Because they could.

45:30 I think that was just because they could, they never stopped to think whether they should.

45:35 Yeah, well, it's the same company that is rocking Dogecoin.

45:40 So you know.

45:41 Yeah.

45:42 All right, next one.

45:43 This one is called "Flaws, Spaceship Design".

45:47 Here's a picture of a spaceship with a cutout so you can see inside.

45:49 It says, "When building a spaceship, the tiniest details are crucial.

45:52 For example, this spaceship may be flawed because it has a giant hole in the side." (both laughing)

45:59 - I love Brian's like squeak laughing.

46:04 That's the level he's reaching.

46:06 - That's awesome.

46:07 And yet he's still very still in the frame.

46:11 I do love these, they're like a hybrid between a really scientific diagram and then something you would put out to the public or use in a talk or something like that.

46:22 I remember the ELT, the Extremely Large Telescope that we're building, which I know is a stupid name, they used emperor penguins for scale next to it in the public image.

46:37 I was like, who knows how big an emperor penguin is?

46:40 Is that like a knee height?

46:42 Is that a waist?

46:43 What are we talking here?

46:44 Apparently it's because on average an emperor penguin is a meter high.

46:47 So they were like, oh perfect, it's a meter.

46:50 It's like a meter rule.

46:51 I was like, yeah, but nobody knows that.

46:53 Like just put a human.

46:54 Dean links them out there in the live stream says, boy, the mileage on that Tesla would make it really hard to resell.

47:02 I agree.

47:03 I like that.

47:04 All right, the next one is distracted.

47:06 There's a cat in a space suit staring.

47:08 It says mesmerized by the red dot on the wall.

47:11 Missed space launch.

47:12 I'm now wondering if there's been any like cat-stronauts in previous, there's been dog-stronauts and there's been monkey-stronauts, but I don't know if we've ever sent a cat to space.

47:26 I propose a new thing, like maybe a cat could spend some time on the International Space Station.

47:32 Just think of all the memes and all the funny videos.

47:36 I don't think it would have a good time.

47:38 Can you imagine like, it constantly tries to have its like, hackles raised, but it can't 'cause it's in zero G.

47:45 It just goes in a small circle really slowly.

47:47 Yeah, maybe, you know how they, there's those videos online where they put like, sellotape on the back of a cat and it constantly like, crouches to go under something that's not there?

47:58 Maybe it would do something like that.

48:01 Like, I don't know, I'm really intrigued now, a cat in zero G, what would it do?

48:07 - Bayfield says, "Congo tried to send a rat." - Once they've sent a rat, they're gonna need a cat to solve the rat in space problem.

48:14 - And they said, also, Justin says, "Space toys are hard.

48:18 "Space litter boxes are nearly impossible." And Sam Worley is like, "You really think they could get "a cat to go into a space rocket?" (laughing)

48:26 - The minute they open the door of the space rocket, the cat will just dart onto the vent, but you can't get it.

48:33 (laughing)

48:34 Like when you take it to the vet.

48:37 - All right, let's round it out the last one, Space Vegas.

48:40 It's a black hole.

48:41 What happens in a black hole stays in a black hole.

48:44 - Nice, Space Vegas, I like it.

48:46 - That's right, yeah.

48:48 I know we talked about this one before, but it made it in a second time.

48:51 - I guess instead of Sin City, would it be like Bin City?

48:55 'Cause I don't know.

48:55 - Yeah, Spin City, yeah.

48:58 - Spin City, yeah, maybe, something like that.

49:00 - Things rotate as they go into the black hole, right?

49:02 They don't just go straight, do they?

49:04 - Yeah, yeah, it's actually really, really hard grow a black hole and make stuff fall in, which everyone's always really surprised at because they think they're like hoopers, but most stuff just orbits them. Like the earth orbits the sun. It's just a kind of a heavier sun that we can't see. Right. So most stuff orbits, it doesn't fall in and it takes a lot of effort to make stuff fall in. So.

49:22 Nice. Well, once it's in, it stays there.

49:25 Yeah. I'm getting it out.

49:26 Fantastic. All right. Well, Dr. Becky, thanks for being here. It was really great to have you. And Brian. Thanks as always. Good to be with you. Yeah, you bet. Bye everyone.

Back to show page