@@ -79,6 +79,8 @@ def transitplot(time,flux,sol,nplanetplot=1, itime=-1, ntt=0, tobs=0, omc=0, dty
7979 sol2 [nc + 3 ]= 0.0 #rdrs
8080 tmodel = zeros (len (time )) #contains the transit model
8181 tfit5 .transitmodel (nplanet ,sol2 ,time ,itime ,nttin ,tobsin ,omcin ,tmodel ,dtypein )
82+ stdev = np .std (flux - tmodel )
83+ #print(stdev)
8284
8385 #make a model with only the other transits to subtract
8486 nc = 8 + 10 * (nplanetplot - 1 )
@@ -131,14 +133,16 @@ def transitplot(time,flux,sol,nplanetplot=1, itime=-1, ntt=0, tobs=0, omc=0, dty
131133 plt .xlabel ('Phase (hours)' ) #x-label
132134 plt .ylabel ('Relative Flux' ) #y-label
133135 x1 ,x2 ,y1 ,y2 = plt .axis () #get range of plot
134- ymin = min (fplot [i1 :i2 ])
135- ymax = max (fplot [i1 :i2 ])
136- y1 = ymin - 0.1 * (ymax - ymin )
137- y2 = ymax + 0.1 * (ymax - ymin )
136+ ymin = min (fluxsort [i1 :i2 ])
137+ ymax = max (fluxsort [i1 :i2 ])
138+ y1 = ymin - 0.1 * (ymax - ymin )- 2.0 * stdev
139+ y2 = ymax + 0.1 * (ymax - ymin )+ 2.0 * stdev
138140 plt .axis ((- tdur ,tdur ,y1 ,y2 )) #readjust range
139141 plt .show () #show the plot
140142
141143 return ;
144+
145+ return ;
142146
143147
144148def transitmodel (sol ,time , itime = - 1 , ntt = 0 , tobs = 0 , omc = 0 , dtype = 0 ):
0 commit comments