PHYS 1655 - Introduction to Python for Scientists and Engineers

(Cross listed as CS1113)

See recent UVA today article here!

Introduction:

Data has flooded our modern world!  Learn how to analyze it with the power of the Python programming language.  In this class, I will start you down the path to become a data scientist. 

Computers are perhaps the most valuable tool for engineering and sciences. In order to derive the most benefit from this tool, one needs to understand not only how to use it but also when it is appropriate and how to understand and utilize the result. Whether one is working on a small amount of data analysis on your personal computer, or harnessing the distributed power of a global network of computers to tackle an otherwise intractable task, skill in using a computer's power in problem solving can be immensely beneficial your career.

Along with an introduction to the PYTHON programming language, the course will introduce three core skills: analyzing data, simulating data, and visualizing data. It assumes no prior programming experience or knowledge about the inner workings of computers. It will concentrate on applications to common problems in science and engineering.

Physics 1655 covers the application of computers to solving basic problems, including an introduction to the Linux operating system, programming in python, use of builtin functions, and implementation of basic algorithms with a focus on numerical methods, visualizing data, error analysis and data fitting, and simulating physical processes.  We will do our work on UVA's Rivanna system, a high-performance computing tool with thousands of cores. 

This is an introductory class - No previous computer experience is required.  Note that some exposure to calculus is expected for scientists and engineers. 

In PHYS 1655 you will learn to work with GNU/Linux-based computer systems and to write useful computer programs. Why Linux? Linux-based computer systems are a mainstay in the world of scientific computing. In any laboratory setting where the research requires large amounts of data processing or computationally intensive calculations, you will routinely find a Linux-based cluster of computers handling the workload. Nearly 90% of the world's top performing computer systems operate on Linux. And Linux is the overwhelming choice for building world-wide high performance Computing Grids.

This class provides a first introduction to programming in a problem-solving setting. We concentrate on features of the Python programming language to teach the basic programming skills you need to put your computer to work.

Main topics covered

  1. Introduction to Computers/Linux

  2. Python Programming Basics

  3. Programming style and techniques

  4. Visualization of data distributions

  5. Basic statistical analysis, including fitting models to data, (time permitting a short introduction to Neural Networks)

  6. Simulation and Monte Carlo modeling

  7. Batch computing - running many jobs in parallel

Approximate Schedule

Week 1: Intro to computers/Linux, setup Github and Rivanna accounts

Week 2: Intro to Rivanna and Python (why Python?)

Week 3: Variables/memory, Random numbers (Ex:  MC integration)

Week 4: Flow control, strings, lists

Week 5: Numpy, File IO

Week 6: Intro to stats, functions

Week 7: classes, intro to plotting

Week 8: Statistical distributions and Chi^2

Week 9: Fitting

Week 10: More fitting, and batch jobs

Week 11: Classification and Pandas

Week 12: Machine learning

Week 13: More machine learning

Course Structure

PHYS 1655 is a very hands-on course. You will learn the basics of programming methods by completing numerous exercises throughout the semester in a flipped-classroom setting. Most topics will be introduced in a mini lecture (<10 min) and then you will spend the rest of our meeting time completing coding practice. Preparatory readings and/or tutorials will help you understand and derive the most benefit from lecture.  Weekly homework assignments will build on the lecture, classwork, and previous homework projects. There will be a final exam project. The professor reserves the right to schedule a midterm exam if it becomes clear that students are lagging behind on the general knowledge that should be acquired through the course reading material.

Texts

See the Texts and Reserve Book List (add link!) for more information on the required and recommended textbooks for this class.

Grading Criteria

Course attendance and participation is a critical part of this class. There will often be short quiz to accompany the course reading assignments.

Grade Categories

The breakdown of grading categories will be as follows:

  • Lab/class participation and quizzes (up to 20% may be in-class quizzes and/or pre-class reading quizzes): 40% - participation is split equally between attendance and turning in the in-class work. 

  • Homework assignments: 40%

  • Final exam project 20%

 Absolute grading scale:




