/ENM1050

Course material for UPenn ENM1050

Primary LanguageJupyter Notebook

ENM1050

Introduction to scientific computation.

Current Schedule

  • 28-Aug. Course intro, introduction to Google Colab
  • 4-Sept. Colab warm-up and canvas group exercise. Dr. Trask on travel, OH begin next week, virtual zoom OH available this week by private message request on Ed.
    • HW0 posted, due midnight 9/9.
    • Ref material: Code.
    • Refer back to slides from 28-Aug
  • 9-Sept. Intro to our first simulator, lists, reading data and plots.
  • 11-Sept. A widget for data collection, conditionals, writing clean code.
  • 16-Sept. For loops, while loops, and list comprehension.
  • 16-Sept. Intro to functions, nonlinear solvers, first look at SciPy
  • 23-Sept. Intro to functions, nonlinear solvers, first look at NumPy
  • 25-Sept. Coding tutorial: Implementing a differential equation solver using encapsulation and unit tests
  • 30-Sept. Classes and linear systems
    • Please note: HW3 has been pushed forward, and is now due 10/1 by 11:59 pm.
    • Slides: (pptx ,pdf)
    • In-class exercises: jupyter notebook
    • Survey: here
  • 2-Oct. AI, graphics, and VSCode
    • Please note: HW3 has been pushed forward, and is now due 10/1 by 11:59 pm.
    • Slides: (pptx ,pdf)
    • Todo: Everyone needs to get VSCode up and running, see todays slides
  • 7-Oct. AI, graphics, and VSCode
    • Please note: There is a new HW to be completed a week from today, to confirm you have a working VSCode environment.
    • Slides: (pptx ,pdf)
    • In-class exercises: to be completed on your machine in vscode, guided by jupyter notebook directions.
  • 9-Oct. AI, graphics, and VSCode
    • Please note: Do not forget to get your environment set up. Dr. Trask will be back from travel Friday - if you haven't been able to get an environment working arrange 1-1 OH by email.
    • Directions: Class will be covered by Dr. Hernandez. Complete Monday's exercise, and then move on to today's in class exercise.
    • In-class exercises: to be completed on your machine in vscode, guided by jupyter notebook directions.
  • 14-Oct. Midterm exam
  • 16-Oct. Supervised learning - linear algebra and PyTorch
    • Please note: If you'd like to discuss your exam or progress you've made thus far, please reach out to Prof. Trask
    • Slides: (pptx
    • In-class exercises: jupyter notebook directions.
  • 21-Oct. Pickle, Automatic differentiation, and gradient descent
    • Slides: no slides today. Guided overview of bouncy rock paper scissors to collect data.
    • HW4 is out and due a week from Wednesday. Get help from OH early!
    • In-class exercises: jupyter notebook directions.
  • 23-Oct. More PyTorch and a guided tutorial to fitting models.
    • Note: For HW4, we've curated a dataset for you that you can check out here. The loadexperiments.py file gives an example.
    • In class we will step through a tutorial for how to build and train PyTorch models. You'll be able to tweak this to complete HW4.

Tentative Schedule

The following schedule is from previous years. We will cover similar material, but the pacing and specific coverage is subject to change. Actual coverage and links to material will be provided above

  • 28-Aug Course intro, Google Colab
  • 2-Sep Labor Day
  • 4-Sep Plotting, File Input, intro to lists
  • 9-Sep Booleans
  • 11-Sep nested ifs
  • 16-Sep For loops, more lists, list comprehension
  • 18-Sep nested loops, filtering
  • 23-Sep while loops
  • 25-Sep conversion for to while, chatgpt
  • 30-Sep functions
  • 2-Oct functions reuse
  • 7-Oct numpy arrays
  • 9-Oct math on arrays
  • 14-Oct image processing
  • 16-Oct image processing
  • 21-Oct video processing and tracking
  • 23-Oct "Quiz (read code, write output) final project handout out"
  • 28-Oct Numerical integration, ode45
  • 30-Oct scipy
  • 4-Nov scipy
  • 6-Nov scipy
  • 11-Nov Py scripts
  • 13-Nov
  • 18-Nov put it together
  • 20-Nov Friday classes
  • 25-Nov animations
  • 27-Nov hybrid systems
  • 2-Dec MATLAB crash course (basics)
  • 4-Dec MATLAB crash course (loops, conditionals, etc)
  • 9-Dec Work on projects

Description

ENGR 1050 provides an introduction to computation and data analysis using Python – an industry standard programming environment. The course covers the fundamentals of computing, including variables, control structures, and functions. These concepts are illustrated through examples and assignments that show how computing is applied to various scientific and engineering problems. Examples are drawn from the simulation of physical and chemical systems, the analysis of experimental data, the simulation of dynamic systems, and control of sensors and actuators. We explore how programming is used to build simulators of engineering systems and perform machine learning.

Course Objectives

By the end of this course, you should be able to: • Translate a simulation or design problem specified in English into a computational model • Choose a numerical method for analyzing or simulating that engineering system • Code and debug your chosen computational approach • Produce a visualization for interpreting the results

Prerequisites

The course does not assume any prior programming experience but will make use of basic concepts from calculus and engineering. Relevant mathematical and engineering principles will be communicated in detail as needed. If you have doubts about your preparedness for the course, please visit the professor’s OH.

Teaching Staff and Office Hours

  • Instructor: Dr. Nat Trask ntrask@seas.upenn.edu
    • Associate Professor, MEAM Office hours: T 11:00am-12:00pm, R 11:00am-12:00pm
  • Graduate teaching assistant: Muhammad Abdullah muhabd@seas.upenn.edu
  • Teaching Assistants: Michelle Lin mylin@seas.upenn.edu, Alfredo Vazquez valfredo@seas.upenn.edu
    • TA Office hours: PICS conference room 517 Option 1: Wed 330-430 Option 2: Fri 11-1
  • Reminder: All correspondence should be through the ed forum. Emails are provided here for special circumstances (e.g. you can't access the OH building) and will otherwise be ignored.

Course Website

We will use Canvas (http://canvas.upenn.edu) for assignments and posting any additional resources for the class. We will use Ed Discussion for questions and announcements about the course. Ed is accessible through a link on the left panel of our Canvas page. If you have any questions about the class, please create a post! Use email only for sensitive topics. We will do our best to respond to your questions in a timely manner. If you see others’ questions that you can answer or answers that you can improve, do it! Students who have contributed thoughtful comments, questions, and answers throughout the semester will earn extra credit in the class. That said, while hints and suggestions are great contributions, Ed Discussion should not be used for sharing or distributing solutions to any assignments in the class. Our goal is for everyone to understand the material.

For more information on using Ed Discussion, check https://infocanvas.upenn.edu/guides/ed-discussion/

Class Time

Class is scheduled for Mondays and Wednesdays 1:45pm – 3:15pm at Meyerson Hall B3. Class times are intended to be interactive and will include a mix of short lectures and programming exercises. Please bring a computer. If you have a question, please speak up so we can clear up any confusions right away. If you think I have made a mistake in an explanation, please ask about it and help to fix the error or explain the confusion. Participating constructively in these ways will help make the class as good as it can be.

Textbook and Acknowledgements

There is no required textbook for this course. A list of references will be provided for those seeking additional resources. A potential reference text would be Führer, Solem and Verdier.

  • Much of the early lecture material is taken from Dr. Cynthia Sung's previous offering of the same course.
  • "Scientific Computing With Python" Führer, Solem and Verdier.
  • "Probability Essentials" Jacod & Protter

Python

Python will be the computing language used throughout the course. We will be using Google Colab for the majority of the course. This platform is free and accessible through your SEAS Google account. Instructions will be provided in the first week of class on accessing the required resources.

Course Requirements and Evaluation

Your grade in this class will be determined as a weighted combination of your performance in the following areas:

  • 45% Homework Assignments Homework will be assigned on a weekly basis and should be turned in on Canvas. Homework will be due on Tuesdays. Assignments may require some independent investigation of computing techniques outside of those covered in class
  • 15% In-Class Assignments Each class will include a number of in-class exercises, to be completed in pairs and turned in on Canvas the following Tuesday. These assignments will be graded on a combination of completion and correctness.
  • 15% In-Class Quiz There will be one in-class quiz on Monday, October 14. No external resources – e.g. notes, slides, or computer – are allowed during the in-class quizzes.
  • 25% Final Project You will propose and complete a final project that showcases your understanding of python and scientific computing. Many final projects require independent investigation of programming techniques unique to the project effort and not directly treated in the course text of lectures.

Further details will provided later in the semester.

Late Policy

Late assignments (with the exception of take-home quizzes) will be accepted up to 48 hours after the deadline with a penalty of 10% per day. After that point, no further homework will be accepted. Exceptions to these deadlines will be granted only for exceptional cases, such as severe illness or serious personal emergency. Post a private message to Piazza to request an extension if you need one. Individual assignment must be completed by the deadline. No late submissions will be accepted.

Collaboration Policy

You are encouraged to discuss the material with your classmates and to work in groups for any homework assignment, but the final product should be your own work. If you collaborate, in any way, you must acknowledge the collaboration. You should be able to provide a brief explanation of how your learning was improved by the collaboration. If you find this difficult to do, then it is probably the wrong kind of collaboration.

Here is a rule of thumb. Since your skills are emerging and developing, it is best if you always type in all of the code yourself, without directly copying from any source. If you understand the algorithm and its implementation, this will not be particularly difficult. If you find yourself wanting to peek at a source, you might not understand as well as you should.

University Policies and Resources

This course will be conducted in accordance with all university policies. The university and the School of Engineering & Applied Science also offer numerous resources to students that may be useful. Please let the instructors know if you have any questions or concerns related to the following:

  • Code of Academic Integrity: -In accordance with the University’s Code of Academic Integrity (available at https://catalog.upenn.edu/pennbook/code-of-academic-integrity/), all work turned in by students should be an accurate reflection of their knowledge, and, with the exception of working in groups for homework assignments, should be conducted alone. Violation of University Code of Academic Integrity may result in failure of the course.

  • Students with Disabilities and Learning Differences

    • Students with disabilities are encouraged to contact Weingarten Learning Resource Center’s Office for Student Disabilities Services for information and assistance with the process of accessing reasonable accommodations. For more information, visit http://www.vpul.upenn.edu/lrc/sds/, or email lrcmail@pobox.upenn.edu.
  • Counseling and Psychological Services (CAPS)

    • CAPS is the counseling center for the University of Pennsylvania. CAPS offers free and confidential services to all Penn undergraduate, graduate, and professional students. For more information, visit http://www.vpul.upenn.edu/caps/.