Latest / Talk Python To Me / #29: Python at the Large Hadron Collider and CERN
Transcript
- 0:00The largest machine ever built is the Large Hadron Collider at CERN.
- 0:03Its primary goal was the discovery of the Higgs boson, the fundamental particle which gives all objects mass.
- 0:10The LHC team actually achieved this audacious goal in 2012, winning them the Nobel Prize in physics in the process.
- 0:18Today on Talk Python To Me, Kyle Cranmer is here to share how Python was at the core of this amazing achievement.
- 0:25This is episode number 29, recorded Thursday, September 24th, 2015.
- 0:51Welcome to Talk Python To Me, a weekly podcast on Python, the language, the libraries, the ecosystem, and the personalities.
- 1:05This is your host, Michael Kennedy. Follow me on Twitter where I'm @mkennedy.
- 1:09Keep up with the show and listen to past episodes at talkpython.fm and follow the show on Twitter via at Talk Python.
- 1:16This episode is brought to you by Hired and CodeShip.
- 1:19Thank them for supporting the show on Twitter via at Hired underscore HQ and at CodeShip.
- 1:25I don't have much news to share this week, but I am both honored and thrilled to bring you this episode,
- 1:31and I can't wait for you to listen to it.
- 1:32So, let's get right to the interview.
- 1:34Let me introduce Kyle.
- 1:37Kyle Cranmer is an American physicist and professor at New York University at the Center for Cosmology and Particle Physicists
- 1:44and affiliated faculty member at NYU's Center for Data Science.
- 1:48He is an experimental particle physicist working primarily on the Large Hadron Collider based in Geneva, Switzerland.
- 1:54Cranmer popularized a collaborative statistical modeling approach and developed statistical modeling,
- 2:00which was used extensively for the discovery of the Higgs boson at the LHC in July 2012.
- 2:06Kyle, welcome to the show.
- 2:08Thank you. Thank you. It's a pleasure to be here.
- 2:10Yeah, we have some amazing science and programming to talk about today, so I'm really excited to dig into all these topics with you.
- 2:17Yeah, no, I'm excited to see where it goes.
- 2:20Yeah, for sure.
- 2:21So, let's, you know, we're going to talk about the Large Hadron Collider,
- 2:26about using Python for scientific research and all those sorts of things,
- 2:31as well as some other cool projects that you've got going on.
- 2:33But people like to know how folks like you and your position kind of got started and they like to hear the background.
- 2:41So, maybe we could start with, you know, what got you interested in physics and what got you interested in programming and how do you get to where you are?
- 2:48I've been interested in, you know, in physics, you know, since I was a kid, not really knowing that that's what it was called.
- 2:53But later on, you know, I think, I guess it was in high school is when I really realized that it was physics that I wanted to do.
- 3:01I grew up in Arkansas and, you know, Arkansas is not exactly known for, like, leading the tide of physicists and computer scientists in the world.
- 3:09But they had started a special math and science high school that it was public school, but you actually lived there.
- 3:15And when I was there, I was just surrounded by all sorts of people, kind of the nerds and geeks of Arkansas.
- 3:21And it was really a special time.
- 3:23So, during that time, I, you know, got even more into physics, but it's also, that's when I was first exposed to serious programming.
- 3:30So, actually, even Python, like in 95, actually 94, I guess, I had a friend that was into early web things and he was playing with Zope and the Zope, you know, object database.
- 3:41And so, I started working with him and did some early web projects and that was kind of my first exposure to Python.
- 3:49So, that was a long time ago.
- 3:51And then that's, it's funny how much those experiences kind of keep being revisited today.
- 3:58Yeah, I'm sure you keep coming back to that.
- 4:00You know, basically, programming these days seems like a required skill to be a physicist.
- 4:06Yeah, no, well, it depends on what you do, but definitely for what we do, programming is a required skill.
- 4:14And unfortunately, it can, you know, for people that don't have those strengths, it really takes away from their ability to try to do the physics that they want to do.
- 4:23So, you know, so for incoming graduate students, you usually see a pretty big divide between people that are, have some programming skills and don't.
- 4:31And usually, the people that don't will catch up a little bit later, but, you know, you lose time and that's unfortunate.
- 4:36Right.
- 4:37I'm sure it's like a huge scramble, like, oh my gosh, I got to learn all this programming stuff too because, you know, we have projects or whatever, right?
- 4:44Right, right.
- 4:44It also colors a lot of the flavor about how we approach computing because somehow you have this enormous computing problem that you need to deal with and you would like to do it as nicely as possible.
- 4:56But it also can't be too fancy or the bulk of the physicists might not be able to understand what's going on.
- 5:02You have older physicists from the Fortran days and you have younger physicists that maybe never took any, you know, programming courses, like any serious programming courses.
- 5:10So things have to be somehow kept simple but still work for the difficult problems.
- 5:16And so it's a difficult balance to strike.
- 5:18Yeah, I'm sure.
- 5:20So let's talk a little bit about what you guys are doing at the Large Hadron Collider.
- 5:24And first of all, you know, congratulations on the Higgs boson discovery.
- 5:30That's amazing.
- 5:30Oh, thank you.
- 5:31No, it was, yeah, many, many years of work.
- 5:35And when it finally came, it was a huge treat.
- 5:39I don't know.
- 5:39It's funny to have such a big thing like that happen fairly early in your career.
- 5:44It's like, now what?
- 5:47Yeah.
- 5:47So, but yeah, so at the LHC, you know, we have this huge collider that's in Switzerland.
- 5:53It's about 17 miles around and underground.
- 5:57There are all these super connecting magnets that help protons go, you know, bend them in a circle at essentially the speed of light.
- 6:03And they're colliding together all the time.
- 6:06And they smack into each other and they make, you know, a lot of new particles that come flying out.
- 6:11And they hit our detector.
- 6:13And our detector, you can think of sort of like a digital camera.
- 6:17You know, it's like basically a bunch of pixels.
- 6:19And the particles smack into it and you get an image.
- 6:22But it's a 3D image.
- 6:24So it's a 3D detector.
- 6:25And the detector is like the size of a 12-story building.
- 6:29So, yeah.
- 6:30I think that, you know, when you just hear about particle colliders and especially LHC, you have maybe this idea of like a tube where things are shooting around.
- 6:43And, you know, how big does the tube have to be?
- 6:45Not that big.
- 6:46But the actual experiments, the collectors, I was blown away when I learned about how big they are.
- 6:53Like you said, 12 stories.
- 6:54These things are huge.
- 6:55Yeah.
- 6:56No, they are.
- 6:56And the range of scales is pretty crazy because we have to be able to track where these particles go very precisely.
- 7:04So, like, close to where they interact, you know, we're measuring things at the, like, micron level.
- 7:09And then they fly out over, like, the size of a building.
- 7:14And we're still measuring where they're going at this very precise level.
- 7:18But, you know, it's just this gargantuan thing.
- 7:20So you have to align it properly and all sorts of challenges there.
- 7:24And there are about 100 million, you know, well, a few hundred million electronic readouts coming out of this beast.
- 7:30So, you know, it's like a 100-megapixel camera or something like that.
- 7:35And we're taking 40 million photos every second.
- 7:38That's a stunning amount of data.
- 7:41That is a stunning amount of data.
- 7:42And so if you, you know, we have to slap special electronics, like, straight onto the detector to be able to start preprocessing it and compressing it and sort of, you know, coming up with some way to deal with the data volume.
- 7:56Because, you know, it's something, it's, you know, there are just totally staggering numbers about the data flow that's coming straight out of the detector.
- 8:04So how do you capture and store that?
- 8:06Do you store that, like, on hardware right on, like, Atlas in the machines?
- 8:11Or do you, like, get that into, like, a cluster of servers?
- 8:15Or what happens?
- 8:16Right, right.
- 8:17So we have a kind of a hierarchical online real-time system for tossing away, you know, the majority of the data.
- 8:27So we have to actually, we write algorithms that have to look at the data and real-time decide, does this look interesting or not?
- 8:35And so we go from the sort of 40 million a second through this, like, three levels of filtering down.
- 8:41And then we get to the point that we save something like a few hundred of these collisions every second.
- 8:48And that turns into, you know, several petabytes a year of data that we actually analyze later.
- 8:55That's amazing.
- 8:56It's got to be a little stressful to work on that initial filtering algorithm.
- 8:59Because what if you threw away the Higgs boson before you discovered it, right?
- 9:03That's right.
- 9:04Yeah.
- 9:04No, people, we always worry that we're, you know, kind of throwing the baby out with the bathwater.
- 9:09And sorry about the living in New York here.
- 9:13Yeah, no worries.
- 9:14So the, yeah, we call that thing the trigger.
- 9:18And, you know, that's something that I worked on a bit.
- 9:21It's true that, like, if we don't find anything else in this next run of the LHC, you know, a lot of people will think exactly that.
- 9:29That maybe, you know, the way the trigger was configured, we were throwing away the interesting stuff.
- 9:33But luckily, we're not stuck to that.
- 9:36You know, we can go and we can change it and things like that.
- 9:38But that is the worry.
- 9:40Sure.
- 9:41Yeah.
- 9:41I mean, you still have the time spent and the energy and all that, right?
- 9:45Yeah.
- 9:46Yeah, sure.
- 9:46You can rerun it, of course.
- 9:48But, you know, you got to, I suspect time is a valuable thing on that machine.
- 9:54Yeah.
- 9:55No, for sure.
- 9:56It's expensive to run.
- 9:57So, absolutely.
- 9:59Yeah.
- 10:00So, you know, I have a lot of listeners who are scientists and physicists and data science and so on.
- 10:07But a lot of them who are probably not.
- 10:12And so, I wanted to make a movie recommendation and a book recommendation just for people to, you know, if they want to kind of set the stage and learn the background, you know, as part of this whole thing we're talking about.
- 10:23I wanted to recommend the Particle Fever documentary.
- 10:26Have you seen this?
- 10:28Yeah, yeah.
- 10:28I actually have a credit in that movie.
- 10:30I worked with them quite a bit.
- 10:35And at one point there was a scene that was shot in my office but ended up having to cut it because it didn't really fit well with the, you know, it was a good choice.
- 10:45But it was painful.
- 10:46But they were nice.
- 10:47I worked with them a fair amount and got to go to the, like, you know, the opening in Sheffield at a documentary film festival and hang out with the producers and the whole crew.
- 11:00But it's a great film.
- 11:04I think it definitely, it's good for a non-physics audience also.
- 11:08It's not a technical film.
- 11:09It just basically captures what it's like to be inside one of these experiments and the sort of stress and the, you know, the drama associated to it.
- 11:18I think it's really one of the best science documentaries ever.
- 11:21I absolutely agree with you.
- 11:22I think it really captures the excitement, the imagination, the drama in a way that, you know, anybody could appreciate.
- 11:30And so, I definitely recommend people watch that.
- 11:32It's available for streaming on Netflix and iTunes and other places.
- 11:36And then the other thing is the book called Present at the Creation, Discovering the Higgs Boson by Amir Axel.
- 11:44I messed up his name.
- 11:45But that's also really good.
- 11:47So, people who are out there and want to learn more about what we're talking about, I think I recommend those.
- 11:51Okay, great.
- 11:52Yeah, I actually haven't read that second book.
- 11:54Yeah, I really enjoyed that book as well.
- 11:58It predates the Higgs Boson.
- 12:00So, it's like a lot of anticipation.
- 12:02So, that's cool.
- 12:02I see.
- 12:03Okay, great.
- 12:03Maybe we could talk a little bit about, like, the really big picture of software at the LHC.
- 12:11Because there's not just one team and there's not just one experiment.
- 12:14There's how many collectors?
- 12:15Are there seven collectors?
- 12:16Right.
- 12:17So, well, there are two really big kind of multipurpose particle detectors, Atlas and CMS.
- 12:23And I'm on Atlas.
- 12:24And those two experiments have, you know, in the neighborhood, a little bit more than 3,000 physicists working on them.
- 12:32So, you know, so it's a, there are big groups of people.
- 12:35And then there are two other experiments that are, you know, slightly smaller in scale, but they do, you know, and slightly more specialized in terms of the physics that they do.
- 12:45And then there are several other smaller dedicated experiments that are quite a bit smaller.
- 12:51And so, I don't, you know, it depends on how you count a little bit.
- 12:55But usually, you know, there's sort of the two big multipurpose detectors and two other more specialized ones that are the dominant, like, LHC experiments.
- 13:05Okay, cool.
- 13:06And so, maybe from, like, the higher level or larger scale, like, the thing that actually runs the machine down into the experiments, down into more, like, the data processing details.
- 13:15Could you give us a picture, like, what the software looks like there, what you guys are doing?
- 13:18Sure, yeah.
- 13:19So, I mean, it's mainly, you know, we have a whole bunch of collisions.
- 13:23And each collision, you know, if you think of what this metaphor of it being like an image, you know, it's like a pipeline for doing a bunch of image processing, you know.
- 13:31And you're looking for, you're trying to find the collisions that, you know, maybe have evidence of some new particle.
- 13:39So, you have lots of teams of people that are looking for different things, and each of those teams will develop a little pipeline to process the data to try to, you know, to search for what they want.
- 13:50Also, to put it into perspective a little bit, we had a quadrillion, you know, a couple quadrillion collisions total at the LHC.
- 14:00And when we discovered the Higgs, it was, you know, of the order of 100 or 1,000 of those collisions that were the interesting ones.
- 14:08So, it's a huge needle in a haystack problem.
- 14:11But it's also not really like a data mining kind of just generally looking for something weird in the data.
- 14:17We have theories that tell us, you know, what to look for, which is good because there's such small little deviations in the data that it would be basically impossible to find if you didn't have a good guide.
- 14:30And then this processing chain, because there's so much data and performance is such an issue, most of it, well, several years ago, the decision was to write most of the software in C++.
- 14:41You know, C++ has also evolved a ton during the time.
- 14:44Are you using like, are people using like C++ 11 and those types of things?
- 14:50Right.
- 14:50So, the different experiments kind of, you know, move to these new, you know, new standards and new computing technologies kind of at different paces.
- 14:59There's a lot of worry.
- 15:01You know, it's generally a pretty conservative attitude, you know, but we are making those kinds of transitions.
- 15:08But, you know, you just, it has to go through a lot of vetting before we make a big jump like that.
- 15:14We also usually have a very homogeneous computing environment in terms of like operating systems and things like that because, you know, we run into issues where, you know, you don't want to have to be worrying about like floating point arithmetic in your kernel or something, you know, when you're, because it's, so, so we just tried it.
- 15:33Yeah, so it's a little bit funny, you know, that CERN was responsible for sort of developing the web browser, right, you know, and HTML and things like that.
- 15:42And so, they had this huge win of, you know, where the web was born.
- 15:45And then that was followed by this idea of like, okay, we had the web, now we're going to have grid computing.
- 15:51And there was a lot of money poured into it.
- 15:53And the promise of the grid basically turned into what has happened with the cloud.
- 15:59And, but in, you know, and then within IMG physics, we do have the grid, but it's kind of like a huge global, you know, batch system in some sense.
- 16:09So, it tends to be, you know, more uniform and things like that than what, you know, at first people were working really hard to be able to work over very heterogeneous computing environments.
- 16:20But, you know, that all evolved over, you know, more than a decade.
- 16:24Yeah, I'm sure.
- 16:25I used to do a lot of work in sort of scientific computing and visualization.
- 16:29And it's super hard to do reproducibility and checking stuff, you know.
- 16:35Right.
- 16:36If you've got a sufficiently complicated series of mathematical steps, you can apply to something.
- 16:42You know, like, if it's so complicated, how do you know when you're right or not?
- 16:46Right.
- 16:46You know, how do you know when you're discovering something new versus, oh, it's like I expected or whatever, right?
- 16:52Right.
- 16:53Well, we're working a lot right now on trying to address the sort of reproducibility, you know, issues kind of specific and the challenges associated to our field.
- 17:02And there are a lot of challenges because there's so much data and software is very complicated.
- 17:05Yeah.
- 17:06So the core algorithms tend to all be C++, but they're, you know, they're organized into lots of, you know, lots of different tools.
- 17:13And, you know, you have a way of kind of composing this pipeline between different processing algorithms.
- 17:19And in the end, the configuration of that thing is such a beast that that's the first place where you see Python happening is that we have a way of kind of, you know, doing introspection on all of the tools.
- 17:30And then we just represent their configuration in terms of Python objects.
- 17:33And then there's a whole separate layer of, you know, of computing, which I mean, of programming, which is just essentially the configuration.
- 17:40And that includes both this trigger, that online system that's tossing out the data, as well as the, you know, the people that are analyzing the data, how they, you know, configure all these tools to be able to process the kajillions of events into something that's more manageable.
- 17:55Now, that sounds really interesting.
- 17:57When I was doing some research, it seemed like one of the major pieces used in Atlas was this thing called Athena.
- 18:05Right.
- 18:07That's right.
- 18:07That's the kind of name of the C++ framework that we use that also includes the way that it builds the Python bindings for configuring all the tools.
- 18:17And yeah, so that's, yeah, I've spent more hours than I'd like to admit doing programming in that framework.
- 18:24But then what's also interesting, I think a lot of your audience will find interesting, is that once you've used that huge, heavyweight data processing pipeline, usually you get to something quite a bit smaller.
- 18:36And that's where a lot of the more interactive and exploratory part of the data analysis happens.
- 18:41And at that stage, a lot of people, well, people stop using things like Athena for the most part.
- 18:48And that's where you start using, see people using Python a lot more in terms of data analysis.
- 18:53And so it's an interesting transition because people are always arguing about where do you make that swap, you know?
- 19:00Sure.
- 19:01Yeah.
- 19:02I suspect you guys probably do a lot of IPython.
- 19:05Is that true?
- 19:05Well, you would think that more people would.
- 19:08I guess part of it is that it's still, even at that stage, you still have so much data to process that the kinds of things that people end up wanting to do are, you know, well suited to having like, you know, programs that, you know, that look really like programs that run.
- 19:26And they might be Python based, but, you know, you kind of sort of batch systemy, you run over this thing, and then you get some results and look at them.
- 19:33There are times when you're doing something very interactive.
- 19:35And so years ago, the team at CERN that makes this tool called Root, which is like kind of the dominant data analysis package in high energy physics, came up with something like an interpreter because you want to sit there and have this feedback loop, right?
- 19:51You know, like the end where you can, you know, type commands, see plots.
- 19:55And that was actually done amazingly.
- 19:58They wrote a C++ interpreter many, many years ago.
- 20:01And so you actually write these commands in C++, and then they're interpreted and executed on the fly.
- 20:08That's actually pretty interesting by itself, isn't it?
- 20:11It is interesting.
- 20:12It, of course, had all sorts of issues, and C++ wasn't really meant for doing that, but it worked practically.
- 20:18And now they've gone through and they have a much heavier duty version of this interpreter that's based on, you know, Cling and more modern, like, compiling, compiler technologies and things.
- 20:27But Python, obviously, is another way to go with that, which is nice.
- 20:42This episode is brought to you by Hired.
- 20:45Hired is a two-sided, curated marketplace that connects the world's knowledge workers to the best opportunities.
- 20:51Each offer you receive has salary and equity presented right up front, and you can view the offers to accept or reject them before you even talk to the company.
- 21:01Typically, candidates receive five or more offers in just the first week, and there are no obligations, ever.
- 21:07Sounds pretty awesome, doesn't it?
- 21:09Well, did I mention there's a signing bonus?
- 21:11Everyone who accepts a job from Hired gets a $2,000 signing bonus.
- 21:15And as Talk Python listeners, it gets way sweeter.
- 21:20Use the link Hired.com slash Talk Python To Me, and Hired will double the signing bonus to $4,000.
- 21:27Opportunity's knocking.
- 21:29Visit Hired.com slash Talk Python To Me and answer the call.
- 21:32So people started moving to the Python.
- 21:45Well, some people started moving to the Python way of doing things, I don't know, whatever, you know, eight years ago or something like that.
- 21:52But the field is kind of split between, you know, which way.
- 21:55And then since then, like, things like IPython and the IPython notebook have come around.
- 21:59I think that that's great, especially from the point of view of this, like, reproducibility.
- 22:03So we're working now that we give tons of talks.
- 22:07If you go to CERN, we have this agenda system.
- 22:09And you can see that there are, like, hundreds of thousands of presentations happening within these experiments every year.
- 22:15That's excellent.
- 22:16Yeah, so one of the things, but they're always, like, PowerPoint or, you know, Keynote or whatever, or LaTeX-based PDF presentations.
- 22:23And you read about what someone's doing, but it's not very handy for, like, trying to have reproducibility or for another graduate student to pick up where someone left off.
- 22:32So we have this effort now to try to make it so that the agenda system can, you know, can basically display notebooks directly so people can upload their IPython notebook directly and visualize it.
- 22:45And then if someone else thinks it's interesting, they can, you know, download it and execute it.
- 22:49There are efforts about trying to make it so that the whole computing environment associated to that notebook can be, you know, packaged up so that, because they usually aren't just standalone Python, Python notebooks with, like, SciPy dependency.
- 23:04They have a bunch of dependencies.
- 23:06So if you can package that all up, that's very handy.
- 23:11So there are tools like Binder now.
- 23:12There's a tool called Everware.
- 23:14And previously, there's something like SageMath, which all allowed you to sort of execute a notebook, you know.
- 23:21But the problem was how do you get all these, you know, these software dependencies packaged up?
- 23:26And now that problem is starting to be solved.
- 23:28Right.
- 23:29Oh, that's really excellent.
- 23:30Because I can imagine you guys have so much data and maybe these back-end systems you've got to reach into to actually work with the data that you're trying to, you know, do physics on.
- 23:41That's right.
- 23:41You can't just take the program and hand it out, you know, like, oh, and here's our, you know, 50 gigs of data and you've got to get it this way, right?
- 23:48Right.
- 23:49And not only that, there's also things like databases that say, like, how was the detector aligned on Friday, you know, November 25th or something.
- 23:57So there are all these databases involved that you have to connect to for the software to run.
- 24:03And that's also through tons of authentication layers.
- 24:06So it's a huge pain in the butt, basically.
- 24:09But people are solving it.
- 24:12And I think that will be a huge change.
- 24:15And the Project Jupyter people, you know, luckily had this great foresight to separate the notebook from the background kernel.
- 24:23So we're actually also writing kernel based on this C++ interpreter of root.
- 24:29So it still looks like notebooks and all the display and everything is the same.
- 24:34But in the background, instead of Python, it's the C++ interpreter, which is, you know, interesting.
- 24:40Yeah, I mean, that certainly opens it up to a much wider audience.
- 24:44Like, you're saying, like, the group that's working directly with Athena and so on, they can just, you know, possibly start using IPython or what do you call them?
- 24:53Call them Jupyter notebooks now?
- 24:54I don't know.
- 24:54I'm not really sure what the naming is.
- 24:56Yeah, the front end, kind of the language agnostic part is now Project Jupyter.
- 25:01But it's great because we have people like Fernando Perez, who's, you know, leading this effort as part of this advisory board for a project that we got, a grant we got from the National Science Foundation to try to take the tools that have been developed in Iron View Physics, which are mainly very siloed.
- 25:18You know, it's like we're trying to solve our problem.
- 25:20It's a very hard problem.
- 25:20And we don't have a lot of extra time or money.
- 25:22Right.
- 25:23And then, but now we've done some nice things.
- 25:25So let's try to open that up, make it more interoperable with, like, the scientific Python world.
- 25:31And it's definitely a two-way street.
- 25:33There are lots of other great tools out there that we don't use.
- 25:35So we're working on improving the interoperability of all of these things.
- 25:39Yeah, I think that's going to be good for science all over.
- 25:41And the Jupyter guys just got a huge grant.
- 25:45I'm not sure all the folks that contributed, but it was millions, like six million or something like that.
- 25:50Do you remember?
- 25:50I don't know the number, but they rightfully have been getting some support because they're doing some great things.
- 25:57And yeah, I'm really happy to see that.
- 26:01So, you know, people will start building C++ and, you know, I guess Ruby and maybe imagine Fortran.
- 26:07I don't know.
- 26:08That probably is important somewhere in science.
- 26:11But I try to not touch that stuff.
- 26:13Right.
- 26:14You talked about this sort of uniform computing environment.
- 26:18And I know just where you're coming from with that, like, just the whole reproducibility and setup and everything.
- 26:23Can you talk to, like, are you using Linux?
- 26:27What distribution?
- 26:28What do things look like there?
- 26:30Right.
- 26:30So it's definitely Linux-based.
- 26:32CERN has a distribution called Scientific Linux that they maintain.
- 26:39I've kind of stopped following all the ins and outs of it, to be honest.
- 26:44But, you know, at some point it kind of was a derivative of some Red Hat-type package way back in the day.
- 26:50But since then it's evolved.
- 26:51And now I'm not even sure which distribution it's closest to.
- 26:55And then there's been quite a bit of emphasis in virtualization technologies and, you know, OpenStack-related things.
- 27:04And what we're starting to see more use of now are also Docker images.
- 27:08So I have a student who's working on, you know, making, you know, Docker images that have our very kind of specific computing environment,
- 27:17specifically for the issue of reproducibility.
- 27:21There, you know, I think you also haven't really seen in high-energy physics, but we're starting to see now as, like, more and more, you know, web-based tools and things like that.
- 27:31So you have web services.
- 27:32And we have a project going on where we're trying to make not analyses just reproducible but reinterpretable.
- 27:38So, you know, you had a team of people analyzing the LHC data, and they were asking a certain question.
- 27:44But you can reuse that analysis pipeline to answer other questions.
- 27:47So we're trying to wrap up this very heavy computational, you know, pipeline with a very simple web interface, you know, web APIs and things,
- 27:56so that people can submit, you know, requests to the system, and they'll be processed through all of this infrastructure.
- 28:04And then you'll, you know, come out with a very simple answer.
- 28:06That's really cool.
- 28:09Yeah, I think it'll be great.
- 28:10It also, it addresses a lot of issues with reproducibility when you have, when you can't just, like, say, you know, the typical open data route.
- 28:21Like, here it is, do it again.
- 28:23Because, you know, there are so many steps involved, and the, you know, the configuration of everything is so heavy that basically almost no one can do that.
- 28:32But if the experiments host it, host that service, it's very valuable.
- 28:35So.
- 28:36Yeah, that makes sense.
- 28:37I suspect if it's sufficiently complicated and has enough configuration parameters and variation, like, even the original researchers couldn't reproduce it if they didn't have the details, right?
- 28:45Yeah.
- 28:46Well, I mean.
- 28:47I mean, without redoing the work from scratch, literally.
- 28:50Yeah.
- 28:51No, exactly.
- 28:52I mean, the goal is that we should all be able to do it in practice.
- 28:55That's, you know, rarely, rarely checked.
- 28:57But that's what we're working on now is to try to make it so we can more confidently say, yes, we can actually reproduce this stuff.
- 29:04That's super cool.
- 29:05I hadn't even thought about Docker, but that makes perfect sense.
- 29:08I mean, I always think of Docker as, here's the way I'm going to, like, horizontally scale my web app so I can do that easier or, like, you know, get higher density on servers and web data center type places.
- 29:21But it makes really good sense for scientific computing, doesn't it?
- 29:23Yeah, yeah.
- 29:24So we have, you know, these experiments.
- 29:26At this point, you know, each of the big experiments has put out, you know, several hundred papers.
- 29:30So you have, like, thousands of scientific results.
- 29:32And now, if associated to each one of these results, you have some sort of, like, Docker image and you can, you know, on demand spin up this service that you want to reproduce or reinterpret what was done.
- 29:46You end up making a very powerful, high-level scientific tool.
- 29:50So it's been an idea for several years.
- 29:53But now, with, you know, these tools that are around, it's really, you know, possible.
- 29:58And so, and it's starting to happen.
- 30:00Yeah, I think that's fantastic.
- 30:02And are you guys, I think, considering or actively putting these into the official Docker repository?
- 30:07So right now, that's the sort of model is that that's going to be hosted at CERN, partially because, you know, it's a lot of disk space.
- 30:18And we're just working closely with the CERN IT people.
- 30:20And there's a lot of trust between the CERN computing and IT and the experiments.
- 30:24So that's how that's being developed now.
- 30:27But, and some of these things are sensitive, you know, like, yeah, these are big international collaborations.
- 30:35And different countries are kind of at different places in terms of their attitudes about open science and things like that.
- 30:42So some people still want to keep these things closed, but they're willing to entertain the idea of hosting the service.
- 30:48So that's a big political discussion.
- 30:53Actually, the more I think about it, that it starts to bring me back to when I was in grad school.
- 30:56Yes, I can see that.
- 30:58So I suspect once a paper is published in a peer-reviewed journal and approved, pretty much everybody would be pretty happy to have their stuff public.
- 31:09But as you're developing that, right, before you've declared the Higgs boson to be found, for example, you would necessarily want to give all your algorithms away and let other people take a shot at it, right?
- 31:19You want to keep that until you're ready to publish your papers and publicly do your results, right?
- 31:24Yeah, no, that's true.
- 31:26And also, you know, I mean, the experiments also worry a lot about, you know, you have to be kind of careful about the scientific message that's coming out of these experiments.
- 31:37I mean, they're very, very expensive international projects.
- 31:40And you don't want people, like, claiming this and that and adding a lot of noise and drama.
- 31:46So, you know, we work very hard to get lots and lots of internal cross-checks of things and then make sure everyone's on the same page.
- 31:53And then we want to have kind of one unified voice from an experiment.
- 31:56And then we have another experiment to check it.
- 31:58But we don't want too much noise.
- 32:01So, you know, that's a lot of motivation for keeping these things kind of internal until they're ready.
- 32:08Yeah, absolutely.
- 32:09I mean, it took several years for the Higgs boson analysis to finally declare, hey, we found it, right?
- 32:17Yeah, that had a lot to do with just collecting enough data.
- 32:20Once we had enough data, the process was sort of streamlined enough that it was really a matter of like a week and a half or something.
- 32:28It was about a week and a half that we went from the last data that we had to the talk that, you know, where the discovery claim was made.
- 32:36So, but that was in some sense just like adding the last bits of data.
- 32:40But, yeah.
- 32:42Yeah, yeah, very cool.
- 32:45So, I want to ask you a few more things about LHC and CERN and particle physics.
- 32:50And then we could talk about space a little bit maybe.
- 32:52Oh, sure.
- 32:53Yeah.
- 32:53So, you said one of your goals there is that you guys are trying to move towards a more sort of dedicated professional software role there at CERN.
- 33:04Can you talk about that a little?
- 33:05Oh, right.
- 33:06So, I think, you know, the physicists, you know, need to write, obviously, a lot of code and be proficient to be able to do the science they want.
- 33:13And, but you also, there's a lot of infrastructure for the processing that's needed.
- 33:18So, you know, typically what happened was physicists that were very strong on computing kind of specialized on that and then, you know, became sort of software professionals with a physics background.
- 33:31And that's, that model has worked, you know, surprisingly well.
- 33:35There are some people, you know, relatively few people that are, don't really have a physics background that are really more just, you know, software professionals.
- 33:44But separately, there's been, you know, CERN has had like an IT department that deals with actual computing infrastructure that's going on, but has also developed several different tools that were more services.
- 33:56Sure.
- 33:57Because you guys have a lot of computers, a lot of network.
- 33:59How many computers do you have there?
- 34:01Oh, the CERN, I should know the number.
- 34:04Hundreds, like a hundred thousand or something, right?
- 34:06Like really a lot.
- 34:07It's a lot, yeah.
- 34:08There's a, there's a great YouTube video that I'll, that you can post that associated to it that has a wonderful overview of the whole processing.
- 34:16Oh, yeah, that'd be awesome.
- 34:17And lots of little factoids that's nicely produced.
- 34:21But I'm not going to say, I won't say a bunch of wrong numbers, so.
- 34:24Sure.
- 34:25Sure.
- 34:25This episode is brought to you by CodeShip.
- 34:42CodeShip has launched organizations, create teams, set permissions for specific team members, and improve collaboration in your continuous delivery workflow.
- 34:51Maintain centralized control over your organization's projects and teams with CodeShip's new organizations plan.
- 34:56And as Talk Python listeners, you can save 20% off any premium plan for the next three months.
- 35:02Just use the code TALKPYTHON, all caps, no spaces.
- 35:06Check them out at CodeShip.com and tell them thanks for supporting the show on Twitter where they're at CodeShip.
- 35:11But the, but there were people that were working on, on that side.
- 35:20And then also just general services for like, you know, like the system we use to manage all the papers and the, and the comments to the papers and things like that.
- 35:33And like an agenda system where people put up their talks and, you know, schedule meetings and the video services and blah, blah, blah, blah, blah.
- 35:40And, and those, the people that were working on that have started branching out into the kinds of services they provide.
- 35:47So, so I guess one example that's made me interesting is the very first website in the United States was called Spires.
- 35:54And it is, preceded this, the archive where like scientists put the versions of their papers before they're published, this preprint server.
- 36:03So the Spires was basically just a database of all of the, high energy physics literature.
- 36:09You know, like who wrote what papers and who cited whom and da, da, da, da, da.
- 36:13And, and so it was like a, it was the first website in the United States was where physicists would go to see where, you know, where the, who's citing who and which papers are about certain topics.
- 36:23And that has evolved into something new called Inspire.
- 36:26And that's a, you know, an international effort.
- 36:29but the software technology that that's based on, which is mainly Flask based now and, you know, Pythonic, based things, are, has evolved into a set of different tools that are pretty nice.
- 36:42So one of them is a data repository where, this is not solving actually CERN's problem.
- 36:47It's like the long tail of science.
- 36:49So all these small experiments that are out there that have some data, they can put their data onto these servers and then they can refer to that data when they write their papers.
- 36:58So there's a service called Zenodo and Zenodo started working with GitHub and made it so that people that now, not just data that you want to point to when you're writing a paper, but the software of your paper, you can, there's a little webhook in, in GitHub that whenever you make a new release, we'll push a copy of the, of the code to the service of Zenodo.
- 37:19So, and they'll, they'll, they'll, the jargon is meant a DOI.
- 37:23So it's a digital object identifier, which the publishing industry knows about how to use and things like that.
- 37:28And it points to a specific version of the, of the code that was used and you can download that version of the code.
- 37:34So it's sort of out of the realm of version control.
- 37:37It's more, it's just that GitHub is not provided, like people could delete their GitHub repo, but once you get a DOI, it's kind of a, a trust relationship that that code is exactly.
- 37:47that code is always going to be there at that link.
- 37:49Right.
- 37:49Almost like escrow for your code.
- 37:51Yeah, exactly.
- 37:53So it's redundant in a, in a sense, but you know, there's a link back obviously to the repository.
- 37:57So you can see how it's evolved, but, but this is the, the, you know, the basic common denominator for all of the publishing industry and how to track citations to, to different, you know, research outputs, whether they be papers or data or software.
- 38:12So that, so that connection has been, you know, is nice.
- 38:15And now there are actually thousands of, pieces of code that have been pushed from GitHub to Zenodo where they, and been given these DOIs.
- 38:23And the same, that is also, you know, Flask based and, and they have been very nice about how they break up the project, into different, you know, Flask components and things like that.
- 38:34And now we're reusing that same kind of infrastructure to try to build these tools for doing a reproducibility and, reinterpretations and things like that.
- 38:44So there's a, there's a new effort that's evolving that has a, you know, much more of a like modern, you know, Pythonic programming, you know, web services mentality, which is not necessarily coming from within the experiments, but coming from within the CERN lab.
- 39:00And, and I think it's going to change how the experiments sort of approach these problems, in the next few years.
- 39:06That's really cool.
- 39:07It seems like a huge step down the right path for reproducibility.
- 39:10Yeah, no, I think it's very, very important, for what we're doing.
- 39:14Yeah, of course.
- 39:15Of course.
- 39:16Okay.
- 39:16The last thing I wanted to ask you about, was this project called Recast that you guys have going that, not you necessarily, but folks at CERN have an LHC of going.
- 39:27So Recast is the system that I was referring to that is, for trying to make the analyses reinterpretable.
- 39:33and that's the one where we bring in these sort of Docker images for the, for the different analysis pipelines and try to make this web service, for being able to either reproduce or reinterpret, one of the published LHC analyses.
- 39:46So that one is, is definitely within CERN, but using a lot of these more modern, you know, web service, type approaches.
- 39:54There was another, another project that maybe, you also wanted to talk about, which was the space one.
- 40:00I don't know if that's what.
- 40:01Yeah, absolutely.
- 40:02So.
- 40:02Or I don't know if there's a, we're running out of time.
- 40:05No, no, that, yeah, no, we definitely have time.
- 40:07Let's talk about that one.
- 40:08And that's, Kreyfis.
- 40:09Yeah.
- 40:10That's right.
- 40:10That's right.
- 40:11So, Kreyfis is this project, which is, we started up, which is a lot of fun.
- 40:16and it's a very, very sort of small team of people right now.
- 40:20So it's, it's kind of the opposite of these LHC experiments.
- 40:23and our basic idea is that we, we want to try to detect very, you know, ultra high energy cosmic rays.
- 40:30So these are particles coming from outer space that have much higher energies than the LHC.
- 40:34And they smack the atmosphere and create a shower of new particles.
- 40:39So you get, you get tons and tons of particles hitting the ground.
- 40:42And the idea is that if you get a bunch of people running an app on their phone, the camera of your phone, the little CMOS sensor in your camera is like a miniature particle detector.
- 40:54So if one of these particles happens to fly through your camera, it will light your camera up.
- 40:59And so basically the idea is that if you get a bunch of people at night running this app, like while their phone's plugged in and they're sleeping, and you see a bunch of these phones light up at the same time,
- 41:09then that's, like an indication they just, you just got hit by a high energy cosmic ray.
- 41:15And, and, these things are very rare.
- 41:17So if you want to see them, like the, one of the best shots you have is to try to cover as much of the earth with a detector as you can.
- 41:24And, and it looks like if we have, you know, in the order of a million people running this app, which is a big number, but you know, not crazy big number, that we might be able to do some like really cutting edge science.
- 41:35And, and be able to study like the very highest energy particles that people have ever seen in the universe.
- 41:42So, so it's a really fun, you know, like citizen science project and it has a lot of data science challenges.
- 41:49I'm sure it does.
- 41:50That's, that's really cool.
- 41:51So does it run on the major phone platforms, iPhone, Android, things like that?
- 41:55Yeah.
- 41:56So we have an Android app and an, and an iPhone app that they're both kind of in beta right now.
- 42:01and, and so they collect data and, you know, one phone can't say anything.
- 42:06So they're uploading their data about, sort of when they saw flashes and, and where they were when they saw the flashes to, you know, a central server.
- 42:15And, we've, we've just, so it's been fun because we, the people working on this all kind of have a LHC type of background, but we now get a fresh set of choices about what we're going to use.
- 42:26So, so, you know, we have Elasticsearch and Django and Spark and, you know, you know, just much, you know, more kind of modern stack of, of, of tools for being able to process the data.
- 42:39And then we're working on trying to make it so that the final stages of the data analysis are, are more like IPython notebooks.
- 42:46And that we have this ability to, not just view the notebook, but to launch the notebook and recompute it.
- 42:53So that's using things like SageMath or this binder project, and, and, and Everware, which have, you know, with Docker, all of the computing environment.
- 43:03And this is going to, I think, be just awesome for doing outreach because they're, this has really grabbed the public's imagination.
- 43:09We got covered by NPR and Wired and some people.
- 43:13And so the, and IFL science.
- 43:15So we have like almost a hundred thousand people that have signed up and we're, we haven't even launched the app yet.
- 43:22That's really cool.
- 43:22So if people want to get started, how do they do it?
- 43:25Is that a thing they can do yet?
- 43:27Or do we have to wait a while?
- 43:28we're going to have to wait a little bit longer.
- 43:30we're, we're working as fast as we can, with our ragtag team.
- 43:34But the, but if you, you can sign up for it right now, if you go to the website, it's, crayfish.io.
- 43:42So it's like crayfish without the H.
- 43:44Right.
- 43:45So see, yeah, I'll definitely add a link.
- 43:47C R A Y F I S dot IO.
- 43:50That's right.
- 43:51That's right.
- 43:51Fantastic.
- 43:52So this, you know, reminds me a little bit of the whole protein folding stuff that people try to do with like running it on idle computers and the study at home.
- 44:02But, but it seems even cooler because this is actually the science.
- 44:06That's right.
- 44:07Yeah.
- 44:07Happening.
- 44:08Not just the post analysis computational bits.
- 44:11That's right.
- 44:12Yeah.
- 44:12I think there's sort of three types of citizen science projects like this.
- 44:15There are ones like study at home and the protein folding where you're basically donating compute cycles, you know, to solve a problem, but you're not really involved in otherwise.
- 44:23then there are projects like, there's a great platform called the Zooniverse, which I encourage people to go check out if you like these things.
- 44:33So they are the very interactive.
- 44:35You're like looking at pictures of galaxies and trying to, to classify them or, you know, like pictures of the ocean and trying to say if you see certain things in them.
- 44:44And it's, it's a lot like mechanical Turk, you know, you, so you, you're farming out, these things that computers might not be great at.
- 44:52We don't have, we're not good at writing algorithms for doing and having humans do it.
- 44:56and this one, this project is neither of those.
- 45:00The citizen science is actually the instrument.
- 45:02I mean, you are, you are doing the science.
- 45:04And, so that's, that's, yeah, I think, you know, that makes our project really unique.
- 45:10Yeah.
- 45:11That's really awesome.
- 45:11So I encourage everyone out there to go sign up, participate.
- 45:15I'll definitely do it.
- 45:16This is exciting.
- 45:17Great.
- 45:18Thank you.
- 45:18Yeah.
- 45:19And then you said this is somewhat, done with a, a grant from Amazon web services.
- 45:25That's right.
- 45:26Yeah.
- 45:26So, so we talked to Amazon and they thought it was an exciting, you know, an exciting project.
- 45:31And so they, they've been great about trying to support some, in different, you know, scientific projects that, that, need some computing, that, you know, have, that are still in a prototyping stage.
- 45:44And, so they, yeah, they've given us a grant for some of the, you know, AWS, sort of budget.
- 45:50And, and we're using that for, you know, collecting the data and some of our, you know, you know, offline processing of the data.
- 45:57and, and, and we try to make it so that there's a kind of a feedback loop so that the, you know, the Django server is showing stats on what the current status of the network is.
- 46:07and, so it's, it, that's been very nice of them.
- 46:11And also Yandex, which is like a sort of the Russian Google is, has a group of people that are data scientists, and part of a lab that they run that are very well integrated at CERN.
- 46:23And some of them have joined our project and they're, you know, helping us, you know, build the, the, the, sort of offline spark based, you know, data processing system and things like that.
- 46:33So it's a lot of fun to have, you know, these different mix of people and a very fresh project.
- 46:39We move very fast.
- 46:40It's nice.
- 46:40Yeah.
- 46:40How exciting.
- 46:41I mean, I know how it is to pick up a project that's been around for 10 or 20 years.
- 46:45It's kind of stale in the technology and what you can do because you don't want to break stuff, but it's nice to start over and do exciting things, right?
- 46:52Absolutely.
- 46:53Yeah.
- 46:53It's a breath of fresh air.
- 46:54Cool.
- 46:55So we're kind of getting short on time.
- 46:57Let me ask you just a few more questions before we wrap things up.
- 47:00What do you think the most amazing or interesting thing about the Large Hadron Collider and all the stuff you guys did there that people might not really know about?
- 47:08Oh boy.
- 47:10Part of it, I think that's really great about the whole project is just that, you know, it, it, we have people from all around the world, right?
- 47:18And they're not all employed by one, you know, one, you know, central, you know, corporation or something like that.
- 47:26And so, and we're all contributing.
- 47:28So I guess in that sense, it has a lot of the flavor of like a successful open science, I mean, it's open software project where people are contributing from all around.
- 47:36And I think the other part is that, you know, everyone should feel proud about it because, you know, it's, you know, it's not a huge amount of your tax dollars.
- 47:45You know, if you look at like, I forget for every thousand dollars of taxes you pay, it's just a few cents or something is going to this kind of project.
- 47:52But, you know, everyone made this happen.
- 47:54And I think everyone in the world should be proud of the fact that this, this happened.
- 47:59Yeah, it's definitely a global effort, which is awesome.
- 48:02It is a global effort.
- 48:03And it's, you know, this is a, I mean, it's a really big accomplishment what's happened in terms of our understanding of the universe.
- 48:10So, and there's obviously all of the software and computing and the technical challenges of pulling it off.
- 48:18But, you know, it's a big multi-decade global thing.
- 48:22And, you know, I don't know, humanity should be proud of itself.
- 48:25Yeah, absolutely.
- 48:27That's great.
- 48:27How do you see Python in science sort of evolving, growing, changing, shrinking?
- 48:36I mean, right now, I think it's growing very fast.
- 48:40I mean, you know, the whole scientific Python side of things and, you know, distributions that are working, working better.
- 48:47And GitHub is changing, you know, how people are doing science very, very quickly.
- 48:52If you look in, like, the astronomy and astrophysics community, there have been, you know, some big efforts to create new analysis platforms.
- 49:01There's a great project called AstroPy, which is a, you know, just a poster boy for, you know, for different, for, you know, kind of open science mentality of the community contributing to making the tools they need to do the science that they want.
- 49:18And the, that's working pretty well because, you know, a lot of those experiments, they have a lot of new experiments coming up and they want a fresh start.
- 49:26So, you know, we have this issue that we have a lot of legacy code and, you know, a lot of, you know, a lot of inertia about how we've done things.
- 49:35But we're, we're trying to move things into a more, you know, a less siloed software picture that looks more like that model.
- 49:43And, and Python is a big, I think Python is like the dominant kind of language of people that have that mentality and at least in, you know, particle physics and astrophysics.
- 49:53Yeah, that, that's my feeling as well.
- 49:55But obviously I do a lot less science than you do.
- 49:57So that's, that's great to hear.
- 50:00Yeah, I mean, I think the other place that you see it is just that to the extent that data science is attached to doing sciences, as opposed to like business analytics, you know, you see just a big influx of Python and R.
- 50:12And so I think that, you know, there are a lot of, a lot of other scientific fields that are undergoing a similar, that are undergoing a similar transformation, but, but maybe a little bit heavier on the R side than on the Python side.
- 50:25Yeah, it's definitely down to those two, I think.
- 50:28And modern analysis for the most part.
- 50:31Right.
- 50:31Kyle, thank you for being on the show and taking the time.
- 50:34I know you're super busy and this, this is really, really interesting.
- 50:38Thanks for sharing it with everyone.
- 50:39No, absolutely.
- 50:40Thank you for inviting me.
- 50:41It's great.
- 50:41Yeah, you bet.
- 50:42Take care.
- 50:42Bye.
- 50:43This has been another episode of Talk Python To Me.
- 50:47Today's guest was Kyle Cranmer and this episode has been sponsored by Hired and CodeShip.
- 50:51Thank you guys for supporting the show.
- 50:53Hired wants to help you find your next big thing.
- 50:55Visit Hired.com slash Talk Python To Me to get five or more offers with salary and equity presented right up front and a special listener signing bonus of $4,000.
- 51:03CodeShip wants you to always keep shipping.
- 51:07Check them out at CodeShip.com and thank them on Twitter via at CodeShip.
- 51:11Don't forget the discount code for listeners.
- 51:13It's easy.
- 51:13Talk Python.
- 51:14All caps.
- 51:15No spaces.
- 51:16You can find the links from today's show at talkpython.fm/episodes slash show slash 29.
- 51:23Be sure to subscribe to the show.
- 51:25Open your favorite podcatcher and search for Python.
- 51:27We should be right at the top.
- 51:28You can also find the iTunes and direct RSS feeds in the footer of the website.
- 51:33Our theme music is Developers, Developers, Developers by Corey Smith, who goes by Smix.
- 51:38You can hear the entire song at talkpython.fm.
- 51:41This is your host, Michael Kennedy.
- 51:43Thanks for listening.
- 51:44Smix, take us out of here.
- 51:47Staying with my voice.
- 51:49There's no norm that I can fill within.
- 51:50Haven't been sleeping.
- 51:52I've been using lots of rest.
- 51:53I'll pass the mic back to who rocked it best.
- 51:56Developers, Developers, Developers, Developers, Developers, Developers, Developers, Developers,
- 52:07you
- 52:08.