A90-100 (A-: 90-92, A+: >97
B80-90 (B-: 80-82, B+: 87-90)
C70-80 (C-: 70-72, C+: 77-80)
D60-70 (D-: 60-62, D+: 67-70)
F<60

With enough effort everyone can do well in this course - grades will not be curved down!  Complete all assignments and you should do well. 

General Policies

Material

Each student is responsible for all course information announced in the lecture meetings, posted on the class website, or sent via email – pay attention to your email!

In-class Exercises

Each student must participate in in-class exercises. Work is to be turned in by noon on the following day. You must be on time and attend in person and work with a partner(s) (discuss illness with the professor). Make sure to submit class work.  Your score for participation will be partially based on what you turn in.

Missed Course Policy

There will be no makeup sessions. We allow two missed In-class activities for any reason (illness, emergency, schedule conflicts, etc.) Each additional missed session will result in a 0 for the in class participation score that day.  If you do the in class work and push to GitHub, you will still get credit for the work, but not for in-class participation.  I track them separately.   Note that up to 35% of your course grade is based off participation. You course grade will suffer for poor attendance or participation! 

TA Office Hours

We will provide a few TA office hours a week for help working on your assignments.   It will be linked form the course Wiki. 

Piazza

This term we will be using Piazza for out-of-class discussion. The system is highly catered to getting you help fast and efficiently from classmates, the TAs, and myself. Rather than emailing questions to the teaching staff, I encourage you to post your questions on Piazza. If you have any problems or feedback for the developers, email team@piazza.com.

Find our class signup link at on the course Wiki.  

Homework

The homework will mainly consist of writing computer programs and submitting your final work electronically for grading. Homework will generally be assigned on Wednesdays and will be due before class the following Wednesday.  Read homework assignments carefully. All work must be submitted following the instructions properly.  Late homework may not be accepted (update, see below).


Late work policy update (1/25/2004):

  • late work will be penalized 5 percent if turned in after the deadline but with in the first 24 hours, and an additional 5 points for each day it is late for the first 5 days.  
  • After 5 days, you may still turn in the work, for a maximum score of 75% until the last day of class.  After the last day of class, no late work will be accepted.  

I will enforce this policy strictly.  I don't want to hear any minor excuses.  Major life events will be considered.  It is a huge amount of extra work for my team to deal with late work.   I'd rather spend that time improving the course and helping you learn.   More importantly, it is extremely important for you to keep up in this course, and I hope this encourages you to do so!  

A common electronic submission deadline will precede the start of the Wednesday/Thursday course meeting. Start your work early for each assignment! Lack of computer availability or network disruption will not be accepted as valid excuses for late assignments. The homework deadlines will be strictly enforced. If you are unable to complete a particular assignment on time, you should submit any partial solutions for credit, then study the posted solutions for that assignment and move on to the following week's work. Homework grading questions should be addressed initially through your TA.

Reading Quizzes

Reading assignments may have a corresponding Reading Quiz due by 3pm on the Monday of lecture. These quizzes are very short, and mostly graded based on participation.  They are primarily to encourage you to read the material and think a little about it before class. They will be at most 20% of your grade. The questions are fairly easy if you look over the material in the book. Often, there will be a short answer question to provide the professor with some feedback on the reading material or how the course is going - only a sentence or two is required for these questions. But, please provide some thoughtful feedback.  Your score will be affected if you don't answer the short answer question. 

Final Project

   Due back electronically by the end of the final exam time slot.  Penalty of 20% if turned in late, and another 20% per day until received.  Turn it in on time.

Honors Policy

All homework assignments, quizzes, and exams should be considered pledged. You are encouraged to discuss problems and strategies, but copies of your program assignments or parts thereof may not be exchanged with other students. You may work together, but you may not share your assigned homework programs with other students.

It is very easy to cheat in this course. Don't do it. Cheating – copying solutions, copying other student's responses, doing less-than thoughtful work – all these constitute cheating and will be dealt with harshly if discovered.

This is a great class with many things to learn – do it properly and you will be rewarded in the end with lots of extremely valuable new skills and knowledge!

Recent space activity

Space contributors

{"mode":"list","scope":"descendants","limit":"5","showLastTime":"true","order":"update","contextEntityId":150307516}


  • No labels