Question: I'm having difficulty finding the solution to this assignment. I don't know if it is possible but I would like some help so that I

I'm having difficulty finding the solution to this assignment. I don't know if it is possible but I would like some help so that I can compare my code with the proper solution. I'll leave a copy of the assignment details and the data sheets to go along with it. If there is any issues please let me know.

FAIR WARNING IM SENDING 3 DATA FILES THAT EACH ARE VERY LONG. I apologize in advance for any inconvenience.

Here is a link to a visual copy of my assignment.

"https://www.chegg.com/homework-help/questions-and-answers/project-6-data-visualization-analysis-cs-1410-background-project-based-actual-work-done-de-q41374153"

Project 6: Data Visualization and Analysis CS 1410 Background This project is based on actual work done for the Department of Homeland Security. The goal is to detect the presence of dangerous materials, such as in a point of entry at an airport or other location. All items pass through a scanner which reports certain radioactive emissions as voltage spikes. The software takes the digitized voltage measurements and examines them for such spikes, which we call "pulses". Here is a graph of one of the data files provided by the scanner: 800- 600 - 400 500 1000 1500 2000 2500 3000 Because the data is quite jagged, we first "smooth" it before analyzing it. We will form a new sequence of numbers obtained by replacing every data value, starting with the 4th entry and ending with the 4th from the last entry, with a weighted average of the seven points around it, using the following formula: (Vi-3 + 2y + 3yi-1 +3yi + 3yi+1 + 2yi+2 + Yi+3) //15 So, in our new sequence of smoothed data, the center point of every interval of seven points, yi, is replaced by applying the formula above. The first and last 3 data values are left unchanged, since there aren't a sufficient number of points before or after them to use the smoothing formula. The original data array is left unchanged. Here is a plot of the smoothed data:

6 500 1000 1500 2000 2500 3000 It is better to use the smoothed data for detecting pulses. Requirements In this project, you will process all of the files in the current folder with a ".dat" suffix in the file name. These files are found on Canvas in the Project 6 folder. For each such file, you will: 1. Read the data into an array of integers (using array array or numpy.ndarray) 2. Smooth the data into another array of integers 3. Find the beginning of each pulse by examining the smoothed data 4. Compute the "area" of each pulse using the original, unsmoothed ("raw") data 5. Graph both the raw and smoothed data on the same plot, each with their own axis You detect a pulse by looking for a "rise" over three consecutive points, yo, Yi+1) Yi+2. The rise is the difference Yi+2 - y. If the rise exceeds a certain "voltage threshold" (vt = 100), then a pulse begins at position i. Record this position. After finding a pulse start position, advance through the data starting at Yi+2 until the samples start to decrease before looking for the next pulse. To compute the area of a pulse, you simply add the (width =) 50 raw y-values starting at the beginning of the pulse, or up to but not including the start of the next pulse, whichever comes first. For each file, plot both sets of data in a single plot and save it to a file. For example, one of the files is named 2_Record2308.dat, so you will store the following plot in the file 2_Record2308.pdf:

