ClearAll["Global`*"]
lc={{0.005599829`,-0.024633333333333396`},{0.16799487`,-0.01863333333333339`},{0.33598974`,-0.014633333333333387`},{0.515184268`,-0.00663333333333338`},{0.705578454`,0.005366666666666575`},{0.890372811`,0.014366666666666583`},{1.058367681`,0.017366666666666586`},{1.259961525`,0.019366666666666588`},{1.45595554`,0.02336666666666659`},{1.6519495549999998`,0.019366666666666588`},{1.8199444249999999`,0.009366666666666579`},{2.010338611`,0.003366666666666629`},{2.228731942`,-0.013633333333333386`},{2.419126128`,-0.01763333333333339`},{2.603920485`,-0.022633333333333394`},{2.794314671`,-0.026633333333333398`},{2.979109028`,-0.015633333333333388`},{3.1639033849999993`,-0.013633333333333386`},{3.3542975709999996`,-0.0006333333333333746`},{3.516692612`,0.005366666666666575`},{3.723886285`,0.014366666666666583`},{3.9254801289999994`,0.02236666666666659`},{4.082275341`,0.02136666666666659`},{4.278269356`,0.02036666666666659`},{4.463063713`,0.013366666666666582`},{4.631058583`,0.005366666666666575`},{4.810253111`,-0.0006333333333333746`},{5.011846955`,-0.007633333333333381`},{5.196641312`,-0.013633333333333386`},{5.420634472`,-0.01763333333333339`}};​​error={0.0024`,0.0028`,0.0028`,0.0027`,0.0023`,0.0025`,0.0023`,0.002`,0.0022`,0.0022`,0.0032`,0.0022`,0.0025`,0.002`,0.0022`,0.0041`,0.0021`,0.0019`,0.002`,0.0021`,0.0029`,0.0026`,0.0023`,0.0022`,0.0022`,0.0028`,0.0029`,0.002`,0.0024`,0.0019`};
G=6.6743*
-11
10
;​​c=2.99792458*
8
10
;​​Periods=5.599829;​​P=Periods*86400;​​a=
3
2
P
*G*(m1+m2)
4*
2
π
​​μ=
m1m2
m1+m2
;​​aph=a(1+ecc);​​x0=
m2*aph
m1+m2
​​y0=0;​​X0=-
m1*aph
m1+m2
​​Y0=0;​​Vel1=
1/2
Gμ
a
m2
m1
1-ecc
1+ecc
(*initialvelocitystar1*)​​Vel2=-
1/2
Gμ
a
m2
m1
1-ecc
1+ecc
m1
m2
(*initialvelocitystar2*)​​​​​​system1=​​x1''[t]-
Gm1m2(x1[t]-x2[t])
m1
3/2
(
2
(x1[t]-x2[t])
+
2
(y1[t]-y2[t])
)
,​​y1''[t]-
Gm1m2(y1[t]-y2[t])
m1
3/2
(
2
(x1[t]-x2[t])
+
2
(y1[t]-y2[t])
)
,​​x2''[t]
Gm1m2(x1[t]-x2[t])
m2
3/2
(
2
(x1[t]-x2[t])
+
2
(y1[t]-y2[t])
)
,​​y2''[t]
Gm1m2(y1[t]-y2[t])
m2
3/2
(
2
(x1[t]-x2[t])
+
2
(y1[t]-y2[t])
)
;​​​​initials={​​x1[0]x0,​​x1'[0]0,​​y1[0]0,​​y1'[0]Vel1,​​x2[0]X0,​​x2'[0]0,​​y2[0]0,​​y2'[0]Vel2};​​​​{xbh1,ybh1,xbh2,ybh2}=ParametricNDSolve[{system1,initials},{x1,y1,x2,y2},{t,0,P},{m1,m2,ecc}]​​bh1={(xbh1[t*86400]/(1.5*10^11)),(ybh1[t*86400]/(1.5*10^11))};(*largerstarpositionvectors*)​​bh2={(xbh2[t*86400]/(1.5*10^11)),(ybh2[t*86400]/(1.5*10^11))};(*smallerstarpositionvectors*)
0.734189
1/3
(m1+m2)
0.734189(1+ecc)m2
2/3
(m1+m2)
-
0.734189(1+ecc)m1
2/3
(m1+m2)
9.53452×
-6
10
(1-ecc)
2
m2
(1+ecc)
4/3
(m1+m2)
-
9.53452×
-6
10
m1
(1-ecc)
2
m2
(1+ecc)
4/3
(m1+m2)
m2
x1ParametricFunction
Expression: x1
Parameters: {m1,m2,ecc}
,y1ParametricFunction
Expression: y1
Parameters: {m1,m2,ecc}
,x2ParametricFunction
Expression: x2
Parameters: {m1,m2,ecc}
,y2ParametricFunction
Expression: y2
Parameters: {m1,m2,ecc}

