Python Bytes - #234 The Astronomy-filled edition with Dr. Becky

Episode Date: May 19, 2021

Topics covered in this episode: Powering the Python Package Index in 2021 The Leuven Star Atlas TI-84 Plus CE Python graphing calculator Python Package CI/CD with GitHub Actions SpaceX is using Pyt...hon for prototyping their Starlink satellite software : A beginner’s guide to working with astronomical data Extras Joke See the full show notes for this episode on the website at pythonbytes.fm/234

Transcript
Discussion (0)
Starting point is 00: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. And I'm Brian Ocken. And we have our special guest, Dr. Becky Smithers. Welcome. Hi, I wasn't sure whether I was supposed to introduce myself then. I was like, should I jump in? Should I wait? This is standard fare for our podcast.
Starting point is 00:00:23 We do a bad job preparing our guests for jumping in. Welcome. I love casual podcasts. They're my favorite to listen to, and they're now my favorite to be a part of as well. Yeah. Nice. Yeah. So it's really good to have you here.
Starting point is 00:00:36 And you're doing so many neat things out on the internet. First of all, you're an astrophysicist at University of Oxford. That is my day job technically yeah yeah you've written some books you can tell folks about that you are doing quite a bunch of interesting things over on YouTube which is how I came to know you your work on YouTube is really neat and yeah maybe just tell people real quickly about yourself. Yeah, sure. So I'm an astrophysicist.
Starting point is 00:01:13 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. I'm living the dream that I had as an eight-year-old to become like an actual space scientist. And yeah, I just love talking about science and space with people as well. 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. And it's just a great platform to communicate with people and respond to people's like questions that they've never been able to google you know the tagline is your friendly neighborhood astrophysicist so yeah i i absolutely recommend um that people check out why that
Starting point is 00:01:56 doesn't work i absolutely recommend that people check out your youtube channel it is super neat and yeah there's there's a ton of fun videos there. They're very good sort of general science, just like interested in science, not scientists type of presentations. So super cool, super cool. All right, Brian, you got the first item, right? You want to take it away? Yeah, sure.
Starting point is 00:02:17 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 list how this was going on. So this is kind of amazing to read. There's just some cool information here. There were three maintainers, but it was mostly Donald five years ago. 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, So there's more people involved. There's five different moderators and three committers that help with the project.
Starting point is 00:03:11 So that's neat. And we've all seen it. It's just people are using it a lot more and it's a more central part of our everyday life. So- Yeah, so what are some of the, I remember one of the really interesting things was just how much it costs to run PyPI per day,
Starting point is 00:03:47 sometimes in 55.4 terabytes every day. Five times more than even from 2018. That's ridiculous. Yeah. This is amazing amount of data goes through there. Then they have data on files.pythonhosted.org also. There's some data on there. The money that goes into it, Fastly takes care of a lot of the brunt of the work. So Fastly apparently is donating about, what's the number, $1.8 million of services a month if we were to have to pay for the Fastly services directly.
Starting point is 00:04:28 Oh, my gosh. And they give PyPI a 100% discount, so that's great. Yeah, that's really cool. $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. 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. And now some support staff, they're hiring a project manager soon.
Starting point is 00: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. 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 uh markdown page which is a non-exhaustive wish list of large projects
Starting point is 00:05:32 they'd like to see happen uh so nice be kind of if you're kind of it's sort of like a you know looking forward what are we going to do but it's if we can do it we'd like to do this so that's kind of neat that's amazing i'd never stop to think about how much work and and how many people must use pi pi pi pi i don't know i say pi pi um but like yeah every time i type in pip now i'm gonna think differently like it's just to me it's just a little thank you yeah now i feel like i should go through this fundables list and like pay i don't know like give something back for all the times I've used it. Probably in frustration as well, because something hasn't worked and not appreciated all the behind the scenes stuff. Yeah, the first time I learned about this, I was blown away at how much it takes to keep it going.
Starting point is 00:06:19 And how much you think about how much we all depend upon this as people working in Python. What if it went away tomorrow? Yeah, it was terrible. I can't even think about how much we all depend upon this as people working in Python. What if it went away tomorrow? Yeah, it would be terrible. I can't even think about that. Most scientific research would probably collapse. 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?
Starting point is 00:06:41 I'm a pip person. I don't really use Conda. Some of my colleagues do. It's all just personal preferences, really. 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.
Starting point is 00:06:58 Oh, wow. So I begged them to put pip on. I was like, no, you install like uh software that has been approved like by the it department and i was just like oh god it's not gonna work yeah that's really rough all right super cool 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 and shaharim 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
Starting point is 00:07:37 at a star atlas like the leuven star atlas have you heard of this thing no i haven't um the herschel star atlas is the most famous one but i'm guessing leuven is a bit of an update it's um it's a project by first i'm sorry i'm forgetting their name let's see if i can uh yeah they just say i am i have to go back and pull that up later so they wrote this i doesn't help me. I'm sorry. So it's the goal is to make a publication quality stellar Atlas from scratch using Python. 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. You know, maybe you want to build a map of something
Starting point is 00:08:30 completely different. Maybe you're really into river floating. You want to build like amazing maps of like river floating or whatever. Like you could take the public data and like overlay the things kind of like they did here. So with this, I'll go and find some pictures down here at the end. It's quite a long article talking about how all this works, but there's some really neat graphics that we can find. There we go. So they've got pictures of stars, variable stars, galaxies, nebula, planetary nebula, and all kinds of things that you might care about. Fast-moving stars, I suspect a lot of those might be looping around black holes. What do you think?
Starting point is 00:09:08 I mean, yeah, you probably wouldn't see those astrometrically, but you'd probably get all those variable stars at varying brightness. Yeah, yeah, they call those out, particularly with like a double circle type of icon. Yeah, yeah. Sorry, astrometrically means like the astronomy position. So like incredibly precise. 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 star atlas like this.
Starting point is 00:09:31 It'd be like too fine of a detail, like too small of a change. Yeah. Yeah. Well, so talks about how do you go and create this thing? Says there's a oneplotmap.py that's 1,500 lines long. Trying to write all this together. They talk about using the different libraries.
Starting point is 00:09:50 So it was NumPy for all kinds of data handling. It was PyLab and Matplotlib. So all the graphics that you see here are just layers of Matplotlib renderings over and over and over. Yeah. lib renderings over and over and over yeah and then there was this library called base map which takes care of projections and transformations because i think one of the challenges was how do you project this onto paper you know when it's on you know spherical thing i think they uh so they used stereographic projections i don't know it sounds about right yeah that's all right yeah uh sci-pi and then of
Starting point is 00:10:25 course astro pi which i know dr becky used a lot and then round of applause for astro pi for celestial coordinate transformations so yeah a lot of neat not a lot of neat libraries on there sounds like i'm sure use astro pi like any of the others sound familiar? All of them. I've used every single one of those packages before, especially AstroPie. I have the same problem with 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 surface of a sphere. You can think of it as, right? And so you project that down using AstroPi and PyFM as well because sometimes people work in different coordinates. So you can work in sky coordinates,
Starting point is 00:11:12 which is sort of how high you are above the horizon and how far around you are. 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 who are Milky Way astronomers do. And then you've got to like,
Starting point is 00:11:28 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. What's cool about this map, it's the constellation Cygnus, if you can see that there.
Starting point is 00:11:42 So that's the swan. It looks like a big cross in the northern sky. But that is the constellation or the area of the sky that the Kepler space telescope stared at. Oh, nice. So that's where the exoplanets have been discovered. Yeah. Pretty much.
Starting point is 00:11:54 Yeah. All of the exoplanets we know of, some like 5,000 of them will pretty much be in that patch of sky. So I'm really glad they chose that constellation to show in this piece. How neat. Yeah. And then over here, let's see if I can find it, talked about the sources of data. There's all these different public sources of data that they put together. But 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. And they're like, well, I went through here and I had to correct all of these things because they
Starting point is 00:12:26 were, this data was a little bit off here. And that data was a little bit off there. And then I had to label them. And another thing that was talked about a lot is how do you create these pictures without text that overlaps? So we mentioned this thing's called adjust text and where it'll actually take a mapplotlib thing with labels and then rearrange the labels on the graph so that the the text doesn't overlap which
Starting point is 00:12:51 is really cool and it has a nice just changed my life really yes this is like a huge problem it's been solved it exists and it's just python code god i love that this stuff happens isn't this cool it's awesome i'm just out here like jaw on the floor like oh someone figured it out super cool that's awesome so yeah there's there's a bunch of stuff 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. Cause it's so much about, Oh yeah, I could just run these together,
Starting point is 00:13:30 but then I spent a month fixing this and correcting that and offsetting that. And yeah, so pretty neat. That's really cool. Yeah. I guess the final, I want to know where I am in galactic coordinates. I can't remember off the top of my head but yeah it does have galactic coordinates i just don't know what they are so is the supermassive black hole at the center of the universe is that at zero zero zero the center of our galaxy yeah yes um so there's many galaxies in the universe our galaxy is the milky way the supermassive black hole at the
Starting point is 00:13:59 center of it would be yes l equals zero b equals zero. B equals zero. Okay. Awesome. 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 because it has so much data and whatnot. But anyway, pretty neat. If you're looking to build maps with Python, here's a bit of a case study, I suspect. Is it open source? Like is it on GitHub? Can you grab it yourself and have a play around? I wish. No, it's not. I looked around. I couldn't find much of the code. There's little snippets of code shown, but yeah, that's, that's all. I was thinking like, can I get a section of sky? I'm going to print it out. I'm going to frame it. It's going to look really cool.
Starting point is 00:14:40 Exactly. Yeah. This is the one I want to put on the wall. Yes. Millennials love maps on walls. That's what I'm going to do. All right. Before we move on this, just a quick shout out to Dr. Becky from PrideFind on the live stream. Yay. Dr. Becky is back. Bought your book after watching the live stream with Michael. Really enjoyed it, even though you don't have a space background. So very cool. That's awesome. I'm so glad you enjoyed it. Yeah. All right. Speaking of things that we couldn't all enjoy and can take us back, calculators. Yes. background so very cool that's awesome i'm so glad you enjoyed it yeah all right speaking of things that we couldn't all enjoy and can take us back calculators yes i i was thinking about how i
Starting point is 00:15:12 haven't i haven't thought about my graphical calculator in a long time 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 I don't know but like 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 um and I remember thinking like after that I barely even thought about I don't even use it in my everyday like work or life anymore when a lot of the things i do i can just use spotlight on my mac to do a quick calculation or whatever i'll do it in terminal or something like that and then i saw this the other day and was just amazed by it because i remember this
Starting point is 00:16:00 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. But the screen like was, it was like an old game boy or like a Nokia 3310, right? It was the most pixelated screen in the world. And making those graphs was so frustrating. Like it just wasn't intuitive. It wasn't fun, I didn't think. And then I saw this the other day where look at what like kids can use these days. They have this graphical calculator that has this proper, beautiful, actual color screen
Starting point is 00:16:37 and that you can use Python on to make plots and do calculations. And I just think this is such a fantastic idea because teaching kids to code early is so important. Like it can be used in so many different areas of work and life and science and everything like that. But I always find learning to code without a purpose necessarily is really difficult. Like just deciding one day, I'm going to learn how to code. Where do you start? Like, unless you've got a project,
Starting point is 00:17:07 like what do you do? So the idea of learning as you're going through and actually learning the maths or learning the science with your graphical calculator is so good because then it just starts to come naturally to you.
Starting point is 00:17:17 It's like the first thing you think of to do to solve a problem is to use Python. 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 if they're going to do maths at like a higher level or something um yeah it's so cool if you consider those weird programming languages that they that come you know like polish notation reverse polish notation and stuff like this is preparing them for proper programming. Exactly, yeah. And I think that if you learn it in this way,
Starting point is 00:17:47 it will just become so second nature that then it's not a barrier for you to go on and do anything else, right? It just 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. As you get into university and wider
Starting point is 00:18:06 world, like having that knowledge from that age is so good. I mean, I got mine at like 16. 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. Exactly. Yeah. I think I might've gotten mine. It really was a decent one right when I got to college. But yeah, I had even had one of the TI-93s that had a full QWERTY keyboard on it for a while. That was fancy when I was a TA in grad school. specialize early in the uk so like i was only doing maths and science by 16 and 8 like 16 to 18 so that's why i got mine earlier um but yeah like learning python then would have been so helpful because i got to university and they were like oh okay now time to learn python but let's do it while we learn general relativity and let's code up some general relativity i was like okay i'm still printing hello world like one thing at a time yeah so the fact that you can learn it there here it's so cool how do you type into this thing
Starting point is 00:19:10 though very slowly very slowly first of all yeah i imagine it probably just has like an old phone keyboard so you know three letters per number but it might have one of the full quirties like michael was talking about so i think i think it's the more skinny tall ones, the more like an old phone. It'd be awesome if you could transfer Python files over, but yeah, it has like a REPL and everything. Which is pretty interesting. I'd hope it'd have autocomplete.
Starting point is 00:19:35 That would be great. Oh, yeah. I hadn't even thought about that, but yes. It'd be better. A couple comments from the live stream. Marcel says, Polish notation is the opposite of method chain. Yeah. And Kim says, graphical calculators would have been really handy in high school. I never even seen one before I got into engineering, Python, and reverse Polish notation.
Starting point is 00:19:54 Sounds tricky. And then Pamphil Roy from the SciPy world says, oh, yeah. He also told me you can't put things like SciPy on there, sadly. But hopefully soon. Maybe this is just V1. Oh, yeah. They also told me you can't put things like SciPy on there, sadly. But hopefully soon. Maybe this is just, you know, V1. But, yeah, I guess packages in general, right? They talk about having Turtle and stuff, but, you know, I'm not sure how much they have added modules. How cool would it be to have SciPy on there?
Starting point is 00: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 probably skipping the differential equations that you're supposed to be learning exactly i just partial differential equations are easy i just say like solve and give it the number yeah well i would check your answers i think turtle's kind of neat on there also because I, I mean, I programmed a sub hunt on my single line, reverse Polish notation, HP calculator, just because I could sort of thing. So I think doing some games in there, it might be kind of neat. Yeah.
Starting point is 00:20:58 Yeah. People definitely agrees with you about how cool that would be. Yeah. Awesome. All right. Before we move on to the next one, I'll let me tell you about how cool that would be. Yeah. Awesome. All right, before we move on to the next one, let me tell you about our sponsor this week. So this episode of Python Bytes is brought to you by Sentry.
Starting point is 00:21:11 I love Sentry. We use Sentry. So how would you like to remove a little stress from your life? Do you worry that users might be having difficulties or encountering errors with your app right now? Would you even know if they did until they send that email? How much better would it be to have error or performance details immediately sent to you,
Starting point is 00:21:28 including call stacks, tracebacks, values of local variables, and even the logged in user that ran into the error? With Sentry, it's not just possible, but it's simple. We use Sentry, like I said, on all of our web apps, on Python Bytes and TalkPython, TalkPython training courses. And I actually had somebody
Starting point is 00:21:45 run into an error. I got a Sentry notification that this user had a problem doing this thing. I fixed it and sent them an email and they said, oh, that is incredible. I was about to email you about this problem I had, but it was late. So I was going to do it tomorrow and you already fixed it. So what a surprise. So surprise and delight your users today. Create your Sentry account at pythonbytes.fm slash Sentry. And when you sign up, please, there's a button that says get a promo code. 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. Not that you want more errors, but maybe more features is good.
Starting point is 00:22:21 So pythonbytes.fm slash Sentry and promo code Python Bytes. Brian, you got the next one. Okay. I got to say though that the artwork on that Git Sentry page was great. Yeah, it's very cool. Well done. So I've been trying to shift
Starting point is 00:22:39 doing a little bit more work with GitHub Actions on my projects. And, but, you know, and there's probably great documentation somewhere. I just don't know where it is. So, 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, I like this one that I just saw recently. This one's Python package, CICD with GitHub actions.
Starting point is 00:23:06 Just write what it says on the 10. 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. First off, talks about when you want actions to happen. So in talking about when they happen, this project happens on pull request and on push to certain branches. So in this case, main branch.
Starting point is 00:23:36 But you really can pick several branches that you could do this on and to have actions happen on those. I like having a couple of different development branches, especially on things that I'm active on and don't want happen on those. I kind of like having a couple different development branches, especially on things that I'm active on and don't want to release yet. So these are nice. And then what else? I'm going through a matrix of stuff. Most of the article is talking about syntax checking on different things.
Starting point is 00:24:01 I don't know if really that's important, but I would probably do a PyTest on multiple things. I don't know if really that's important, but I would probably do a PyTest on multiple matrices. But the matrix, the notion of a matrix is kind of interesting, having the different environments. So in this case, this person is talking about maybe running on multiple versions of Python across Ubuntu, macOS, and Windows. And that's exactly what I want, those sorts of combinations multiple versions of Python across Ubuntu, Mac OS, and Windows. And that's exactly what I want,
Starting point is 00:24:30 those sorts of combinations to make sure something's working. With all the devices and stuff that you have, do you see this maybe even something that work as well, like with all the hardware devices and the different ways it's configured? 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, and it's just exploding.
Starting point is 00:24:50 But yeah, that's a different nightmare. But this one is taken care of for you. So it's a neat thing to test across all those. And I knew how to do it on Talks, and I knew how to do it on Travis, and getting it to work on GitHub Actions is just different. It's not know, I knew how to do it on talks. I knew how to do it on Travis and
Starting point is 00:25:05 getting it to work and get it out of actions is just different. It's not harder. It's just different. So I appreciate this walkthrough. And then what, going through running example of running tests, of course, and checking artifacts, which is interesting. I hadn't thought about that. There's, you know, your build might generate, you know, documents or other artifacts that you want to keep around. Having some checks around those is a good idea too. And then a couple, 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. So there's some branches that you'd like, maybe you're maintaining and nobody else has access to but if you push to that you want tests to run and then automatically
Starting point is 00:25:50 to merge to something um and have it setting up auto merge um there's some some steps around that which is it's pretty darn cool and the last bit is um pushing toPI. So releasing, release automation. So you can automatically, in this case, setting up a rule so that if you push the tag that starts with a V, that means you've updated the version and you want that to push automatically out to PyPI. So hooking that up with GitHub actions. Oh, that's clever. I'd never thought about triggering it off of a tag name. I've always thought of it just certain branch means go. But yeah, that's clever.
Starting point is 00:26:29 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. Yeah. Dr. Becky, what's the story with GitHub Actions and all of your colleagues, people use it? I don't think I even know what GitHub Actions is, to be quite honest. I had a drink and I spared you from hearing me gulp before. Yeah, I don't even think I know what,
Starting point is 00:26:55 I've used GitHub Actions, to be quite honest. 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. I'm sure somebody has though but no yeah i'm sure some people maintaining some of the packages and stuff that's what i was thinking yeah i don't think i have anything like that um to maintain a lot of my colleagues put out stuff but really my code is for sort of my use and for any specific colleague that has like a science case use for it um but github i mean i love a
Starting point is 00:27:26 github because one of the things i love doing with it is committing when i've written like a scientific paper i'll even put the latex on on github the what we what we sort of code our scientific writing in right um and 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. 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.
Starting point is 00:27:58 And 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 and i don't remember much from that whole two months time it's a it's a huge blur except one vivid memory of the fire alarm going off in the department and being like panic git commit remember this i've got this one commit message in my thesis repo that's basically just, I just mulled the keyboard because I was just like, the firewall's going off.
Starting point is 00:28:32 Git commit anything in Git Push because I was like, what if, like what if I don't have a backup of like 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 like pulling me out of the room because the firewall's going off. You've got to run away oh my gosh that's so fine but yeah that reminds me of
Starting point is 00:28:52 a uh sign i saw yes exactly in case of fire one get commit to get pushed three leave building i actually went through this but during during a PhD thesis write-up, which I would never recommend to anybody. I'm amazed that you found this image so fast. Oh, yeah. No problem. I got you. A couple of comments from the live stream.
Starting point is 00:29:19 Justin Boyce says, love being able to use GitHub Actions for deployment. Keeps me from botching deployment by making mistakes. I agree. Do it more often if it's automatic. And then Jared Chung says, looks great. Definitely going to hook this up to the packages I maintain, but which change infrequently so you don't have to remember the workflow and so on. says i heard github is now offering free tier for institutions with unlimited contributors for private repos and two thousand dollars or two thousand actions a month for zero dollars so
Starting point is 00:29:50 yeah that goes alongside with the academics uh package as well right for students it's not just students it's also anybody with like a dot edu email or dot ac dot uk which is the universities over here so i have like a loads of free repos and stuff like that which is great so good of them yeah fantastic well cool all right moving on to number five not this one this one so another spacey one another spacey one garrett dunn uh 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. I mean, as an astronomer, it's like in your way,
Starting point is 00:30:34 but as a way to empower people in remote places, it's kind of cool. I'm really split about it, to be honest, because I want it to go ahead. 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 and i know like even before this launched you i'd take an image and you know and i'll end up with a satellite trail and you know at least one of 10 i've taken you know a telescope that evening so and there's gonna be more right exactly yeah and it's not like something you can remove people
Starting point is 00:31:04 like i'll just remove it as a source of noise. If that thing goes right over your 15-minute exposure of a galaxy that's billions 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.
Starting point is 00:31:21 But it's really cool that they're going to use Python. That could be something we could get warnings from, 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 yeah i would actually love to see spacex work more closely with all the satellite and the locations observatories and say all right here's how we're going to help you solve this problem. Yeah, that would be great. Yeah, diving into this. So Stack Overflow actually did a four-part series on the software that SpaceX uses to build all their things in space. And this one in particular is about the network protocols. So if you look at how the Starlink system works, it turns out that most of the stuff is C++
Starting point is 00:32:06 both on the ground systems and the things in the sky. So they talk about that their software breaks into two parts, software that flies and software that supports the things that fly. So the software that flies is all C++ that's on embedded chips on the satellites. But then on the ground, there's a whole bunch of communication APIs and coordination APIs. If you look over at where these satellites are and where they're covering, there's these cool real-time maps. I'll put one on the screen here.
Starting point is 00:32:38 You can actually see them flying by here where Brian and I are. At least I'll zoom in on that area. And you can see the overlap of the signals of the different ones and how they're oriented and all kinds of stuff. So they need to adjust and move these satellites around in orchestration and orchestrate them basically. 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. Because, you know, 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
Starting point is 00:33:15 out of control really quick, they say. So there's a lot of simulations that need to be done and they do that in Python. And once they get the working version, then they rewrite that in C++. What do you two think? That's a cool picture, right? Yeah, that's really cool. That is neat. Yeah. And speaking of GitHub Actions, they probably are actually using GitHub for this, but it doesn't explicitly say. 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. Like, are you kidding me? This is 2021.
Starting point is 00:33:45 Like this should be Git push, wait a few seconds, and it's now the new version. 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. That adds an extra level of panic to you get pushed, doesn't it? It definitely does. Oh, whoops, I wasn't ready. All the satellites stopped responding. Whoops.
Starting point is 00:34:14 So yeah, it says the Python version allows them for rapid iteration during the design phase. And once it's all happy, they write in C++. So yeah, anyway, pretty cool. I'll link to some of these maps that track it and the four-part series and so on so garrett thank you for that it's really cool to see because it's very similar to what um space telescope uh are doing for the
Starting point is 00:34:34 james webb space telescope so sorry space telescope is the institution in baltimore that manages like the hubble space telescope and the new one that's gonna hopefully launch in october it's called the james webb space telescope and i think that's a similar sort hopefully launch in October is called the James Webb Space Telescope. And I think that's a similar sort of platform in that 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,
Starting point is 00:34:58 like where to point, how long that will take, and all those kind of things when they're sort of deciding, I want to use this to do this science that's all been done in python like all of the uh sort of tutorials of like how to figure out how much like james webb space telescope be able to see of this thing you want to look at is all done in like ipython notebooks jupiter i guess we should call them now um so it's really cool to see that like it's you know it's 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.
Starting point is 00:35:34 Oh, that's really cool. I knew a lot of the telescopes were using Python, and that's going to be a massive new telescope. The James Webb telescope is going to be a big deal, right? Yeah, it's going to be a massive new telescope. The James Webb telescope is going to, it's going to be a big deal, right? Yeah. It's going to be a huge deal. We've all got fingers crossed that launch actually happens because it was originally planned for 10 years ago and three years ago. Oh my gosh.
Starting point is 00:35:55 Yeah. Fingers crossed, I guess we're coming soon. All right. Dr. Becky, you got the next one. Yeah.
Starting point is 00:36:01 So I feel like I've, I've done the scientist thing of bringing a scientific paper to a python podcast but i'm bringing what i know um so i found this 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 um when 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,
Starting point is 00:36:39 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. 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. And they're not entirely sure how to do it, but they might know Python. I use Python to, you know, analyze the images that come off the back of professional telescopes. So you could do it with amateur telescopes or amateur camera, you know, just
Starting point is 00:37:20 an SLR camera you've set up in your back garden to take an image of something um but you want to see fainter and fainter things you have to take lots and lots of like short images so you don't get you know motion blur and stuff like that with the with actually the rotation of the earth but they're all the wrong coordinates so what do you do because they're not all in the same place so you use astropi to figure out you know how to do this and does it like realign the images to adjust for that rotation exactly yeah yeah you can do that 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
Starting point is 00:37:54 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 it's very very long but i think you could definitely make this like a project if if someone was keen enough to do. And so that's why I thought I'd bring it. And I feel like obviously we need a huge shout out to Astropie and Math.lib and everything like that for making these kinds of things possible with
Starting point is 00:38:36 images that you can take in your back garden and stuff that you can get at. 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, like amazing, you know? So that'd be amazing. Print them out. Yeah. Print it out and put it up as artwork in your house or something. That'd be fantastic. Instead of just saying that's a, that's a cool picture of a galaxy. Like I took that picture of that galaxy. That's totally different. Exactly, yeah. You know, I can imagine someone getting an amazing picture of Andromeda,
Starting point is 00:39:07 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 like frustration with a GUI, right? That's just this like, ah, interface, what's going on? I don't know how to use it. Because it's just pure Python,
Starting point is 00:39:25 I think if you already know Python, it's definitely the easiest way to get into this because it'd be something familiar with something new. So even though it's a scientific paper, I think it would pass. Yeah, it looks super interesting.
Starting point is 00:39:40 The code doesn't look terribly challenging, but it's exactly what you need to solve the problems, right? Exactly. Yeah. Cool. Cool. All right. I think that's it for our six items. Brian, you got anything? No, just apologies to the stream people. For some reason, my video stream is frozen. I think that you might just be really, really zen and still.
Starting point is 00:40:01 I thought he was just really interested in the paper,. He was like, wow, look at that. You've mesmerized him. Absolutely. All right. So before we move on, actually, Justin Boyce says thanks for bringing this, Dr. Becky. I did pick up astrophotography barely as a hobby during the pandemic and it looks good. So yeah, already got one person into it. Taking that
Starting point is 00:40:20 like biggest step to go from like, oh, cool. I managed to photograph some stars to getting like the galaxy's nebula. I think this this will help people take that step i think so yeah for sure i'm glad i got a i got a couple of quick shout outs at the end first i want to point out that if you like this conversation check out episode 303 of talk python talk Python where Dr. Becky and I dive all into the Python astronomy world. That was fun. And then I just met with one of the founders of this company called Kabuntu Focus, which I thought was a pretty interesting idea. So what they're going for is the way that Apple works is they right, you know, they make the Mac and then they make Mac OS.
Starting point is 00:41:12 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? So that's sort of the same idea, but for Linux. 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. So, for example, down here at the bottom, keeping it in the space world, we have Chris Matman, who, if I refresh it, it'll come up at the right time maybe. It's supposed to cycle. Anyway, Chris Matman said he, who works at JPL, who he did some machine learning training
Starting point is 00:41:39 on his MacBook Pro and it took like 37 hours. 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. So, and by the way, you can actually buy it. Like these, these new GeForce chips are cards. They're basically unobtainium, right? You can't get to them. So yeah, anyway, pretty, if you're looking for a desktop Linux world, check that out. Dr. Becky, anything you would like to give a shout out to?
Starting point is 00:42:10 Maybe I could throw out your Amazon page. Yeah, sure. Yeah. Yeah, so I've written a book. So it's got different names everywhere in the world just to confuse everybody. 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, Das kleine Buch von Grossen Knall. essentially it's written for i think anyone who is a complete beginner in space but has always
Starting point is 00:42:45 maybe been a little bit curious would love this book it's it's like a the 10 things that if you were going to be at a dinner party and you'd be like hey did you know this like these are the things you should know about space right but i also think that anybody told me about it yeah i also think anybody who's been keen on space as well will also get a kick out of it um because it takes ideas that you might have heard before but then it just adds an intellectual level um of like where we are right now on the edge of like our understanding of this thing so um it's a really short read as well um it's not heavy it's not a big hefty thing it's really skinny my laptop's currently propped on top of it otherwise i would show you how skinny it is but i disrupt everything um so um yeah if people want to check that out uh please do 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 uh
Starting point is 00:43:36 would like that um it's a good gift so yeah rahan asks is it really big? Nope. It's not that big. It's about 200 pages or so. Yeah. Pradvan says I can vouch for the book. Yeah, absolutely. Thank you, Pradvan. And then also says that Brian imported Zen. It's just very cute.
Starting point is 00:43:57 I like that. Well, I've got a close friend that has a telescope and he always wants to talk about space and i know nothing so i'm definitely going to read this book so i can talk to him there you go fantastic perfect for that all right i have we always close out the the show with a joke but i've went and found some space memes because 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, that's so fun because people click on them and they're like, I just learned more
Starting point is 00:44:28 in this 15 minute video about space memes that I did in my entire high school career of physics. And I'm like, that was always my intention. Wah, I draw you in with the memes and then I hit you with the science. Exactly, exactly. It's so good. Yeah, so maybe we can link to some of the science. Exactly. Exactly. It's so good. Yeah.
Starting point is 00:44:49 So maybe we can link to some of the proper ones you've done. There's a lot. So I'm going to throw out four quick little space memes. I think four is it. I can't remember what the names, I gave them each a title. So the first one is Uber. So there's Matt Damon sitting on ours alone. Remember he gets abandoned there and he says, where's my uber and then there's the elon musk rosemary shot into space says i'll be there in a minute
Starting point is 00:45:08 i mean i don't know whose definition of minute that is seriously why did they launch a tesla into space every time i'm reminded that they did this i'm like but why yes i know why there's no reason because they could i think that would they never just because they could they never stopped to think whether they should yeah well it's the same company that uh is rocking dogecoin so you know yeah all right next one. This one's called Flaws. Spaceship design. Here's a picture of a spaceship with a cutout so you can see inside. It says, when building a spaceship, the tiniest details
Starting point is 00:45:51 are crucial. For example, this spaceship may be flawed because it has a giant hole in the side. Brian's like squeak laughing. That's the level he's reading that's awesome and yet he's still very still I do love these like they're like a hybrid
Starting point is 00:46:14 between a really scientific diagram and then something you would put out to the public or use in a talk or something like that and I remember the ELT the extremely large telescope that we're building which I know is a stupid or use it to talk or something like that. And I remember the ELT, the extremely large telescope that we're building, which I know is a stupid name.
Starting point is 00:46:33 They used emperor penguins for scale next to it. In like the public image. I was like, who knows how big an emperor penguin is? Is that like a knee height? Is that a waist? What are we talking here? Apparently it was because on average an emperor penguin is a meter high. So they were like, oh, perfect. It's a meter. It's like a meter rule. And I was like, yeah, but nobody knows that. Like just put a human. Dean Link's about there in the live stream says, boy,
Starting point is 00:46:59 the mileage on that Tesla would make it really hard to resell. I agree. I like that. All right. The next one is distracted. There's a cat in a spacesuit staring. It says, mesmerized by the red dot on the wall, missed space launch. I'm now wondering if there's been any, like, cat-stronauts in previous. There's been dog-stronauts.
Starting point is 00:47:20 There have, yeah. There's been monkey-stronauts, but I don't know if we've ever sent a cat to space I propose a new thing like maybe a cat could spend some time on the international space station just think of all the memes and all the funny videos
Starting point is 00:47:35 I don't think it would have a good time can you imagine like it constantly tries to like have it's like hackles raised but it can't because it's in 0g so it just goes in a small circle really slowly 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 maybe it would do something like that like i don't know. I'm really intrigued now. A cat in zero G, what would it do?
Starting point is 00:48:07 Bamfield says Congo tried to send a rat. Once they've sent a rat, they're going to need a cat to solve the rat in space problem. And they said also Justin says space toilets are hard. Space litter boxes are nearly impossible. And Sam Worley is like
Starting point is 00:48:21 you really think they could get a cat to go into a space rocket? The minute they open the door the minute they open the door of the space rocket the cat will just dart onto the bed but you can't get it like when you take it to the vet alright let's round it out with the last one
Starting point is 00:48:38 space Vegas there's a black hole what happens in a black hole stays in a black hole nice space Vegasgas i like it that's right yeah i know we talked about this one before but it made it in a second time i guess instead of sin city would it be like bin city because i don't know spin city yeah spin city yeah maybe something like that things rotate as they go into the black hole right they don't just go straight do they yeah yeah it's actually really really hard to grow a black hole and make stuff fall in
Starting point is 00:49:07 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 nice well once it's in it stays there yeah get it out 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

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.