2_Record2308.dat 800 600 & 400 200 800 smooth 0 500 1000 1500 2000 2500 3000 Do not hard code the file names (see main below). You will also write the original file name, pulse start positions, and corresponding areas to the file 2_Record2308.out. If your computations are correct, the following will appear in 2_Record2308.out: 2_Record2308.dat: Pulse 1: 1020 (3421) Pulse 2: 1031 (18854) The area for each pulse appears in parentheses after its start position. For the pulse beginning at (one-based for humans) position 1020 (1019 in the zero-based array, of course), you sum the voltages at raw data positions 1019 through 1029 in the array. Implementation Notes Use array array or numpy.ndarray (preferred) to hold the voltages. Use subplot to plot both raw and smoothed data in a single plot. Make sure you include titles and labels as shown in the sample plot above. Use the savefig method in pyplot to save your plots to PDF files. Use the following main program. All the work is done in analyze def main(): for fname in glob.glob(".dat'): print (analyze(fname)) Submit your source file (name it dataplot.py) and all of the .pdf and .out files. Your program should be able to handle an arbitrary number of .dat files.

Here is file:

as_ch01-0537xx_Record1042.dat

0 -36 -36 -48 -36 -24 -40 -44 -28 -32 -44 -12 -36 -20 -16 -20 -20 -28 -28 -36 -36 -20 -24 -48 -52 -28 -40 -20 -16 -20 -12 -16 -12 -28 -20 -12 4 -52 -36 -24 -48 -44 -32 -20 -12 -28 -20 -16 -20 -20 -8 -32 -32 -24 -64 -24 -36 -40 -8 -48 -12 -76 0 -20 -28 -24 -8 -20 -16 -36 -36 -32 -56 -24 -24 -24 -36 -12 -20 -32 -32 -20 -24 -16 -4 -28 -20 -20 -36 -52 -24 -16 -8 -24 -16 -20 -32 -40 -24 -20 -28 -28 8 -48 -52 -24 -36 -40 -24 -24 -28 -28 -32 -32 -32 -20 -20 -36 -60 -52 -44 -28 -40 -48 -60 -24 -44 -52 -28 -12 -24 -12 -24 -24 -36 -48 -36 -24 0 -40 -56 -36 -44 -36 -40 -36 -40 -44 -24 -24 -40 -40 4 -52 -12 -48 -32 -40 -44 -36 -8 -40 -56 -56 -32 -32 -32 4 -52 -12 -44 -40 -32 -28 -28 -20 -4 -20 0 -56 -52 -16 -8 -52 -20 -12 -20 -36 -24 -20 8 8 -32 0 -40 -4 -36 -20 -36 -40 -20 -60 -20 -20 -48 -28 -28 -12 -16 -20 -40 -36 -24 -8 -16 -36 -48 -48 -52 -36 -24 20 -20 -36 -32 -40 -28 12 -12 -28 -16 -16 -32 -36 -20 -24 -36 4 -12 -24 -36 0 -40 -20 -12 -52 -20 -44 -4 -48 -28 -4 -36 -40 -20 -28 -8 -12 0 -32 -8 -36 -40 -28 -48 -36 -8 -40 -12 -12 -16 -52 -12 -52 -16 -28 -40 -32 -32 -40 -8 -36 -64 -32 -20 0 -20 -40 -24 -12 0 -12 -32 -16 -32 -40 -20 -16 -16 -32 -16 4 -24 -16 -8 -28 12 -12 -20 -48 -36 -48 -8 -40 20 -52 -44 -24 -40 -48 -12 -8 -24 -20 -32 -12 -32 -44 -20 -52 -36 -24 -8 -4 -68 -24 -4 -48 0 -40 -20 -12 -36 -32 -20 -36 -36 -28 -48 -36 -12 -28 -24 -28 12 -52 -36 -32 -24 -24 -20 -36 -16 -32 -32 -28 -28 -60 -28 -32 12 -28 -20 -16 -24 -16 -28 -48 -20 -36 -64 -32 -32 -32 -36 -36 -16 -20 -8 -40 -40 -36 -32 -48 -48 -12 -16 -36 -32 -44 -20 -40 -12 -28 -28 -48 -48 -20 -36 -40 -4 -24 -12 -20 -20 -28 -16 -28 -44 -12 -28 -64 -28 -28 -20 -16 -24 -24 -20 -20 -44 -20 -24 -20 -32 -16 -8 -36 -28 -36 -20 -28 -28 -64 -40 -28 0 -28 -16 -20 -4 -32 -28 -28 -8 0 -36 -28 -24 -20 -36 -4 -60 -44 -32 -32 -36 4 -16 -52 -36 -48 -8 -40 -32 -36 -28 -36 -12 -44 -60 4 -20 -12 -4 -16 16 -40 -28 -48 -20 -44 -36 -12 -44 -16 -36 -8 -40 -4 -24 -36 -40 -20 -52 -48 -16 -40 -36 -4 -52 -24 -32 -20 20 -24 -32 -48 -12 -44 -40 0 -40 -20 -56 -36 -16 -8 -48 -20 -28 -32 -40 -4 -24 -40 -12 -12 -52 0 -16 -24 -24 -52 8 -20 -24 -24 -28 0 -28 -36 -28 0 -40 -36 -36 4 -24 -20 -24 -8 -16 -8 -60 -68 -24 -12 -28 -36 -20 -28 -8 -28 -60 -36 -20 -32 4 -16 -40 -16 -32 -8 16 -28 -40 -8 -48 -28 -36 -40 8 -12 -24 -32 -24 -20 -40 -12 -28 -28 -24 -12 -28 -20 -28 -40 -44 -16 -40 0 -24 -52 -56 -20 -36 -8 -20 -32 -8 -60 -16 -32 -32 -44 -16 -8 -16 -12 -36 -12 -52 -40 -72 -12 -4 -68 -36 -24 -56 -16 -36 -24 -12 -28 -28 -64 -52 -28 -32 -20 -52 -24 4 -36 -28 -44 -20 -16 -16 -28 -44 -8 -28 -20 -48 -24 -32 -32 -40 -20 -16 -16 -28 -24 -36 -36 -52 -40 -40 -28 -44 -16 -24 -8 -16 -28 -24 -20 -8 -16 -8 -40 -60 -28 -52 8 -60 -44 -4 -32 -40 -12 -44 -32 -20 -24 -32 -24 -16 -40 -8 -40 -24 -12 -4 -20 -28 -40 -36 -20 -20 16 -16 -20 -32 -48 -16 -44 -12 -44 -28 -28 -44 -48 -28 0 -20 -20 -48 -8 -36 -20 -28 -48 -24 -8 -32 -24 -24 -24 -52 -20 -28 -36 12 -44 -8 -40 -40 -36 -20 16 -68 -32 -16 -44 -4 -28 -24 -44 -12 4 -28 -4 -20 -24 -36 -52 -32 -16 -12 -8 -16 -28 -32 -36 -36 -16 -12 -28 -24 -28 -24 -32 -24 -40 -48 -36 -20 -40 -44 -12 -28 -20 -8 -36 8 -36 -48 -24 -20 -48 -12 -28 -32 -36 -8 -32 -4 -40 -8 -40 -32 -28 -48 -28 -20 -52 -28 -4 -40 -44 -84 -76 -68 -68 -4 28 -40 -28 -24 -64 4 -28 -44 -36 -28 -16 -44 -24 -56 -40 -52 -64 -44 -32 -20 -44 -12 -32 12 -32 -4 -60 -40 -44 -8 -24 -52 -36 -40 -68 -24 -16 -24 -32 -32 -60 -48 -44 -24 -52 -4 -4 -48 -32 -36 -40 -12 -48 -40 -20 -60 -32 -28 -28 -44 -60 -24 -8 -16 -20 -20 -48 -16 -36 -48 -44 -28 -44 -4 -32 -20 -52 -8 -24 -16 -52 -32 -36 -44 -60 -28 0 -40 -24 -44 0 -16 -4 -40 -32 -8 -40 0 -16 -32 -12 -32 -28 -36 -8 -12 -8 -16 -20 -40 -24 -24 -24 -52 -40 -40 -8 -28 -36 -32 -16 -20 -44 -24 -28 -20 -28 4 -36 -20 -16 -40 -24 -44 -24 -40 -32 0 -12 -12 4 -16 -20 -8 -48 -8 -52 -32 -48 -12 -32 -32 -12 -16 -32 -28 -36 -16 -20 -20 -16 -36 -24 -28 -16 -36 -44 -20 -48 -16 -4 -60 -48 -24 -24 -12 -32 -40 -36 -8 -36 -32 -40 -4 0 200 1908 4584 4660 4568 3408 2484 2032 1312 856 724 476 296 200 500 1976 1908 2324 1732 1380 940 548 460 404 212 200 116 216 416 492 624 492 396 296 264 208 236 220 208 220 188 236 156 64 72 100 132 152 68 80 164 44 32 100 224 248 264 236 196 108 160 152 136 92 56 80 116 48 56 84 60 4 32 76 52 -28 -8 0 36 -16 20 4 -20 -24 0 0 0 64 56 -12 -48 -32 0 44 -4 16 8 -40 -28 36 4 -48 -12 -32 0 0 -4 72 20 -20 -20 -8 -12 -12 24 24 12 -24 -20 -28 -24 -40 -24 -48 -44 -4 -16 -4 -32 -40 -20 -24 -12 -52 -20 -44 -44 -24 -52 -40 -12 -4 -12 -24 -20 -32 -24 -36 -4 -28 -36 28 56 12 -16 -44 -32 -60 -8 -20 -36 -4 -24 72 16 0 -28 -20 -36 -40 -16 -28 -32 -20 36 -20 -20 -12 -4 -24 24 -20 -44 40 8 -4 -24 -12 -28 -20 -24 -36 -40 -52 -4 -20 -8 -32 -24 -28 8 -56 -20 -32 -4 -20 -24 -52 -4 -4 -36 -12 -44 -24 -16 -20 -60 -32 -12 -12 -60 -32 -36 -28 -32 -16 -12 -20 -12 -28 -24 4 8 -68 -16 -52 -36 -28 -44 -20 20 4 -16 -16 -16 4 -36 -24 -48 0 -20 -68 -24 -8 -64 -32 -12 -40 -32 -36 -4 20 -20 -24 -24 -32 -20 -24 -48 -24 -16 -40 -40 -12 0 -56 -24 -8 -28 -32 32 4 -8 -20 -44 -44 -20 -32 -32 -20 -32 -16 -4 -8 -24 -12 -16 -28 -48 -36 -24 52 -28 -4 -36 -32 -32 -32 -20 0 -32 -64 -4 -32 -8 -64 -20 -12 -24 -40 -24 -40 -24 -40 -44 -20 -44 -16 20 -28 -4 -44 -56 -36 0 -40 -48 -24 -20 -20 -16 -52 -60 -52 -32 -12 -40 -48 -28 -24 -36 -48 -4 -12 -12 -24 -40 -48 -40 -60 20 8 -12 -24 -44 -48 -48 -16 -48 -40 -20 -28 -4 -48 -32 -40 -52 -52 -40 -64 -52 -36 -8 -24 -20 -12 -32 -20 -24 -28 4 36 -16 -20 -16 -8 -68 -48 -48 -32 -48 -12 -28 -12 -28 -36 -24 -32 -40 -16 -40 -52 -32 -56 -20 -16 -40 0 -8 -40 -32 -20 -8 -52 -40 -12 -28 -68 -56 -40 -28 -36 -48 -36 -28 -4 -20 -16 -52 12 -8 -44 -36 -12 4 -16 0 -16 -12 8 -28 -24 12 -40 -28 -32 -24 0 -28 8 4 -12 -12 -40 -36 -36 -16 4 -36 36 12 24 -36 -28 -16 -36 -8 -44 -20 -44 -40 -16 -12 -48 -48 -28 -20 -32 -24 -28 -32 48 12 -40 -48 -40 -20 -44 -24 0 -8 -32 -28 -28 -16 -8 -32 -28 -24 -36 -44 -24 0 -24 12 -20 -8 -40 -28 0 -32 -52 -56 -12 -12 -20 -16 -68 -28 -20 -32 20 -40 -12 -40 -52 -16 -4 -32 -8 -44 -8 20 -36 -28 -32 -36 -32 0 60 -4 -24 -36 -12 -32 -48 -32 -40 -24 -28 -52 -56 -8 4 -16 -16 -16 -52 -56 -16 -28 -28 -32 -12 8 -32 -36 -44 16 -4 -28 20 -20 -36 -32 -28 -24 -4 -36 -24 -40 -8 -40 4 -12 -44 -12 -40 -44 -56 -48 4 -20 -64 -12 -8 -56 -32 -12 -48 -12 -44 -32 -24 0 -20 -28 -24 -20 -28 -24 -16 -32 -48 -32 -8 -24 -16 -28 -32 -16 -60 0 16 -44 -28 -24 -48 -48 -44 -4 -40 -36 -32 -20 -32 -16 -8 -32 -20 -8 -40 -44 -24 8 -28 -56 -20 -48 4 -20 -16 -20 -20 -52 -20 0 -36 -44 -36 -48 -32 -44 -24 -32 -16 -20 -12 -32 -4 -32 -28 -32 -52 -8 -32 -36 -48 -68 -32 -24 -16 -32 0 20 -32 -24 -20 -56 -28 -16 -32 -60 -36 -20 -68 -28 -28 -20 -24 -28 -20 -60 -4 -36 -24 -16 -24 -40 -20 -4 -24 -24 -8 -28 -36 -36 -32 -24 -16 -12 -28 -32 -36 -4 -24 -40 -64 -28 0 -36 -4 4 

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!