Question: 5 . ( 4 0 Points ) You have been recording the concentration of a contaminant in ( mathrm { mg } /

5.(40 Points) You have been recording the concentration of a contaminant in \(\mathrm{mg}/\mathrm{L}\) as it travels down a stream over the course of 10 days. You know that the contamination plume should behave according to the following equation:
\[
C=C_{0} e^{-C_{1}\left(t-t_{0}\right)^{2}}
\]
Where \( C_{0}\) is the initial concentration, \( C_{1}\) is the decay constant of the contaminant, and \( t_{0}\) is the time at which the peak of concentration occurs. For this problem you know that the initial concentration was \(100\mathrm{mg}/\underline{\underline{L}}\) and the peak of the concentration occurred at 5 days. The daily observations have been provided to you in a text file format (e.g. np. loadt xt ('YourFileName.txt')). For this problem you will need to figure out the decay constant \(\left(\mathrm{C}_{1}\right)\) by trying 10 different values staring from a value of 0 all the way up to a value of 0.9(i.e. np.arange (\(0,1,0.1\))). You will select the best one based on the goodness of fit metrics.
a.(20 Points) To visualize the fit of the data you will need to calculate the four metrics for the fit (e.g. L1, L2, RMS, and R2). You will need to print these metrics to the console following the format provided below. You will need to plot each of the metrics on their own subplot in a single figure (e.g.
fig. add subplot (22X)). For full credit your plot must have the following elements:
i. All four plots must be on one figure-that is one figure with for subplots defined by 2 rows and 2 columns
ii. Each subplot must have the data plotted with black + signs (marker='+', color='k'.s=50).
iii. Each subplot must have both axes clearly labeled
iv. Each subplot must have the grid turned on
v. I need to be able to read the labels. So either re-size the figure before saving or use fig.tight layout ().
5 . ( 4 0 Points ) You have been recording the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!