# Untitled

a guest
Mar 12th, 2011
366
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. # Code for debunking a claim made in the video at http://www.youtube.com/watch?v=95zMdTvoqcQ
2. # The video was posted on March 8, 2011 and contains a prediction of a seismic event
3. # around March 11, 2011 (which turned out to correspond to an actual earthquake in Japan).
4. #
5. # The specific claim here is that both during the Chile earhquake on 2010/02/17 and
6. # the "predicted" earthquake on 2011/03/11, there is an "alignment" between Sun, Earth
7. # and comet C/2010 X1 (Elenin). This can be restated as follows:
8. #
9. # "There exists a magic angle between comet Elenin and the Sun (as seen from Earth)
10. #  when a seismic events occur"
11. #
12. # To verify this claim, we take a list of visible comets from the Minor Planet Center
13. # ( http://www.minorplanetcenter.org/iau/Ephemerides/Comets/Soft03Cmt.txt )
14. # and for each one, calculate the delta between Sun-comet angles on 2010/02/17
15. # and 2011/03/11.
16. #
17. # Output format:
18. #   delta, magic angle, comet name
19. #
21. #
22. # This code is placed in public domain.
23. #
24. # Requires pyephem library for ephemeris calculation.
25. #
26.
27. import ephem
28. import math
29.
30. def getSeparation(date, object1, object2):
31.     object1.compute(date)
32.     object2.compute(date)
33.     return ephem.separation(object1, object2)
34.
35. sun = ephem.Sun()
36.
37. date1 = '2010/02/17'
38. date2 = '2011/03/11'
39.
40. f = open('Soft03Cmt.txt')
41. hits = 0
42. comets = 0
43. for line in f:
44.     if line.find('#') == 0:
45.         continue
46.
47.     comets = comets+1
48.
50.     sep1 = getSeparation(date1, sun, comet)
51.     sep2 = getSeparation(date2, sun, comet)
52.     delta = 180*(sep1-sep2)/math.pi
53.
54.     # We only list comets with delta < 6 degrees, since in the original claim
55.     # there is actually a 5.7 degree difference in angle between the earthquakes.
56.     # I mean, Elenin should be the only comet for which it works, right? ;-)
57.     if abs(delta) < 6:
58.         hits = hits + 1
59.         print "%5.2f %5.1f %s" % ( abs(delta), 180*sep1/math.pi, comet.name )
60.
61.
62. print "%d comets, %d hits (%5.2f %%)" % (comets, hits, 100.0*hits/comets)
RAW Paste Data