{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[]},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"markdown","source":["# Dropping magnets - Session I"],"metadata":{"id":"YhH6aukqPlIc"}},{"cell_type":"markdown","source":["Science is often executed in small pieces until larger meaning can be obtained. In this unit, you will be investigating individual pieces of a larger puzzle to build towards a collective model. **You will have two sessions to carry out and extend your investigation.**\n","\n","\n","## **Learning goals**\n","\n","By the end of this unit, you should be able to:\n","* Design high-precision experiments to build models, including identifying interesting variables to test, variables to control, and ways to reduce uncertainty and systematics.\n","* Manage time by conducting pilot experiments, plotting as you go, and reflecting on the measurements and data throughout.\n","* Motivate all research questions, conclusions, and interpretations with supporting data.\n","* Provide positive and constructive feedback when evaluating peers’ work.\n","\n"],"metadata":{"id":"g6vn80J4NBxk"}},{"cell_type":"markdown","source":["## **Setup the Notebook**\n","Run the code cell below to mount your Google Drive and load the ``utilities.ipynb`` file as in previous weeks.\n"],"metadata":{"id":"f0TeR5IFHHQD"}},{"cell_type":"code","source":["from google.colab import drive\n","drive.mount('/content/drive')\n","\n","#Fill in the appropriate directory info in the ``...``\n","%run \"/content/drive/.../utilities.ipynb\""],"metadata":{"id":"AJdqi2AxPn2q","colab":{"base_uri":"https://localhost:8080/","height":460},"executionInfo":{"status":"error","timestamp":1770390542234,"user_tz":300,"elapsed":828,"user":{"displayName":"George Baldwin","userId":"11968457617878432463"}},"outputId":"a9e1a359-a9ac-426e-96ff-e8643c7e5486"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount(\"/content/drive\", force_remount=True).\n"]},{"output_type":"error","ename":"Exception","evalue":"File `'/content/drive/.../utilities.ipynb.py'` not found.","traceback":["\u001b[0;31m---------------------------------------------------------------------------\u001b[0m","\u001b[0;31mOSError\u001b[0m Traceback (most recent call last)","\u001b[0;32m/usr/local/lib/python3.12/dist-packages/IPython/core/magics/execution.py\u001b[0m in \u001b[0;36mrun\u001b[0;34m(self, parameter_s, runner, file_finder)\u001b[0m\n\u001b[1;32m 713\u001b[0m \u001b[0mfpath\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0marg_lst\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 714\u001b[0;31m \u001b[0mfilename\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfile_finder\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfpath\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 715\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mIndexError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.12/dist-packages/IPython/utils/path.py\u001b[0m in \u001b[0;36mget_py_filename\u001b[0;34m(name, force_win32)\u001b[0m\n\u001b[1;32m 108\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 109\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mIOError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'File `%r` not found.'\u001b[0m \u001b[0;34m%\u001b[0m \u001b[0mname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 110\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;31mOSError\u001b[0m: File `'/content/drive/.../utilities.ipynb.py'` not found.","\nDuring handling of the above exception, another exception occurred:\n","\u001b[0;31mException\u001b[0m Traceback (most recent call last)","\u001b[0;32m/tmp/ipython-input-3007450158.py\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;31m#Fill in the appropriate directory info in the ``...``\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 5\u001b[0;31m \u001b[0mget_ipython\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrun_line_magic\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'run'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'\"/content/drive/.../utilities.ipynb\"'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m","\u001b[0;32m/usr/local/lib/python3.12/dist-packages/IPython/core/interactiveshell.py\u001b[0m in \u001b[0;36mrun_line_magic\u001b[0;34m(self, magic_name, line, _stack_depth)\u001b[0m\n\u001b[1;32m 2416\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'local_ns'\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_local_scope\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mstack_depth\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2417\u001b[0m \u001b[0;32mwith\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbuiltin_trap\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 2418\u001b[0;31m \u001b[0mresult\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2419\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mresult\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2420\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m\u001b[0m in \u001b[0;36mrun\u001b[0;34m(self, parameter_s, runner, file_finder)\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.12/dist-packages/IPython/core/magic.py\u001b[0m in \u001b[0;36m\u001b[0;34m(f, *a, **k)\u001b[0m\n\u001b[1;32m 185\u001b[0m \u001b[0;31m# but it's overkill for just that one bit of state.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 186\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mmagic_deco\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0marg\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 187\u001b[0;31m \u001b[0mcall\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mlambda\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0ma\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0ma\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 188\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 189\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mcallable\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0marg\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;32m/usr/local/lib/python3.12/dist-packages/IPython/core/magics/execution.py\u001b[0m in \u001b[0;36mrun\u001b[0;34m(self, parameter_s, runner, file_finder)\u001b[0m\n\u001b[1;32m 723\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mos\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mname\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;34m'nt'\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mre\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmatch\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34mr\"^'.*'$\"\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mfpath\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 724\u001b[0m \u001b[0mwarn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'For Windows, use double quotes to wrap a filename: %run \"mypath\\\\myfile.py\"'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 725\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mException\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmsg\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 726\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mTypeError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 727\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mfpath\u001b[0m \u001b[0;32min\u001b[0m \u001b[0msys\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmeta_path\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n","\u001b[0;31mException\u001b[0m: File `'/content/drive/.../utilities.ipynb.py'` not found."]}]},{"cell_type":"markdown","source":["## **Group organization**\n","\n","We will form new groups for lab this week. To help you get to know each other, and to ensure effective collaboration and fairness, group members should discuss and write down the answers to the following questions in order to establish a “Partner Agreement.”\n","\n","Who are your Group Members and how do they prefer to be referred to (nicknames, pronouns, etc.)?\n","\n","\n"],"metadata":{"id":"eBznM3gz7SM2"}},{"cell_type":"markdown","source":["**[Group members' info here]**"],"metadata":{"id":"pdcbc0HQExFa"}},{"cell_type":"markdown","source":["Discuss with your partners your goals for the rest of the semester. How do your goals compare and how can you each support each other’s goals. Can you agree on a collective goal for the group? Establish your collective purpose and record it below.\n","\n"],"metadata":{"id":"3R9JKupaE23l"}},{"cell_type":"markdown","source":["**[Your collective purpose here]**"],"metadata":{"id":"hqi1i7LyE5VD"}},{"cell_type":"markdown","source":["To complete each lab a number of distinct tasks will need to be completed by individual group members or collaboratively by the group as a whole. These tasks include, but are not necessarily limited to, setting up equipment, collecting data, taking notes, and performing analysis, and managing the group. How will you divide the work fairly in your group?"],"metadata":{"id":"PSWm0Y2NE65t"}},{"cell_type":"markdown","source":["**[Your group's plan here]**"],"metadata":{"id":"9VDQ0Wj9E8TF"}},{"cell_type":"markdown","source":["# **Session I: Dropping magnets and measuring voltage**\n","\n","Science is often executed in small pieces until larger meaning can be obtained. In this unit, you will be investigating individual pieces of a larger puzzle to build towards a collective model. **You will have two sessions to carry out and extend your investigation.**\n","\n","The context is to explore the impact of a magnet falling through a coil of wire. Set up your apparatus as per the instructions at the end of this document. Your TA will draw the circuit diagram for this set up on the board. Brainstorm with your group about all the possible variables that impact the signal observed on the oscilloscope and things you can measure about that signal.\n","\n","## **A. Quick Primer on Circuits**\n","\n","Since we cannot see electrons, electrical phenomena may feel unintuitive and unfamiliar. This is ok! Our goal in this lab is to explore physics just beyond our expertise -- much like real, working scientists. What's more, most cutting edge physics research is concerned with systems that have some intangible or invisible element (gravitational waves, ultracold atoms, subatomic particles, etc). In any case, here is some background information to get you started.\n","\n","A closed loop of wire that enables electricity to flow is called a circuit. This closed loop consists of *circuit components* (things like batteries and light bulbs) and *wires* which connect circuit components together. Circuit components either supply or absorb electrical energy, while wires transmit electrical energy (they absorb a little energy as well but usually a negligible amount).\n","\n","Electrical energy flows or is transmitted around a circuit. This flow of electricity is called **current**, denoted by $I$. The units of current are Amperes or Amps, denoted by $A$.\n","\n","Current is a result of electrical potential energy, which is supplied by things like batteries and power supplies (or in our case, magnets falling through a coil of wire). We can measure the **difference** in electrical potential energy between distinct points in a circuit to get a sense of the \"force\" that drives the current between those points. This \"force\" that drives the current is called **voltage**, denoted by $V$. (Strictly speaking, voltage is not a force, which is why I've used scare quotes. Here we mean to imply the colloquial usage of \"force\" rather than the technical physics usage.) The units of voltage are Volts, denoted by $V$. Yes, the symbol for voltage is the same as the symbol for its units. Yes, this is bad notation. Sorry!\n","\n","While imperfect, a helpful analogy for understanding circuits is the \"water pipe\" analogy. See details of this [analogy on HyperPhysics](http://hyperphysics.phy-astr.gsu.edu/hbase/electric/watcir.html).\n","\n","The circuit you build today will consist of a coil of wire connected to a measuring device called an [oscilloscope](https://learn.sparkfun.com/tutorials/how-to-use-an-oscilloscope/). The oscilloscope, or \"scope\" for short, will measure the voltage difference between two points in the circuit over time.\n","\n","In this lab, we'll be exploring a phenomenon where the voltage across two points changes quickly from zero to some non-zero value. Because the change will happen faster than we can react, we'll want to set up the oscilloscope to *trigger* (i.e., collect data) when the voltage difference changes suddenly past some threshold (called a *trigger level*).\n","\n","If you've ever used a voltmeter before (and we'll use them later in this course), they display the voltage measurement as it comes in -- one number at a time. This is fine when we're using a constant power supply like a battery or other DC (direct current) voltage source, but often we'll have situations where the voltage changes quickly or steadily over time and we want to keep track of those changing values. An oscilloscope displays a record (or **trace**) of the measured voltage difference over time. The screen shows a graph of the measured voltage on the vertical axis (or y-axis) and time on the horizontal axis (or x-axis).\n","\n","See the **Oscilloscope Settings** and **Oscilloscope FAQs** sections at the end of this document for details about setting up the oscilloscope. As you set it up, check in with other groups, ask each other for help, and lend support to others. Your instructor is also available to help but there are more of you than there are instructors, and these devices have a lot of buttons, so help each other out!\n","\n","####***A deep understanding of these details is not critical for succeeding in this experiment. You already have all of the skills you need to collect this data and analyze your results.***"],"metadata":{"id":"DrrwDMQiFL5F"}},{"cell_type":"markdown","source":["## **B. Observing the phenomenon**\n","\n"," Set up your apparatus as per the instructions at the end of this document. Your TA will draw the circuit diagram for this set up on the board.\n","\n"," **Q.** Brainstorm with your group about as many different ways you can vary your experiment that may impact the signal observed on the oscilloscope. What things you can measure about that signal?"],"metadata":{"id":"W96S8Nb-IUzo"}},{"cell_type":"markdown","source":["**[Your group's brainstorm list here]**\n","\n","---"],"metadata":{"id":"fle_D2SRJbGc"}},{"cell_type":"markdown","source":["Your TA will lead a group discussion about everyone's ideas."],"metadata":{"id":"UZ0vPU3Pxq7u"}},{"cell_type":"markdown","source":["***Note:* Magnets should be seen and not heard.** Please use one of the rubber buckets to catch the magnet.\n","\n","## **C. Designing observation experiments**\n","In your group, devise a plan to qualitatively *and* quantitatively test the effects of *one* of the variables. You may use any equipment or measuring devices that are available in the lab and any additional equipment that has been brought in for this lab (for example, cell phones have surprisingly precise magnetic field sensors! We recommend the Physics Toolbox Sensor Suite or PhyPhox apps that are available for iPhone and Android). Feel free to get creative!\n","\n","**Q.** Document your plan below with answers to the following questions:\n","* What variable are you testing? What other variables might impact your results and how will you control or measure them?\n","* What are you measuring about the signal/output? (i.e. what number will you report and how will you obtain this number?)\n","* How will you analyze your data or quantify effects (e.g., comparing measurements with $t^\\prime$ values)?\n","* What are your (qualitative) predictions for how that variable will affect the signal seen on the oscilloscope? (e.g., more of this variable will broaden the signal, or less of this variable will make a taller signal)\n","* What are the major sources of uncertainty and how will you quantify and minimize them?"],"metadata":{"id":"4YuLoifwJeBS"}},{"cell_type":"markdown","source":["**[Your plan here]**\n","\n","---"],"metadata":{"id":"lziDhJNWJhi6"}},{"cell_type":"code","source":["#The bottom of this document includes some template Python code for entering data into arrays and comparing pairs of measurements.\n","\n","#Create as many code cells as you need for analysis"],"metadata":{"id":"-JI5o1rx7Yq8"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["**[Your interpretations and next steps here]**"],"metadata":{"id":"AHxsNSLt7kck"}},{"cell_type":"code","source":["#More analysis here maybe"],"metadata":{"id":"ex2E4Wcd7n4e"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["**[Any conclusions you can draw from your investigations by the end of the first session here]**"],"metadata":{"id":"nRhc4ZIctue7"}},{"cell_type":"markdown","source":["## **Lab Checkout**\n","\n","By the end of the lab session, document below a claim about at least one variable and **how it affects the voltage signal on the oscilloscope** and briefly summarize your evidence (from above) that supports your claim. Present your claim to your TA or (if you are out of time), they will look over these notes to evaluate your claim.\n","\n","In the checkout, they will be looking for:\n","* Whether the claim is supported by evidence,\n","* Whether that evidence is sufficient, and\n","* Whether it is clear that you collected the data."],"metadata":{"id":"0tHtSrcuXOVS"}},{"cell_type":"markdown","source":["**[Your response here]**"],"metadata":{"id":"izs1uU5WY9V0"}},{"cell_type":"markdown","source":["\n","\n","---\n","\n","\n","\n","---\n","\n","\n","\n","\n"],"metadata":{"id":"ZVCIOLsgs4l9"}},{"cell_type":"markdown","source":["\n","**Reminder:** Submit your group's notebook by the end of **each lab session**.\n","\n","* To submit, make sure all your code and text cells have been run and the output is displayed.\n","* Convert your .ipynb file to a PDF using the print function or using an online ipynb->PDF converter.\n","* Submit your PDF to Gradescope by the end of **each lab session**.\n","* Only one person from your group needs to submit the file, but that person needs to **add all group members to the submission in Gradescope.**"],"metadata":{"id":"pqmqsIVmr6o9"}},{"cell_type":"markdown","source":["# **Circuit set up**\n","\n","Your TA will draw a circuit diagram on the board to represent the set up for the lab. In the diagram, you should only see two circuit components: a coil and an oscilloscope. The coil is connected directly to the oscilloscope so that the oscilloscope reads the voltage difference across the coil.\n","\n","## **Oscilloscope settings**\n","\n","* Use the **Scale** knobs to change the scale for the horizontal axis (time) and vertical axis (voltage). The separation between the major grid lines is given on the bottom in the colors corresponding to each channel. These are good things to keep note of in your lab notes!\n"," * The magnet takes less than a second to fall, so the time divisions should be on the order of milliseconds (50 ms).\n"," * The height of the voltage peak is on the order of 100 mV so voltage divisions should be 50 mV.\n"," * You can also adjust the position of the signal with the **Position** knobs.\n","\n","* The oscilloscope will need to be set to observe and freeze the signal when the magnet falls through the coil. First, we need to tell it when to *trigger*:\n"," * Triggering is the process of starting a \"sweep\" of the oscilloscope. The oscilloscope waits for the voltage difference to pass through a triggering voltage before beginning a new sweep.\n"," * We want the triggering voltage to be high enough to avoid triggering on noise but low enough to detect the induced voltage difference from the test.\n"," * The triggering voltage is adjusted via the knob labeled **Trigger**.\n"," * The oscilloscope allows you to set various properties associated with the trigger. Start with the trigger type set to **Edge** and the trigger mode set (second page of the trigger menu) to **Normal**.\n","* Second, we need the signal to freeze on the screen once it's been triggered:\n"," * For this, we'll use the **Single** button on the upper right-hand corner of the oscilloscope. Press it and make sure it's green before you conduct a test (green means it is actively measuring).\n"," * When the triggering voltage is reached, it should turn red and freeze the trial on the screen of the oscilloscope (red means it is no longer actively measuring).\n","\n","## **Oscilloscope FAQs**\n","\n","**What is this thing showing me?**\n","\n","The grid on the oscilloscope shows the voltage difference in the vertical direction and time in the horizontal direction. It is measuring the voltage difference between the ends of the wires that you connect to each Channel.\n","\n","**I can’t see anything or I don't see what I expected. What do I do?**\n","\n","Some things to try:\n","* Press **Autoset**\n","* You may not have it set to display the channel you want. Turn on channel 1 by pressing the yellow **1** button. You might need to change **Probe 10x Voltage**, which multiplies your measured voltage by a factor of 10, to **Attenuation 1x**.\n","* Still no? Repeat the previous step for Channel 2.\n","* Can we see a known source, such as a function generator? Hook up the oscilloscope to read the voltage difference across the function generator terminals using Channel 2 (make sure grounds are connected). Is that what you expect? If not, there may be something wrong with your circuit. Check with another group or your instructor.\n","\n","**How do I measure voltage differences with an oscilloscope?**\n","\n","* Press **Cursor** and select **Type None**. From the list, use the **Multipurpose** knob to select **Amplitude**. The **Time** button will allow you to simultaneously measure differences in time and voltage.\n","* Adjust *Source* to the channel that you wish to measure (either Channel 1 or Channel 2, whatever the wires from your coil are plugged into).\n","* Use **Cursor 1** and **Cursor 2** to measure differences in voltage and time between the two cursors. Remember to use the difference between the two cursors, not the absolute value of either cursor. We want voltage difference and don't know what either cursor is relative to on its own (we want the pressure difference, not the absolute pressure, going back to the [water pipes analogy](http://hyperphysics.phy-astr.gsu.edu/hbase/electric/watcir.html)).\n","\n","**What I'm seeing makes no sense.**\n","\n","That is not a question. Regardless...\n","* Have you discussed an appropriate time scale with your group? Adjust the timescale manually to an order of magnitude that is appropriate for your test (e.g., how long does it take for the magnet to fall through the coil?).\n","* Still not sure? Go find another group who have a signal that makes sense and check what settings they have.\n","* *Still* not sure? Ask your TA.\n","\n","**How do I measure [insert measurement]?**\n","\n","The oscilloscope has many available tools to assist you in making different measurements. The **Multipurpose** knob and the **Math** button each include multiple capabilities that are available. Search online for the oscilloscope manual (include brand and model number) for additional information or play around and figure it out!\n","\n"],"metadata":{"id":"2VHqtNtJJEbR"}},{"cell_type":"markdown","source":["# Data analysis templates"],"metadata":{"id":"8GW7KNSWzUtj"}},{"cell_type":"code","source":["# Input the raw data for your measurements\n","x = np.array([...])\n","y = np.array([...])\n","\n","#Calculate the mean, standard deviation, and standard uncertainty of the mean\n","mean_x=np.mean(x)\n","sd_x=standard_deviation(x)\n","su_x=standard_unc_of_mean(x)\n","\n"],"metadata":{"id":"l_aJwRQgI9fE"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["#Comparing two sets of uncertain measurements\n","x = np.array([...])\n","y = np.array([...])\n","x_unc = np.array([...])\n","y_unc = np.array([...])\n","\n","t_1_2 = t_prime(x, x_unc, y, y_unc)\n","\n","\n","print(\"t-prime between [variable details] = \" + str(\"%.2f\" % t_1_2))\n","\n"],"metadata":{"id":"ZYX9XD4-v06L"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["#Making plots of x versus y\n","%matplotlib inline\n","y = np.array([...])\n","x = np.array([...])\n","x_unc = np.array([...])\n","\n","# Replace \"[x]\", \"[y]\", and \"[y_unc]\" with the relevant variable names.\n","plt.figure()\n","plt.errorbar([x],[y], [y_unc], fmt='.')\n","plt.plot([x],[y],linestyle='None')\n","plt.xlabel('[x] ([units])')\n","plt.ylabel('[y] ([units]')\n","plt.show()"],"metadata":{"id":"SiiF976kzjVg"},"execution_count":null,"outputs":[]}]}