G=6.6743*
-11
10
;(*GravitationalConstant*)​​M=m1;(*MassofLensBH(kg)*)​​m=m2;(*MassofSourceBH(kg)*)​​Mt=M+m;(*TotalMassofSystem(kg)*)​​q=m/M;(*ratioofBHMasses*)​​c=2.99792458*
8
10
;(*speedoflight*)​​Periods=5.599829;​​P=Periods*86400;(*orbitalperiod(seconds)*)​​xp1=x1[m1,m2,ecc][t*86400]/.xbh1;​​yp1=y1[m1,m2,ecc][t*86400]/.ybh1;​​xp2=x2[m1,m2,ecc][t*86400]/.xbh2;​​yp2=y2[m1,m2,ecc][t*86400]/.ybh2;​​ω=5.3511795;​​t0=Periods/2;(*initialtime*)​​Γ=0.4​​g=0.4​​α=
0.15(15+Γ)(1+g)
3-Γ
​​sev=α
m1
m2
3
rstar(
2
(xp2-xp1)
+
2
(yp2-yp1)
)
Cos2
2π
P
*(t*86400)+π+ω+f
2
Sin
π
2
-ϕ
;
0.4
0.4
1.24385
myfit=NonlinearModelFitlc,{Re[0-2.5Log10[((1+(sev)))]],18(1.988*
30
10
)<m1<30(1.988*
30
10
),25(1.988*
30
10
)<m2<50(1.988*
30
10
)},{{m1,18(1.988*
30
10
)},{m2,25(1.988*
30
10
)},{rstar,22(6.957*
8
10
)},{ecc,0.01},{f,1.02},{ϕ,1.05}},{t},Weights
1
2
error
,ConfidenceLevel0.99,Tolerance10^-50,WorkingPrecision30;
NonlinearModelFit
:The precision of the data and model function (​MachinePrecision​) is less than the specified WorkingPrecision (​30​).
NonlinearModelFit
:The precision of the data and model function ​3.5784×
31
10
<m1,4.97×
31
10
<m2,m1<5.964×
31
10
,m2<9.94×
31
10
​ is less than the specified WorkingPrecision (​30.​).
NonlinearModelFit
:The algorithm does not converge to the tolerance of 1.×
-10
10
in 510 iterations. The best estimated solution, with feasibility residual, KKT residual, or complementary residual of {507570.,146.324,187999.}​, is returned.
myfit["ParameterTable"]
FittedModel
:The precision of the argument function (​MachinePrecision​) is less than WorkingPrecision (​30​).
FittedModel
:The property values {ParameterTable} assume an unconstrained model. The results for these properties may not be valid, particularly if the fitted parameters are near a constraint boundary.
Estimate
Standard Error
t-Statistic
P-Value
m1
3.87670651563555041752361258189×
31
10
0.
∞
0.×
-308
10
m2
5.59135729059654541981306731889×
31
10
1.08418×
29
10
515.724
4.69225×
-50
10
rstar
1.56770278262011852264404296875×
10
10
1.15165×
8
10
136.127
3.53758×
-36
10
ecc
0.0210608583698634124758974905944
0.0000372486
565.414
5.1603×
-51
10
f
1.02536816959499854640114335780
0.00816589
125.567
2.45014×
-35
10
ϕ
1.07319857179510536049349411769
0.00562497
190.792
1.07923×
-39
10