Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Chemistry Expert

It is well known that IDW(Inverse Distance Weighted Interpolation) will not yield exactly the same value if we use the known locations as the input. Write a Python program to test
this property.

The following is a Python implementation of IDW. This function takes two input variables. Z is a list of lists where each element list contains four values: X, Y, Value, and Distance to target point. Z can also be a NumPy 2-D array. Variable b is the power of distance. It returns the estimated value at the target location. Note that we don't need to specify the target location per se. Instead in Z we have the distance from each known location to the target point.

def IDW(Z, b):
zw = 0.0 # sum of weighted z
sw = 0.0 # sum of weights
N = len(Z) # number of points in the data
for i in range(N):
  d = Z[i][3]
  if d == 0:
      return Z[i][2]
 w = 1.0/d**b
 sw += w
 zw += w*Z[i][2]
return zw/sw

Chemistry, Academics

  • Category:- Chemistry
  • Reference No.:- M91539468
  • Price:- $20

Guranteed 24 Hours Delivery, In Price:- $20

Have any Question?


Related Questions in Chemistry

Q1 in your gravimatric analysis experiment you weigh the

Q1: In your gravimatric analysis experiment, you weigh the precipitate of AgCl in a filtering crucible. You have to weight your filtering crucible first (three weighing measurement), then do the filtration. After drying ...

1-write balanced equation for the double-replacement

1-Write balanced equation for the double-replacement precipitation  reaction described, using the smallest possible integer coefficients. A precipitate forms when aqueous solutions of  nickel(II) iodide  and  potassium c ...

A student weighed out 174 grams of sodium hydroxide pellets

A student weighed out 1.74 grams of sodium hydroxide pellets and added them to 48.0 grams of water in a calorimeter. Extrapolating back to the time of mixing yielded a temperature change at the time of mixing equal to 9. ...

A chemist must preparenbsp450 mlnbspofnbsp130 mm aqueous

A chemist must prepare 450. mL of 130. mM aqueous aluminum sulfate (Al2(SO4)3) working solution. He'll by pouring out some 0.452 mol/L aqueous aluminum sulfate stock solution into a graduated cylinder and diluting it wit ...

Use valence bond theory to explain the bonding in f2 hf and

Use valence bond theory to explain the bonding in F2, HF, and ClBr. Sketch the overlap of the atomic orbitals involved in the bonds.

Wat is the molarity to the hundredths place of 50 g hpo3

What is the molarity, to the hundredths place, of 5.0 g HPO3 in 300. mL of solution?

The atomic masses of lithium-6 759 and lithium-7 9241 are

The atomic masses of Lithium-6 (7.59%) and Lithium-7 (92.41%) are 6.0151 and 7.016 amu, respectively. Calculate the average atomic mass of chlorine. The percentages in parentheses denote the relative abundances.

Name five types of radiation describe in table form their

Name five types of radiation. Describe, in table form, their mass number, charge, and identity.

Question - the solubility of o2g in water is 443 mg of

Question - The solubility of O 2 (g) in water is 4.43 mg of O 2 /100g H 2 O at 20 o C and 1 atm pressure. What pressure of O 2 (g) would be required to produce a saturated solution that is 0.010 M O 2 ?

Explain why the mass of the crucible and anhydrous salt is

Explain why the mass of the crucible and anhydrous salt is less than the mass of the crucible and the hydrate. What is the chemical formula of copper (II) sulfate?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As