Hi,
I am really new to Python and I am having real trouble with this new language.
This is what I want to do:
I have two sets of .txt files that contain numbers. They look like this:
FILE1
1028.085 283.795 2056.13 295.254 121912.4 11.346 0.004
147.932 780.677 966.771 289.326 34355.5 12.721 0.011
710.507 541.051 973.092 684.851 32184.8 12.792 0.016
FILE2
147.695 780.377 966.771 289.456 29963.6 12.870 0.013
716.658 546.237 938.72 653.857 22436.3 13.184 0.023
1028.385 283.495 2056.13 295.254 121912.4 11.346 0.004
1028.485 283.405 2056.13 295.254 121912.4 11.446 0.004
The first two columns are position x and y of some data. The rest is not that important for now.
What I want to do is
a) read in those files
b) find a matching (x,y) coordinates from the files within some degree (let's say within by .5 because the coordinates of file2 may not be exactly the same from file1)
c) write them side-by-side in a new (third) file
d) if there was no match then still write it out in the output with some comments saying "there was no match" or something
e) if there is more than one match, put a comment saying "this pair had more than one match"
Thus, my final output should have the following columns:
x1, y1, col3_1, col4_1, col5_1, col6_1, col7_1, x2, y2, col3_2, col4_2, col5_2, col6_2, col7_2, comment
These should be printed on the very first row of the output as well.
Any help would be greatly appreciated.
Thank you!