Exemplo n.º 1
0
 def _init_p_orbit(self):
     """Orbit parameter initialisation.
     """
     porbit = [
         GParameter('tc',  'zero epoch',       'd',      NP(0.0,  0.1), (-inf, inf)),
         GParameter('p',   'period',           'd',      NP(1.0, 1e-5), (0,    inf)),
         GParameter('rho', 'stellar density',  'g/cm^3', UP(0.1, 25.0), (0,    inf)),
         GParameter('g',   'grazing parameter', 'R_s',   UP(0.0,  1.0), (0,      1))]
     self.ps.add_global_block('orbit', porbit)
Exemplo n.º 2
0
    def _init_p_rv(self):
        self.ps.thaw()
        ps = self.ps
        prv = [
            GParameter(f'rv_shift_{self.rvis[i]}',
                       f'systemic velocity {self.rvis[i]}', 'm/s',
                       NP(0.0, 0.1), (-inf, inf))
            for i in range(len(self.times))
        ]
        ps.add_global_block('rv_shifts', prv)
        self._start_rvs = ps.blocks[-1].start
        self._sl_rvs = ps.blocks[-1].slice

        prv = [
            GParameter(f'rv_err_{self.rvis[i]}', 'additional rv error', 'm/s',
                       UP(0.0, 1.0), (-inf, inf))
            for i in range(len(self.times))
        ]
        ps.add_global_block('rv_errors', prv)
        self._start_rv_err = ps.blocks[-1].start
        self._sl_rv_err = ps.blocks[-1].slice

        prv = []
        for i in range(1, self.nplanets + 1):
            prv.append(
                GParameter(f'rv_k_{i}', f'rv semiamplitude {i}', 'm/s',
                           UP(0.0, 1.0), (0, inf)))
        ps.add_global_block('rv_semiamplitudes', prv)
        self._start_rvk = ps.blocks[-1].start
        self._sl_rvk = ps.blocks[-1].slice

        psl = [
            GParameter('rv_slope', 'linear rv slope', 'm/s', NP(0.0, 1.0),
                       (-inf, inf))
        ]
        ps.add_global_block('rv_slope', psl)
        self._start_rv_slope = ps.blocks[-1].start
        self._sl_rv_slope = ps.blocks[-1].slice
        self.ps.freeze()

        pnames = "rv_k_{} tc_{} p_{} secw_{} sesw_{}".split()
        self.pids = zeros((self.nplanets, 5), 'int')
        for ipl in range(self.nplanets):
            for ip, p in enumerate(pnames):
                name = p.format(ipl + 1)
                self.pids[ipl, ip] = self.ps.names.index(name)
Exemplo n.º 3
0
 def _init_parameters(self):
     self.ps = ps = ParameterSet([])
     pp = []
     for i in range(1, self.nplanets + 1):
         pp.extend([
             GParameter(f'tc_{i}', f'zero epoch {i}', 'd', NP(0.0, 0.1),
                        (-inf, inf)),
             GParameter(f'p_{i}', f'period {i}', 'd', NP(1.0, 1e-5),
                        (0, inf)),
             GParameter(f'secw_{i}', f'sqrt(e) cos(w) {i}', '',
                        UP(-1.0, 1.0), (-1, 1)),
             GParameter(f'sesw_{i}', f'sqrt(e) sin(w) {i}', '',
                        UP(-1.0, 1.0), (-1, 1)),
         ])
     ps.add_global_block('planets', pp)
     self._start_pl = ps.blocks[-1].start
     self._sl_pl = ps.blocks[-1].slice
Exemplo n.º 4
0
 def _init_p_orbit(self):
     """Orbit parameter initialisation.
     """
     porbit = [
         GParameter('rho', 'stellar_density', 'g/cm^3', UP(0.1, 25.0),
                    (0, inf))
     ]
     self.ps.add_global_block('orbit', porbit)
Exemplo n.º 5
0
 def _init_p_planet(self):
     ps = self.ps
     pp = [
         GParameter('ctess', 'tess_contamination', '', UP(0.0, 0.99),
                    (0, 1))
     ]
     for i in range(1, self.nplanets + 1):
         pp.extend([
             GParameter(f'tc_{i}', f'zero_epoch_{i}', 'd', NP(0.0, 0.1),
                        (-inf, inf)),
             GParameter(f'p_{i}', f'period_{i}', 'd', NP(1.0, 1e-5),
                        (0, inf)),
             GParameter(f'b_{i}', f'impact_parameter_{i}', 'R_s',
                        UP(0.0, 1.0), (0, inf)),
             GParameter(f'k2_true_{i}', f'true_area_ratio_{i}', 'A_s',
                        UP(0.02**2, 0.1**2), (0.02**2, 0.1**2))
         ])
     ps.add_global_block('planets', pp)
     self._start_pl = ps.blocks[-1].start
     self._sl_pl = ps.blocks[-1].slice
Exemplo n.º 6
0
 def _init_parameters(self):
     self.ps = ParameterSet()
     ppc = [
         GParameter('ab', 'Bond albedo', '', UP(0, 1), (0, 1)),
         GParameter('mp', 'log10 planet mass', 'MJup',
                    UP(log10(0.1), log10(300)), (0, inf)),
         GParameter('ms', 'Star mass', 'MSun', NP(1.0, 0.1), (0, inf)),
         GParameter('teffh', 'Host effective temperature', '',
                    UP(2000, 10000), (0, inf)),
         GParameter('teffc', 'Companion effective temperature', '',
                    UP(500, 10000), (0, inf)),
         GParameter('bl', 'Baseline level', '', NP(1, 0.005), (0, inf))
     ]
     self.ps.add_global_block('phase_curve', ppc)
     self.ps.freeze()