{"id":5699,"date":"2020-03-20T18:06:48","date_gmt":"2020-03-20T23:06:48","guid":{"rendered":"http:\/\/steve.cooleysekula.net\/blog\/?p=5699"},"modified":"2020-03-20T18:06:56","modified_gmt":"2020-03-20T23:06:56","slug":"what-i-learned-this-week","status":"publish","type":"post","link":"https:\/\/steve.cooleysekula.net\/blog\/2020\/03\/20\/what-i-learned-this-week\/","title":{"rendered":"What I learned this week"},"content":{"rendered":"\n<p>I have really thrown myself into physics, since I am stuck at home (a) because there is a pandemic and (b) because SMU won&#8217;t let me on campus until tomorrow (because I was abroad when they ended work-related international travel 2 weeks ago). This has been a grand opportunity. Here are some things I learned this week.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">UPROOT and UPROOT-METHODS<\/h2>\n\n\n\n<p>UPROOT is awesome. It lets me utilize natively in Python files created in <a href=\"https:\/\/root.cern.ch\">ROOT<\/a>. No more do I need to have ROOT compiled in the background, along with its Python interfaces. I can just import UPROOT and load ROOT files into Python Pandas dataframes, which anyway are how I prefer analyzing data these days.<\/p>\n\n\n\n<p>UPROOT was introduced to me by my former PhD student Matthew Feickert and my current PhD student Chris Milke.  I&#8217;ve been using it for several weeks to work on a project with one of my undergraduate research students. However, for high-level physics operations, like dealing with four-vector mathematics, ROOT is hard to beat. Turns out, there is a solution.<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/scikit-hep\/uproot-methods\">UPROOT-methods<\/a>! These are implementations of interfaces akin to C++ classes in ROOT that do cool physics things&#8230; like vector arithmetic! I just learned about this today and already did some Lorentz Transformations on particle vectors. I&#8217;m pretty happy about this.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">MatPlotLib Subplot Gridding!<\/h2>\n\n\n\n<p>Sometimes you just want to layout a bunch of graphs in a single plot in a non-uniform way. Consider the following graph:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"576\" height=\"576\" src=\"https:\/\/steve.cooleysekula.net\/blog\/wp-content\/uploads\/2020\/03\/Muon_Lifetime_Fit-3.png\" alt=\"\" class=\"wp-image-5700\" srcset=\"https:\/\/steve.cooleysekula.net\/blog\/wp-content\/uploads\/2020\/03\/Muon_Lifetime_Fit-3.png 576w, https:\/\/steve.cooleysekula.net\/blog\/wp-content\/uploads\/2020\/03\/Muon_Lifetime_Fit-3-300x300.png 300w, https:\/\/steve.cooleysekula.net\/blog\/wp-content\/uploads\/2020\/03\/Muon_Lifetime_Fit-3-150x150.png 150w, https:\/\/steve.cooleysekula.net\/blog\/wp-content\/uploads\/2020\/03\/Muon_Lifetime_Fit-3-100x100.png 100w, https:\/\/steve.cooleysekula.net\/blog\/wp-content\/uploads\/2020\/03\/Muon_Lifetime_Fit-3-120x120.png 120w\" sizes=\"auto, (max-width: 576px) 100vw, 576px\" \/><figcaption>An analytic model is fitted to data from a muon detector at SMU. The top plot is the number of muon candidates vs. their measured lifetime. The bottom plot is the &#8220;model pull&#8221; &#8211; the difference in each bin of the lifetime measurement between the real counts and the fitted model prediction, divided by the standard deviation of the counts in the bin.<\/figcaption><\/figure>\n\n\n\n<p>I need to show the fit of an analytic model (an exponential lifetime model) to the data coming from a muon detector in the basement of Fondren Science Building at SMU; below that, I need to show how well the model describes the data after optimizing the model parameterization to reproduce the data. To do this, I need a big plot at the top and a short plot at the bottom. I needed plot grid layouts!<\/p>\n\n\n\n<p>I found this article extremely helpful: <a href=\"https:\/\/towardsdatascience.com\/subplots-in-matplotlib-a-guide-and-tool-for-planning-your-plots-7d63fa632857?gi=b00175d89216\">https:\/\/towardsdatascience.com\/subplots-in-matplotlib-a-guide-and-tool-for-planning-your-plots-7d63fa632857?gi=b00175d89216<\/a> (it&#8217;s how I made that figure above!)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Online Teaching Tips<\/h2>\n\n\n\n<p>How do you mute all those jerks with hot mics in Zoom? WHY WON&#8217;T MY F**KING MAC LET ME SHARE MY DESKTOP?!?!?!<\/p>\n\n\n\n<p>Check out these tweets.<\/p>\n\n\n\n<figure class=\"wp-block-embed-twitter wp-block-embed is-type-rich is-provider-twitter\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"twitter-tweet\" data-width=\"550\" data-dnt=\"true\"><p lang=\"en\" dir=\"ltr\">Online teaching tip: when using a video system to lecture or communicate, the 1st thing you should learn (besides how to connect to the system) is how to mute all the other users. Somebody will have a hot mic. Save them the embarrassment.<a href=\"https:\/\/twitter.com\/hashtag\/TheMoreYouKnow?src=hash&amp;ref_src=twsrc%5Etfw\">#TheMoreYouKnow<\/a> <br><br>Thx <a href=\"https:\/\/twitter.com\/FirstGenPhys?ref_src=twsrc%5Etfw\">@FirstGenPhys<\/a>! <a href=\"https:\/\/t.co\/B34k8EM3P1\">pic.twitter.com\/B34k8EM3P1<\/a><\/p>&mdash; Stephen Sekula (@drsekula) <a href=\"https:\/\/twitter.com\/drsekula\/status\/1240822305137266689?ref_src=twsrc%5Etfw\">March 20, 2020<\/a><\/blockquote><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed-twitter wp-block-embed is-type-rich is-provider-twitter\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"twitter-tweet\" data-width=\"550\" data-dnt=\"true\"><p lang=\"en\" dir=\"ltr\">Online teaching tip: (Mac edition!) Mac users might be surprised to find out that tools like Zoom won&#39;t share their whole desktop, even when they try to do so. It&#39;s a security feature! You need to enable it in the system settings:  <a href=\"https:\/\/t.co\/YZjFxOJzHu\">https:\/\/t.co\/YZjFxOJzHu<\/a> <a href=\"https:\/\/twitter.com\/hashtag\/TheMoreYouKnow?src=hash&amp;ref_src=twsrc%5Etfw\">#TheMoreYouKnow<\/a> <a href=\"https:\/\/t.co\/5vBjdBxyel\">pic.twitter.com\/5vBjdBxyel<\/a><\/p>&mdash; Stephen Sekula (@drsekula) <a href=\"https:\/\/twitter.com\/drsekula\/status\/1240985542306775041?ref_src=twsrc%5Etfw\">March 20, 2020<\/a><\/blockquote><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Planning new experiments and particle colliders is fun<\/h2>\n\n\n\n<p>I&#8217;ve been participating in a workshop (online only) hosted by Temple University on physics and detector design ideas for the Electron-Ion Collider, a project planned for construction at Brookhaven National Accelerator Laboratory. I&#8217;m still just beginning to think about bottom quarks and how to use them to probe structure in protons and nuclei, and the discussions at this workshop have got me thinking about how this problem changes when going from the LHC to a different collider designed to probe such matters with high precision.<\/p>\n\n\n\n<p>What have I learned? I have a lot to learn.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have really thrown myself into physics, since I am stuck at home (a) because there is a pandemic and (b) because SMU won&#8217;t let me on campus until tomorrow (because I was abroad when they ended work-related international travel 2 weeks ago). This has been a grand opportunity. Here are some things I learned [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":5701,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[11,14,7,9],"tags":[],"class_list":{"0":"post-5699","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-computing","8":"category-education","9":"category-life","10":"category-physics","11":"czr-hentry"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/steve.cooleysekula.net\/blog\/wp-content\/uploads\/2020\/03\/Screenshot-2020-03-20-at-6.05.28-PM.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/steve.cooleysekula.net\/blog\/wp-json\/wp\/v2\/posts\/5699","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/steve.cooleysekula.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/steve.cooleysekula.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/steve.cooleysekula.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/steve.cooleysekula.net\/blog\/wp-json\/wp\/v2\/comments?post=5699"}],"version-history":[{"count":1,"href":"https:\/\/steve.cooleysekula.net\/blog\/wp-json\/wp\/v2\/posts\/5699\/revisions"}],"predecessor-version":[{"id":5702,"href":"https:\/\/steve.cooleysekula.net\/blog\/wp-json\/wp\/v2\/posts\/5699\/revisions\/5702"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/steve.cooleysekula.net\/blog\/wp-json\/wp\/v2\/media\/5701"}],"wp:attachment":[{"href":"https:\/\/steve.cooleysekula.net\/blog\/wp-json\/wp\/v2\/media?parent=5699"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/steve.cooleysekula.net\/blog\/wp-json\/wp\/v2\/categories?post=5699"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/steve.cooleysekula.net\/blog\/wp-json\/wp\/v2\/tags?post=5699"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}