Пример #1
0
def lightcurve(t,spider_params,stellar_grid=False,logg=4.5,use_phase=False):

	if use_phase == True:
		t = spider_params.t0 + spider_params.per*t

	brightness_params = spider_params.format_bright_params()

	if spider_params.thermal == True:
		if stellar_grid == False:
			star_grid = sp.stellar_grid.gen_grid(spider_params.l1,spider_params.l2,logg=logg,response=spider_params.filter, stellar_model = spider_params.stellar_model)
			teffs = star_grid[0]
			totals = star_grid[1]
		else:
			teffs = stellar_grid[0]
			totals = stellar_grid[1]
	else:
		teffs = []
		totals = []

	if spider_params.filter != False:
		use_filter = 1
		filter = get_filter(spider_params.filter)
	else:
		use_filter = 0
		filter = [[],[]]

	n_wvls = len(filter[0])

	out = _web.lightcurve(spider_params.n_layers,t,spider_params.t0,spider_params.per,spider_params.a_abs,spider_params.inc,spider_params.ecc,spider_params.w,spider_params.a,spider_params.rp,spider_params.p_u1,spider_params.p_u2,spider_params.brightness_type,brightness_params,teffs,totals,len(totals), spider_params.eclipse, filter[0], filter[1], n_wvls,use_filter,copy.copy(spider_params.grid[0]),copy.copy(spider_params.grid[1]),copy.copy(spider_params.grid[2]))

	return np.array(out)
Пример #2
0
    def eclipse_depth(self,phase=0.5,stellar_grid=False):

        brightness_params = self.format_bright_params()

        if self.thermal == True:
            if stellar_grid == False:
                star_grid = sp.stellar_grid.gen_grid(self.l1,self.l2,logg=4.5,response=self.filter, stellar_model = self.stellar_model)
                teffs = star_grid[0]
                totals = star_grid[1]
            else:
                teffs = stellar_grid[0]
                totals = stellar_grid[1]
        else:
            teffs = []
            totals = []

        t = 0.0 + np.array([phase])

        if(self.inc == None):
            self.inc = 90.0

        if(self.p_u1 == None):
            self.p_u1 = 0.0

        if(self.p_u2 == None):
            self.p_u2 = 0.0

        if(self.a == None):
            self.a = 4.0

        if(self.w == None):
            self.w = 0.0

        if(self.ecc == None):
            self.ecc = 0.0


        if(self.a_abs == None):
            self.a_abs = 1.0

        if self.filter != False:
            use_filter = 1
            filter = get_filter(self.filter)
        else:
            use_filter = 0
            filter = [[],[]]

        n_wvls = len(filter[0])


        out = _web.lightcurve(self.n_layers,t,0.0,1.0,self.a_abs,self.inc,0.0,0.0,self.a,self.rp,self.p_u1,self.p_u2,self.brightness_type,brightness_params,teffs,totals,len(totals),0, filter[0], filter[1], n_wvls,use_filter,self.grid[0],self.grid[1],self.grid[2])[0] - _web.lightcurve(self.n_layers,t,0.0,1.0,self.a_abs,self.inc,0.0,0.0,self.a,self.rp,self.p_u1,self.p_u2,self.brightness_type,brightness_params,teffs,totals,len(totals),1, filter[0], filter[1], n_wvls,use_filter,self.grid[0],self.grid[1],self.grid[2])[0]

        return np.array(out)
Пример #3
0
def lightcurve(t,
               spider_params,
               stellar_grid=False,
               logg=4.5,
               use_phase=False):

    if use_phase == True:
        t = spider_params.t0 + spider_params.per * t

    brightness_params = spider_params.format_bright_params()

    if spider_params.thermal == True:
        if stellar_grid == False:
            star_grid = sp.stellar_grid.gen_grid(
                spider_params.l1,
                spider_params.l2,
                logg=logg,
                response=spider_params.filter,
                stellar_model=spider_params.stellar_model)
            teffs = star_grid[0]
            totals = star_grid[1]
        else:
            teffs = stellar_grid[0]
            totals = stellar_grid[1]
    else:
        teffs = []
        totals = []

    if spider_params.filter != False:
        use_filter = 1
        filter = get_filter(spider_params.filter)
    else:
        use_filter = 0
        filter = [[], []]

    n_wvls = len(filter[0])

    out = _web.lightcurve(spider_params.n_layers, t, spider_params.t0,
                          spider_params.per, spider_params.a_abs,
                          spider_params.inc, spider_params.ecc,
                          spider_params.w, spider_params.a, spider_params.rp,
                          spider_params.p_u1, spider_params.p_u2,
                          spider_params.brightness_type, brightness_params,
                          teffs, totals, len(totals), spider_params.eclipse,
                          filter[0], filter[1], n_wvls, use_filter,
                          copy.copy(spider_params.grid[0]),
                          copy.copy(spider_params.grid[1]),
                          copy.copy(spider_params.grid[2]))

    return np.array(out)
Пример #4
0
def lightcurve(t, spider_params, stellar_grid=False):

    brightness_params = spider_params.format_bright_params()

    if spider_params.thermal == True:
        if stellar_grid == False:
            star_grid = sp.stellar_grid.gen_grid(spider_params.l1,
                                                 spider_params.l2)
            teffs = star_grid[0]
            totals = star_grid[1]
        else:
            teffs = stellar_grid[0]
            totals = stellar_grid[1]
    else:
        teffs = []
        totals = []

    return _web.lightcurve(spider_params.n_layers, t, spider_params.t0,
                           spider_params.per, spider_params.a_abs,
                           spider_params.inc, spider_params.ecc,
                           spider_params.w, spider_params.a, spider_params.rp,
                           spider_params.p_u1, spider_params.p_u2,
                           spider_params.brightness_type, brightness_params,
                           teffs, totals, len(totals))
Пример #5
0
    def lightcurve(self, t, use_phase=False, stellar_grid=False):

        brightness_params = self.format_bright_params()

        if self.thermal == True:
            if stellar_grid == False:
                star_grid = sp.stellar_grid.gen_grid(self.l1, self.l2)
                teffs = star_grid[0]
                totals = star_grid[1]
            else:
                teffs = stellar_grid[0]
                totals = stellar_grid[1]
        else:
            teffs = []
            totals = []

        if use_phase == True:
            t = self.t0 + self.per * t

        out = _web.lightcurve(self.n_layers, t, self.t0, self.per, self.a_abs,
                              self.inc, self.ecc, self.w, self.a, self.rp,
                              self.p_u1, self.p_u2, self.brightness_type,
                              brightness_params, teffs, totals, len(totals))
        return np.array(out)