Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
b=None,
duration=None,
ecc=None,
omega=None,
Omega=None,
m_planet=0.0,
m_star=None,
r_star=None,
rho_star=None,
m_planet_units=None,
rho_star_units=None,
model=None,
contact_points_kwargs=None,
**kwargs
):
add_citations_to_model(self.__citations__, model=model)
self.kepler_op = KeplerOp(**kwargs)
# Parameters
if m_planet_units is not None:
warnings.warn(
"The `m_planet_units` argument has been deprecated. "
"Use `with_unit` instead.",
DeprecationWarning,
)
m_planet = with_unit(m_planet, m_planet_units)
if rho_star_units is not None:
warnings.warn(
"The `rho_star_units` argument has been deprecated. "
"Use `with_unit` instead.",
DeprecationWarning,
def __init__(self, u, model=None):
add_citations_to_model(self.__citations__, model=model)
self.u = tt.as_tensor_variable(u)
u_ext = tt.concatenate([-1 + tt.zeros(1, dtype=self.u.dtype), self.u])
self.c = get_cl(u_ext)
self.c_norm = self.c / (np.pi * (self.c[0] + 2 * self.c[1] / 3))
def __init__(self, *args, **kwargs):
add_citations_to_model(self.__citations__, kwargs.get("model", None))
# Make sure that the shape is compatible
shape = kwargs.get("shape", 2)
try:
if list(shape)[0] != 2:
raise ValueError("the first dimension should be exactly 2")
except TypeError:
if shape != 2:
raise ValueError("the first dimension should be exactly 2")
self.min_radius = kwargs.pop("min_radius", 0)
self.max_radius = kwargs.pop("max_radius", 1)
transform = tr.radius_impact(self.min_radius, self.max_radius)
kwargs["shape"] = shape
kwargs["transform"] = transform