{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# hw9_sol - /usr/bin/env python Joseph Harrington AST...

This preview shows pages 1–2. Sign up to view the full content.

#! /usr/bin/env python # Joseph Harrington # AST 5765/4762 # Homework 9 # 21 October 2007 # Updated 28 Oct 2008 by Kevin Stevenson # Problem 1 from hw8_sol import * # Problem 2 # hard-coded values lamponfile = np.array([ 'k_lampon_1', 'k_lampon_2', 'k_lampon_3', 'k_lampon_4', 'k_lampon_5' ]) lampofffile = np.array([ 'k_lampoff_1', 'k_lampoff_2', 'k_lampoff_3', 'k_lampoff_4', 'k_lampoff_5' ]) # query data for sizes nlampon = lamponfile.size nlampoff = lampofffile.size # Allocate data arrays npair = np.min([nlampoff,nlampon]) lampondata = np.zeros((nlampon, ny, nx)) lampoffdata = np.zeros((nlampoff, ny, nx)) lampdiffdata = np.zeros((npair, ny, nx)) # lampon data for k in np.arange(nlampon): infile = datadir + lamponfile[k] + fext head, lampondata[k] = rp.rdpharo(infile) lamponhead = head # lampoff data for k in np.arange(nlampoff): infile = datadir + lampofffile[k] + fext head, lampoffdata[k] = rp.rdpharo(infile) lampoffhead = head # calculate the difference for k in np.arange(npair): lampdiffdata[k] = (lampondata[k] - lampoffdata[k]) # normalized median-combination of the difference

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern