The largest machine ever built is the Large Hadron Collider at CERN.
Its primary goal was the discovery of the Higgs boson, the fundamental particle which gives all objects mass.
The LHC team actually achieved this audacious goal in 2012, winning them the Nobel Prize in physics in the process.
Today on Talk Python to Me, Kyle Cranmer is here to share how Python was at the core of this amazing achievement.
This is episode number 29, recorded Thursday, September 24th, 2015.
Welcome to Talk Python to Me, a weekly podcast on Python, the language, the libraries, the ecosystem, and the personalities.
This is your host, Michael Kennedy. Follow me on Twitter where I'm @mkennedy.
Keep up with the show and listen to past episodes at talkpython.fm and follow the show on Twitter via at Talk Python.
This episode is brought to you by Hired and CodeShip.
Thank them for supporting the show on Twitter via at Hired underscore HQ and at CodeShip.
I don't have much news to share this week, but I am both honored and thrilled to bring you this episode,
and I can't wait for you to listen to it.
So, let's get right to the interview.
Let me introduce Kyle.
Kyle Cranmer is an American physicist and professor at New York University at the Center for Cosmology and Particle Physicists
and affiliated faculty member at NYU's Center for Data Science.
He is an experimental particle physicist working primarily on the Large Hadron Collider based in Geneva, Switzerland.
Cranmer popularized a collaborative statistical modeling approach and developed statistical modeling,
which was used extensively for the discovery of the Higgs boson at the LHC in July 2012.
Kyle, welcome to the show.
Thank you. Thank you. It's a pleasure to be here.
Yeah, we have some amazing science and programming to talk about today, so I'm really excited to dig into all these topics with you.
Yeah, no, I'm excited to see where it goes.
Yeah, for sure.
So, let's, you know, we're going to talk about the Large Hadron Collider,
about using Python for scientific research and all those sorts of things,
as well as some other cool projects that you've got going on.
But people like to know how folks like you and your position kind of got started and they like to hear the background.
So, 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?
I'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.
But 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.
I 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.
But they had started a special math and science high school that it was public school, but you actually lived there.
And when I was there, I was just surrounded by all sorts of people, kind of the nerds and geeks of Arkansas.
And it was really a special time.
So, 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.
So, 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.
And so, I started working with him and did some early web projects and that was kind of my first exposure to Python.
So, that was a long time ago.
And then that's, it's funny how much those experiences kind of keep being revisited today.
Yeah, I'm sure you keep coming back to that.
You know, basically, programming these days seems like a required skill to be a physicist.
Yeah, no, well, it depends on what you do, but definitely for what we do, programming is a required skill.
And 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.
So, 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.
And usually, the people that don't will catch up a little bit later, but, you know, you lose time and that's unfortunate.
Right.
I'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?
Right, right.
It 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.
But it also can't be too fancy or the bulk of the physicists might not be able to understand what's going on.
You 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.
So things have to be somehow kept simple but still work for the difficult problems.
And so it's a difficult balance to strike.
Yeah, I'm sure.
So let's talk a little bit about what you guys are doing at the Large Hadron Collider.
And first of all, you know, congratulations on the Higgs boson discovery.
That's amazing.
Oh, thank you.
No, it was, yeah, many, many years of work.
And when it finally came, it was a huge treat.
I don't know.
It's funny to have such a big thing like that happen fairly early in your career.
It's like, now what?
Yeah.
So, but yeah, so at the LHC, you know, we have this huge collider that's in Switzerland.
It's about 17 miles around and underground.
There are all these super connecting magnets that help protons go, you know, bend them in a circle at essentially the speed of light.
And they're colliding together all the time.
And they smack into each other and they make, you know, a lot of new particles that come flying out.
And they hit our detector.
And our detector, you can think of sort of like a digital camera.
You know, it's like basically a bunch of pixels.
And the particles smack into it and you get an image.
But it's a 3D image.
So it's a 3D detector.
And the detector is like the size of a 12-story building.
So, yeah.
I 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.
And, you know, how big does the tube have to be?
Not that big.
But the actual experiments, the collectors, I was blown away when I learned about how big they are.
Like you said, 12 stories.
These things are huge.
Yeah.
No, they are.
And the range of scales is pretty crazy because we have to be able to track where these particles go very precisely.
So, like, close to where they interact, you know, we're measuring things at the, like, micron level.
And then they fly out over, like, the size of a building.
And we're still measuring where they're going at this very precise level.
But, you know, it's just this gargantuan thing.
So you have to align it properly and all sorts of challenges there.
And there are about 100 million, you know, well, a few hundred million electronic readouts coming out of this beast.
So, you know, it's like a 100-megapixel camera or something like that.
And we're taking 40 million photos every second.
That's a stunning amount of data.
That is a stunning amount of data.
And 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.
Because, 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.
So how do you capture and store that?
Do you store that, like, on hardware right on, like, Atlas in the machines?
Or do you, like, get that into, like, a cluster of servers?
Or what happens?
Right, right.
So we have a kind of a hierarchical online real-time system for tossing away, you know, the majority of the data.
So we have to actually, we write algorithms that have to look at the data and real-time decide, does this look interesting or not?
And so we go from the sort of 40 million a second through this, like, three levels of filtering down.
And then we get to the point that we save something like a few hundred of these collisions every second.
And that turns into, you know, several petabytes a year of data that we actually analyze later.
That's amazing.
It's got to be a little stressful to work on that initial filtering algorithm.
Because what if you threw away the Higgs boson before you discovered it, right?
That's right.
Yeah.
No, people, we always worry that we're, you know, kind of throwing the baby out with the bathwater.
And sorry about the living in New York here.
Yeah, no worries.
So the, yeah, we call that thing the trigger.
And, you know, that's something that I worked on a bit.
It'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.
That maybe, you know, the way the trigger was configured, we were throwing away the interesting stuff.
But luckily, we're not stuck to that.
You know, we can go and we can change it and things like that.
But that is the worry.
Sure.
Yeah.
I mean, you still have the time spent and the energy and all that, right?
Yeah.
Yeah, sure.
You can rerun it, of course.
But, you know, you got to, I suspect time is a valuable thing on that machine.
Yeah.
No, for sure.
It's expensive to run.
So, absolutely.
Yeah.
So, you know, I have a lot of listeners who are scientists and physicists and data science and so on.
But a lot of them who are probably not.
And 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.
I wanted to recommend the Particle Fever documentary.
Have you seen this?
Yeah, yeah.
I actually have a credit in that movie.
I worked with them quite a bit.
And 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.
But it was painful.
But they were nice.
I 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.
But it's a great film.
I think it definitely, it's good for a non-physics audience also.
It's not a technical film.
It 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.
I think it's really one of the best science documentaries ever.
I absolutely agree with you.
I think it really captures the excitement, the imagination, the drama in a way that, you know, anybody could appreciate.
And so, I definitely recommend people watch that.
It's available for streaming on Netflix and iTunes and other places.
And then the other thing is the book called Present at the Creation, Discovering the Higgs Boson by Amir Axel.
I messed up his name.
But that's also really good.
So, people who are out there and want to learn more about what we're talking about, I think I recommend those.
Okay, great.
Yeah, I actually haven't read that second book.
Yeah, I really enjoyed that book as well.
It predates the Higgs Boson.
So, it's like a lot of anticipation.
So, that's cool.
I see.
Okay, great.
Maybe we could talk a little bit about, like, the really big picture of software at the LHC.
Because there's not just one team and there's not just one experiment.
There's how many collectors?
Are there seven collectors?
Right.
So, well, there are two really big kind of multipurpose particle detectors, Atlas and CMS.
And I'm on Atlas.
And those two experiments have, you know, in the neighborhood, a little bit more than 3,000 physicists working on them.
So, you know, so it's a, there are big groups of people.
And 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.
And then there are several other smaller dedicated experiments that are quite a bit smaller.
And so, I don't, you know, it depends on how you count a little bit.
But 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.
Okay, cool.
And 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.
Could you give us a picture, like, what the software looks like there, what you guys are doing?
Sure, yeah.
So, I mean, it's mainly, you know, we have a whole bunch of collisions.
And 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.
And you're looking for, you're trying to find the collisions that, you know, maybe have evidence of some new particle.
So, 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.
Also, to put it into perspective a little bit, we had a quadrillion, you know, a couple quadrillion collisions total at the LHC.
And 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.
So, it's a huge needle in a haystack problem.
But it's also not really like a data mining kind of just generally looking for something weird in the data.
We 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.
And 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++.
You know, C++ has also evolved a ton during the time.
Are you using like, are people using like C++ 11 and those types of things?
Right.
So, the different experiments kind of, you know, move to these new, you know, new standards and new computing technologies kind of at different paces.
There's a lot of worry.
You know, it's generally a pretty conservative attitude, you know, but we are making those kinds of transitions.
But, you know, you just, it has to go through a lot of vetting before we make a big jump like that.
We 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.
Yeah, 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.
And so, they had this huge win of, you know, where the web was born.
And then that was followed by this idea of like, okay, we had the web, now we're going to have grid computing.
And there was a lot of money poured into it.
And the promise of the grid basically turned into what has happened with the cloud.
And, 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.
So, 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.
But, you know, that all evolved over, you know, more than a decade.
Yeah, I'm sure.
I used to do a lot of work in sort of scientific computing and visualization.
And it's super hard to do reproducibility and checking stuff, you know.
Right.
If you've got a sufficiently complicated series of mathematical steps, you can apply to something.
You know, like, if it's so complicated, how do you know when you're right or not?
Right.
You know, how do you know when you're discovering something new versus, oh, it's like I expected or whatever, right?
Right.
Well, 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.
And there are a lot of challenges because there's so much data and software is very complicated.
Yeah.
So 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.
And, you know, you have a way of kind of composing this pipeline between different processing algorithms.
And 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.
And then we just represent their configuration in terms of Python objects.
And then there's a whole separate layer of, you know, of computing, which I mean, of programming, which is just essentially the configuration.
And 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.
Now, that sounds really interesting.
When I was doing some research, it seemed like one of the major pieces used in Atlas was this thing called Athena.
Right.
That's right.
That'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.
And yeah, so that's, yeah, I've spent more hours than I'd like to admit doing programming in that framework.
But 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.
And that's where a lot of the more interactive and exploratory part of the data analysis happens.
And at that stage, a lot of people, well, people stop using things like Athena for the most part.
And that's where you start using, see people using Python a lot more in terms of data analysis.
And so it's an interesting transition because people are always arguing about where do you make that swap, you know?
Sure.
Yeah.
I suspect you guys probably do a lot of IPython.
Is that true?
Well, you would think that more people would.
I 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.
And 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.
There are times when you're doing something very interactive.
And 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?
You know, like the end where you can, you know, type commands, see plots.
And that was actually done amazingly.
They wrote a C++ interpreter many, many years ago.
And so you actually write these commands in C++, and then they're interpreted and executed on the fly.
That's actually pretty interesting by itself, isn't it?
It is interesting.
It, of course, had all sorts of issues, and C++ wasn't really meant for doing that, but it worked practically.
And 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.
But Python, obviously, is another way to go with that, which is nice.
This episode is brought to you by Hired.
Hired is a two-sided, curated marketplace that connects the world's knowledge workers to the best opportunities.
Each 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.
Typically, candidates receive five or more offers in just the first week, and there are no obligations, ever.
Sounds pretty awesome, doesn't it?
Well, did I mention there's a signing bonus?
Everyone who accepts a job from Hired gets a $2,000 signing bonus.
And as Talk Python listeners, it gets way sweeter.
Use the link Hired.com slash Talk Python To Me, and Hired will double the signing bonus to $4,000.
Opportunity's knocking.
Visit Hired.com slash Talk Python To Me and answer the call.
So people started moving to the Python.
Well, 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.
But the field is kind of split between, you know, which way.
And then since then, like, things like IPython and the IPython notebook have come around.
I think that that's great, especially from the point of view of this, like, reproducibility.
So we're working now that we give tons of talks.
If you go to CERN, we have this agenda system.
And you can see that there are, like, hundreds of thousands of presentations happening within these experiments every year.
That's excellent.
Yeah, so one of the things, but they're always, like, PowerPoint or, you know, Keynote or whatever, or LaTeX-based PDF presentations.
And 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.
So 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.
And then if someone else thinks it's interesting, they can, you know, download it and execute it.
There 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.
They have a bunch of dependencies.
So if you can package that all up, that's very handy.
So there are tools like Binder now.
There's a tool called Everware.
And previously, there's something like SageMath, which all allowed you to sort of execute a notebook, you know.
But the problem was how do you get all these, you know, these software dependencies packaged up?
And now that problem is starting to be solved.
Right.
Oh, that's really excellent.
Because 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.
That's right.
You 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?
Right.
And 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.
So there are all these databases involved that you have to connect to for the software to run.
And that's also through tons of authentication layers.
So it's a huge pain in the butt, basically.
But people are solving it.
And I think that will be a huge change.
And the Project Jupyter people, you know, luckily had this great foresight to separate the notebook from the background kernel.
So we're actually also writing kernel based on this C++ interpreter of root.
So it still looks like notebooks and all the display and everything is the same.
But in the background, instead of Python, it's the C++ interpreter, which is, you know, interesting.
Yeah, I mean, that certainly opens it up to a much wider audience.
Like, 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?
Call them Jupyter notebooks now?
I don't know.
I'm not really sure what the naming is.
Yeah, the front end, kind of the language agnostic part is now Project Jupyter.
But 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.
You know, it's like we're trying to solve our problem.
It's a very hard problem.
And we don't have a lot of extra time or money.
Right.
And then, but now we've done some nice things.
So let's try to open that up, make it more interoperable with, like, the scientific Python world.
And it's definitely a two-way street.
There are lots of other great tools out there that we don't use.
So we're working on improving the interoperability of all of these things.
Yeah, I think that's going to be good for science all over.
And the Jupyter guys just got a huge grant.
I'm not sure all the folks that contributed, but it was millions, like six million or something like that.
Do you remember?
I don't know the number, but they rightfully have been getting some support because they're doing some great things.
And yeah, I'm really happy to see that.
So, you know, people will start building C++ and, you know, I guess Ruby and maybe imagine Fortran.
I don't know.
That probably is important somewhere in science.
But I try to not touch that stuff.
Right.
You talked about this sort of uniform computing environment.
And I know just where you're coming from with that, like, just the whole reproducibility and setup and everything.
Can you talk to, like, are you using Linux?
What distribution?
What do things look like there?
Right.
So it's definitely Linux-based.
CERN has a distribution called Scientific Linux that they maintain.
I've kind of stopped following all the ins and outs of it, to be honest.
But, you know, at some point it kind of was a derivative of some Red Hat-type package way back in the day.
But since then it's evolved.
And now I'm not even sure which distribution it's closest to.
And then there's been quite a bit of emphasis in virtualization technologies and, you know, OpenStack-related things.
And what we're starting to see more use of now are also Docker images.
So I have a student who's working on, you know, making, you know, Docker images that have our very kind of specific computing environment,
specifically for the issue of reproducibility.
There, 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.
So you have web services.
And we have a project going on where we're trying to make not analyses just reproducible but reinterpretable.
So, you know, you had a team of people analyzing the LHC data, and they were asking a certain question.
But you can reuse that analysis pipeline to answer other questions.
So 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,
so that people can submit, you know, requests to the system, and they'll be processed through all of this infrastructure.
And then you'll, you know, come out with a very simple answer.
That's really cool.
Yeah, I think it'll be great.
It 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.
Like, here it is, do it again.
Because, 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.
But if the experiments host it, host that service, it's very valuable.
So.
Yeah, that makes sense.
I 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?
Yeah.
Well, I mean.
I mean, without redoing the work from scratch, literally.
Yeah.
No, exactly.
I mean, the goal is that we should all be able to do it in practice.
That's, you know, rarely, rarely checked.
But 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.
That's super cool.
I hadn't even thought about Docker, but that makes perfect sense.
I 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.
But it makes really good sense for scientific computing, doesn't it?
Yeah, yeah.
So we have, you know, these experiments.
At this point, you know, each of the big experiments has put out, you know, several hundred papers.
So you have, like, thousands of scientific results.
And 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.
You end up making a very powerful, high-level scientific tool.
So it's been an idea for several years.
But now, with, you know, these tools that are around, it's really, you know, possible.
And so, and it's starting to happen.
Yeah, I think that's fantastic.
And are you guys, I think, considering or actively putting these into the official Docker repository?
So 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.
And we're just working closely with the CERN IT people.
And there's a lot of trust between the CERN computing and IT and the experiments.
So that's how that's being developed now.
But, and some of these things are sensitive, you know, like, yeah, these are big international collaborations.
And different countries are kind of at different places in terms of their attitudes about open science and things like that.
So some people still want to keep these things closed, but they're willing to entertain the idea of hosting the service.
So that's a big political discussion.
Actually, the more I think about it, that it starts to bring me back to when I was in grad school.
Yes, I can see that.
So 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.
But 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?
You want to keep that until you're ready to publish your papers and publicly do your results, right?
Yeah, no, that's true.
And 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.
I mean, they're very, very expensive international projects.
And you don't want people, like, claiming this and that and adding a lot of noise and drama.
So, 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.
And then we want to have kind of one unified voice from an experiment.
And then we have another experiment to check it.
But we don't want too much noise.
So, you know, that's a lot of motivation for keeping these things kind of internal until they're ready.
Yeah, absolutely.
I mean, it took several years for the Higgs boson analysis to finally declare, hey, we found it, right?
Yeah, that had a lot to do with just collecting enough data.
Once 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.
It 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.
So, but that was in some sense just like adding the last bits of data.
But, yeah.
Yeah, yeah, very cool.
So, I want to ask you a few more things about LHC and CERN and particle physics.
And then we could talk about space a little bit maybe.
Oh, sure.
Yeah.
So, 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.
Can you talk about that a little?
Oh, right.
So, 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.
And, but you also, there's a lot of infrastructure for the processing that's needed.
So, 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.
And that's, that model has worked, you know, surprisingly well.
There 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.
But 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.
Sure.
Because you guys have a lot of computers, a lot of network.
How many computers do you have there?
Oh, the CERN, I should know the number.
Hundreds, like a hundred thousand or something, right?
Like really a lot.
It's a lot, yeah.
There'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.
Oh, yeah, that'd be awesome.
And lots of little factoids that's nicely produced.
But I'm not going to say, I won't say a bunch of wrong numbers, so.
Sure.
This episode is brought to you by CodeShip.
CodeShip has launched organizations, create teams, set permissions for specific team members, and improve collaboration in your continuous delivery workflow.
Maintain centralized control over your organization's projects and teams with CodeShip's new organizations plan.
And as Talk Python listeners, you can save 20% off any premium plan for the next three months.
Just use the code TALKPYTHON, all caps, no spaces.
Check them out at CodeShip.com and tell them thanks for supporting the show on Twitter where they're at CodeShip.
But the, but there were people that were working on, on that side.
And 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.
And 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.
And, and those, the people that were working on that have started branching out into the kinds of services they provide.
So, so I guess one example that's made me interesting is the very first website in the United States was called Spires.
And it is, preceded this, the archive where like scientists put the versions of their papers before they're published, this preprint server.
So the, the Spires was basically just a database of all of the, high energy physics literature.
You know, like who wrote what papers and who cited whom and da, da, da, da, da.
And, 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.
And that has evolved into something new called Inspire.
And that's a, you know, an international effort.
Um, but the, 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.
So one of them is a data repository where, this is not solving actually CERN's problem.
It's like the long tail of science.
So 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.
So 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 web hook 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.
So, and they'll, they'll, they'll, the, the jargon is meant a DOI.
So it's a digital object identifier, which the publishing industry knows about how to use and things like that.
And it points to a specific version of the, of the code that was used and you can download that version of the code.
So it's sort of out of the realm of version control.
It'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.
that code is always going to be there at that link.
Right.
Almost like escrow for your code.
Yeah, exactly.
So it's redundant in a, in a sense, but you know, there's a link back obviously to the repository.
So 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.
So that, so that connection has been, you know, is nice.
And now there are actually thousands of, pieces of code that have been pushed from GitHub to Zenodo where they, and been given these DOIs.
And 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.
And 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.
So 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.
And, and I think it's going to change how the experiments sort of approach these problems, in the next few years.
That's really cool.
It seems like a huge step down the right path for reproducibility.
Yeah, no, I think it's very, very important, for what we're doing.
Yeah, of course.
Of course.
Okay.
The 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.
So Recast is the system that I was referring to that is, for trying to make the analyses reinterpretable.
Um, and 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.
So that one is, is definitely within CERN, but using a lot of these more modern, you know, web service, type approaches.
There was another, another project that maybe, you also wanted to talk about, which was the space one.
I don't know if that's what.
Yeah, absolutely.
So.
Or I don't know if there's a, we're running out of time.
No, no, that, yeah, no, we definitely have time.
Let's talk about that one.
And that's, Kreyfis.
Yeah.
That's right.
So, Kreyfis is this project, which is, we started up, which is a lot of fun.
Uh, and it's a very, very sort of small team of people right now.
So it's, it's kind of the opposite of these LHC experiments.
Um, and our basic idea is that we, we want to try to detect very, you know, ultra high energy cosmic rays.
So these are particles coming from outer space that have much higher energies than the LHC.
And they smack the atmosphere and create a shower of new particles.
So you get, you get tons and tons of particles hitting the ground.
And 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.
So if one of these particles happens to fly through your camera, it will light your camera up.
And 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,
then that's, like an indication they just, you just got hit by a high energy cosmic ray.
And, and, these things are very rare.
So 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.
And, 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.
And, and be able to study like the very highest energy particles that people have ever seen in the universe.
So, so it's a really fun, you know, like citizen science project and it has a lot of data science challenges.
I'm sure it does.
That's, that's really cool.
So does it run on the major phone platforms, iPhone, Android, things like that?
Yeah.
So we have an Android app and an, and an iPhone app that they're both kind of in beta right now.
Um, and, and so they collect data and, you know, one phone can't say anything.
So 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.
And, 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.
So, 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.
And then we're working on trying to make it so that the final stages of the data analysis are, are more like IPython notebooks.
And that we have this ability to, not just view the notebook, but to launch the notebook and recompute it.
So 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.
And this is going to, I think, be just awesome for doing outreach because they're, this has really grabbed the public's imagination.
We got covered by NPR and Wired and some people.
And so the, and IFL science.
So we have like almost a hundred thousand people that have signed up and we're, we haven't even launched the app yet.
That's really cool.
So if people want to get started, how do they do it?
Is that a thing they can do yet?
Or do we have to wait a while?
Um, we're going to have to wait a little bit longer.
Uh, we're, we're working as fast as we can, with our ragtag team.
But the, but if you, you can sign up for it right now, if you go to the website, it's, crayfish.io.
So it's like crayfish without the H.
Right.
So see, yeah, I'll definitely add a link.
C R A Y F I S dot IO.
That's right.
Fantastic.
So this, you know, reminds me a little bit of the, the whole protein folding stuff that people try to do with like running it on idle computers and the study at home.
But, but it seems even cooler because this is actually the science.
That's right.
Yeah.
Happening.
Not just the post analysis computational bits.
That's right.
Yeah.
I think there's sort of three types of citizen science projects like this.
There 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.
Um, then 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.
So they are the very interactive.
You'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.
And 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.
We don't have, we're not good at writing algorithms for doing and having humans do it.
Um, and this one, this project is neither of those.
The citizen science is actually the instrument.
I mean, you are, you are doing the science.
And, so that's, that's, yeah, I think, you know, that makes our project really unique.
Yeah.
That's really awesome.
So I encourage everyone out there to go sign up, participate.
I'll definitely do it.
This is exciting.
Great.
Thank you.
Yeah.
And then you said this is somewhat, done with a, a grant from Amazon web services.
That's right.
Yeah.
So, so we talked to Amazon and they thought it was an exciting, you know, an exciting project.
And 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.
And, so they, yeah, they've given us a grant for some of the, you know, AWS, sort of budget.
And, and we're using that for, you know, collecting the data and some of our, you know, you know, offline processing of the data.
Uh, and, 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.
Um, and, so it's, it, that's been very nice of them.
And also Yandex, which is like a sort of the, 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.
And 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.
So it's a lot of fun to have, you know, these different mix of people and a very fresh project.
We move very fast.
It's nice.
Yeah.
How exciting.
I mean, I know how it is to pick up a project that's been around for 10 or 20 years.
It'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?
Absolutely.
Yeah.
It's a breath of fresh air.
Cool.
So we're kind of getting short on time.
Let me ask you just a few more questions before we wrap things up.
What 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?
Oh boy.
Part 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?
And they're not all employed by one, you know, one, you know, central, you know, corporation or something like that.
And so, and we're all contributing.
So 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.
And 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.
You 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.
But, you know, everyone made this happen.
And I think everyone in the world should be proud of the fact that this, this happened.
Yeah, it's definitely a global effort, which is awesome.
It is a global effort.
And 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.
So, and there's obviously all of the software and computing and the technical challenges of pulling it off.
But, you know, it's a big multi-decade global thing.
And, you know, I don't know, humanity should be proud of itself.
Yeah, absolutely.
That's great.
How do you see Python in science sort of evolving, growing, changing, shrinking?
I mean, right now, I think it's growing very fast.
I mean, you know, the whole scientific Python side of things and, you know, distributions that are working, working better.
And GitHub is changing, you know, how people are doing science very, very quickly.
If you look in, like, the astronomy and astrophysics community, there have been, you know, some big efforts to create new analysis platforms.
There'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.
And 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.
So, 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.
But we're, we're trying to move things into a more, you know, a less siloed software picture that looks more like that model.
And, 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.
Yeah, that, that's my feeling as well.
But obviously I do a lot less science than you do.
So that's, that's great to hear.
Yeah, 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.
And 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.
Yeah, it's definitely down to those two, I think.
And modern analysis for the most part.
Right.
Kyle, thank you for being on the show and taking the time.
I know you're super busy and this, this is really, really interesting.
Thanks for sharing it with everyone.
No, absolutely.
Thank you for inviting me.
It's great.
Yeah, you bet.
Take care.
Bye.
This has been another episode of Talk Python to Me.
Today's guest was Kyle Cranmer and this episode has been sponsored by Hired and CodeShip.
Thank you guys for supporting the show.
Hired wants to help you find your next big thing.
Visit 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.
CodeShip wants you to always keep shipping.
Check them out at CodeShip.com and thank them on Twitter via at CodeShip.
Don't forget the discount code for listeners.
It's easy.
Talk Python.
All caps.
No spaces.
You can find the links from today's show at talkpython.fm/episodes slash show slash 29.
Be sure to subscribe to the show.
Open your favorite podcatcher and search for Python.
We should be right at the top.
You can also find the iTunes and direct RSS feeds in the footer of the website.
Our theme music is Developers, Developers, Developers by Corey Smith, who goes by Smix.
You can hear the entire song at talkpython.fm.
This is your host, Michael Kennedy.
Thanks for listening.
Smix, take us out of here.
Staying with my voice.
There's no norm that I can fill within.
Haven't been sleeping.
I've been using lots of rest.
I'll pass the mic back to who rocked it best.
Developers, Developers, Developers, Developers, Developers, Developers, Developers, Developers,
you
.