1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
use crate::;
use crate::;
use crateRocheError;
use *;
///
/// fblink works out whether or not a given point is eclipsed by a Roche-distorted star by searching along the line
/// of sight to the point to see if the Roche potential ever drops below the value at the stellar surface.
///
/// Arguments:
///
/// * `q`: mass ratio = M2/M1
/// * `star`: star concerned
/// * `spin`: ratio of spin to orbital frequency
/// * `star`: which star is doing the eclipsing, primary or secondary
/// * `ffac`: the filling factor of the star
/// * `acc`: accuracy of location of minimum potential, units of separation. The accuracy in height relative to the
/// Roche potential is acc*acc/(2*R) where R is the radius of curvature of the Roche potential surface, so don't be too
/// picky. 1.e-4 would be more than good enough in most cases.
/// * `earth`: vector pointing towards earth
/// * `p`: point of interest
///
/// Returns:
///
/// * true if minimum potential is below the potential at stellar surface
///