def plot_system(spider_params,t,ax=False,min_temp=False,max_temp=False,temp_map=False,min_bright=0.2,use_phase=False,show_cax=True,mycmap=plt.cm.inferno,theme='white',show_axes=True): if theme == 'black': bg = 'black' tc = ("#04d9ff") else: bg = 'white' tc = 'black' if use_phase == True: t = spider_params.t0 + spider_params.per*t if ax == False: f, ax = plt.subplots(facecolor=bg) image = sp.get_star_png() star_r_pix = 180 star_offset_pix = 200 p_imrat = star_r_pix*spider_params.rp coords = sp.separation_of_centers(t,spider_params) planet_pix = [star_offset_pix - coords[0]*p_imrat,star_offset_pix - coords[1]*p_imrat] ax = sp.plot_planet(spider_params,t,ax=ax,min_temp=min_temp,max_temp=max_temp,temp_map=temp_map,min_bright=min_bright,scale_planet=p_imrat,planet_cen=planet_pix,mycmap=mycmap,show_cax=show_cax,theme=theme,show_axes=show_axes) if(abs(abs(spider_params.phase)-0.5) > 0.25): #in front s_zorder = 1 else: s_zorder = 3 im = ax.imshow(image,zorder=s_zorder) patch = patches.Circle((200, 200), radius=200, transform=ax.transData) im.set_clip_path(patch) ax.set_xlim(star_offset_pix+40*p_imrat,star_offset_pix+-40*p_imrat) ax.set_ylim(star_offset_pix+-10*p_imrat,star_offset_pix+10*p_imrat) ax.set(aspect=1) arrr = np.array([-1000,-500,0,500,1000]) arrr2 = np.array([-200,0,200]) ax.set_xticks(arrr+star_offset_pix) ax.set_xticklabels([round(x,3) for x in -1*arrr/(star_r_pix*spider_params.a/spider_params.a_abs)]) ax.set_yticks(arrr2+star_offset_pix) ax.set_yticklabels([round(x,3) for x in 1*arrr2/(star_r_pix*spider_params.a/spider_params.a_abs)]) ax.set_xlabel('Projected separation (AU)') return ax
def calc_substellar(self, t): self.calc_phase(t) coords = sp.separation_of_centers(t, self) substellar = _web.calc_substellar(self.phase, np.array(coords)) self.lambda0 = substellar[0] self.phi0 = substellar[1]
def calc_substellar(self,t): self.calc_phase(t) coords = sp.separation_of_centers(t,self) substellar = _web.calc_substellar(self.phase,np.array(coords)) self.lambda0 = substellar[0] self.phi0 = substellar[1]