Question: * * * Second image shows the csv * * * The distance between two radio telescopes on the Earth's surface can be determined using

***Second image shows the csv***
The distance between two radio telescopes on the Earth's surface can be determined using a technique called "baseline interferometry."
Both telescopes look at the same very distant object in the sky (typically quasars). From the difference in the arrival times of the radio waves measured using very precise atomic clocks (accurate to 1 second in 1 million years), the distance between the two telescopes can be determined to millimetre accuracy.
Over the course of 20 years, two radio telescopes, one in Westford, United States, and the other in Wettzell, Germany, performed baseline interferometry to determine the rate at which Europe is moving away from North America.
Write a program to fit a straight line to the data recording the change in distance between Westford, USA and Wettzell, Germany. From the fitted line, calculate the speed at which the two continents are moving in per year.
Specifically, your program should call various functions in the main function to:
1. Prompt the user for the filename with the prompt "Filename? "
- You may assume that your program will always be given a valid filename.
- For testing, you can find a copy of one of the files here.
2. Plot the data from the file first and then the fitted line to generate a plot like the one shown below.
- The plot should be titled "Change in distance between westford, USA and wettzell, Germany".
- It should have \( x \)-axis label "Time (year)" and \( y \)-axis label "Distance ( m )".
- You can choose any colours that you like for your lines.
- Use the default \( x \) and \( y \) ticks for this plot.
3. Print the following string: "The average speed the continents are moving is: \{speed to 2 dp \}\(\mathrm{cm}/\mathrm{year}\)" where \{speed to 2 dp \} is in cm/year and formatted to 2 decimal places. (Hint: The speed is the slope of the fitted line. You will need to convert it from \(\mathrm{m}/\) year to \(\mathrm{cm}/\) year.)
Reminders:
- np.loadtxt may be helpful.
- Don't forget to include the call to your main function in the code that you submit.
 ***Second image shows the csv*** The distance between two radio telescopes

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!