Guest User

Untitled

a guest
Jan 16th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.83 KB | None | 0 0
  1. data1 =
  2. {
  3. {33.9168, 631.006}, {48.8067, 673.198}, {3.59394, 671.167},
  4. {64.1931, 632.506}, {58.7559, 613.401}, {5.45129, 635.602},
  5. {40, 500}, {55.6619, 651.298}, {40, 850}, {18.1513, 671.949},
  6. {54.6781, 598.251}, {23.5348, 608.289}, {65.0549, 531.442},
  7. {74.4132, 479.425}, {32.9808, 671.931}, {46.4516, 750.192},
  8. {26.9262, 650.35}, {27.1816, 413.334}, {20.3858, 633.391},
  9. {50.9284, 770.49}, {64.1628, 670.801}, {13.1805, 652.588},
  10. {41.4876, 650.752}, {82.9996, 514.631}, {36.0045, 612.007},
  11. {26.4914, 548.723}, {58.3295, 458.015}, {21.557, 801.607},
  12. {5.84689, 800.425}
  13. };
  14.  
  15. data2 =
  16. {
  17. {1532.93, 536.587}, {1514.13, 789.}, {1530.22, 596.423},
  18. {1520.66, 640.844}, {1540.5, 660.237}, {1530.03, 790.2},
  19. {1559.17, 758.9}, {1556.15, 661.154}, {1580.39, 467.111},
  20. {1525.63, 660.167}, {1571.44, 620.556}, {1512.62, 623.985},
  21. {1520, 500}, {1533.79, 638.607}, {1526.88, 621.69},
  22. {1560.9, 586.053}, {1572.13, 658.656}, {1548.37, 638.933},
  23. {1532.8, 400.935}, {1540.44, 618.794}, {1590.15, 501.882},
  24. {1554.5, 738.5}, {1564.73, 445.615}, {1543.06, 600.093},
  25. {1565.69, 601.532}, {1562.55, 639.132}, {1511.34, 659.395},
  26. {1580, 400}, {1585, 700}, {1571.9, 519.25}
  27. };
  28.  
  29. data1corrected=
  30. {
  31. {21.557, 801.607}, {5.84689, 800.425}, {50.9284, 770.49},
  32. {46.4516, 750.192}, {32.9808, 671.931}, {48.8067, 673.198},
  33. {3.59394, 671.167}, {18.1513, 671.949}, {64.1628, 670.801},
  34. {13.1805, 652.588}, {55.6619, 651.298}, {26.9262, 650.35},
  35. {41.4876, 650.752}, {5.45129, 635.602}, {20.3858, 633.391},
  36. {64.1931, 632.506}, {33.9168, 631.006}, {58.7559, 613.401},
  37. {36.0045, 612.007}, {23.5348, 608.289}, {54.6781, 598.251},
  38. {26.4914, 548.723}, {65.0549, 531.442}, {82.9996, 514.631},
  39. {74.4132, 479.425}, {58.3295, 458.015}, {27.1816, 413.334}
  40. };
  41.  
  42. data2corrected=
  43. {
  44. {1530.03, 790.2}, {1514.13, 789.}, {1559.17, 758.9},
  45. {1554.5, 738.5}, {1540.5, 660.237}, {1556.15, 661.154},
  46. {1511.34, 659.395}, {1525.63, 660.167}, {1572.13, 658.656},
  47. {1520.66, 640.844}, {1562.55, 639.132}, {1533.79, 638.607},
  48. {1548.37, 638.933}, {1512.62, 623.985}, {1526.88, 621.69},
  49. {1571.44, 620.556}, {1540.44, 618.794}, {1565.69, 601.532},
  50. {1543.06, 600.093}, {1530.22, 596.423}, {1560.9, 586.053},
  51. {1532.93, 536.587}, {1571.9, 519.25}, {1590.15, 501.882},
  52. {1580.39, 467.111}, {1564.73, 445.615}, {1532.8, 400.935}
  53. };
  54.  
  55. trafo =
  56. FindGeometricTransform[data2corrected, data1corrected, TransformationClass -> "Affine"];
  57.  
  58. trafo[[2]][{x, y}]
  59.  
  60. {1502.56 + 1.00443 x + 0.0069496 y, -13.1299 - 0.00592912 x + 1.00225 y}
  61.  
  62. data1correctedtransformed= trafo[[2]][data1corrected];
  63.  
  64. ListPlot[{data2corrected, data1correctedtransformed},
  65. PlotRange -> {{1510, 1600}, {300, 900}}, PlotStyle -> {Blue, Green},
  66. Frame -> True, FrameLabel -> {{"y", ""}, {"x",
  67. "data1correctedtransformed (Green), data2corrected (Blue)"}},
  68. BaseStyle -> {FontWeight -> "Bold", FontSize -> 15,
  69. FontFamily -> "Calibri"}, ImageSize -> Large]
Add Comment
Please, Sign In to add comment