Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# -*- coding: utf-8 -*-
from __future__ import division, print_function
__all__ = ["LimbDarkRevOp"]
from theano import gof
import theano.tensor as tt
from .base_op import StarryBaseOp
class LimbDarkRevOp(StarryBaseOp):
__props__ = ()
func_file = "./limbdark_rev.cc"
func_name = "APPLY_SPECIFIC(limbdark_rev)"
def make_node(self, c, b, r, los, bf):
in_args = [
tt.as_tensor_variable(c),
tt.as_tensor_variable(b),
tt.as_tensor_variable(r),
tt.as_tensor_variable(los),
tt.as_tensor_variable(bf),
]
out_args = [in_args[0].type(), in_args[1].type(), in_args[2].type()]
return gof.Apply(self, in_args, out_args)
# -*- coding: utf-8 -*-
__all__ = ["GetClOp"]
import theano.tensor as tt
from theano import gof
from .base_op import StarryBaseOp
from .get_cl_rev import GetClRevOp
class GetClOp(StarryBaseOp):
__props__ = ()
func_file = "./get_cl.cc"
func_name = "APPLY_SPECIFIC(get_cl)"
num_input = 1
def __init__(self):
self.grad_op = GetClRevOp()
super(GetClOp, self).__init__()
def make_node(self, arg):
return gof.Apply(self, [tt.as_tensor_variable(arg)], [arg.type()])
def infer_shape(self, node, shapes):
return (shapes[0],)
# -*- coding: utf-8 -*-
__all__ = ["GetClRevOp"]
import theano.tensor as tt
from theano import gof
from .base_op import StarryBaseOp
class GetClRevOp(StarryBaseOp):
__props__ = ()
func_file = "./get_cl_rev.cc"
func_name = "APPLY_SPECIFIC(get_cl_rev)"
def make_node(self, bc):
return gof.Apply(self, [tt.as_tensor_variable(bc)], [bc.type()])
def infer_shape(self, node, shapes):
return (shapes[0],)
def __init__(self):
super(StarryBaseOp, self).__init__(self.func_file, self.func_name)
# -*- coding: utf-8 -*-
__all__ = ["LimbDarkOp"]
import theano
from theano import gof
import theano.tensor as tt
from .base_op import StarryBaseOp
class LimbDarkOp(StarryBaseOp):
__props__ = ()
func_file = "./limbdark.cc"
func_name = "APPLY_SPECIFIC(limbdark)"
def make_node(self, c, b, r, los):
in_args = []
dtype = theano.config.floatX
for a in [c, b, r, los]:
try:
a = tt.as_tensor_variable(a)
except tt.AsTensorError:
pass
else:
dtype = theano.scalar.upcast(dtype, a.dtype)
in_args.append(a)
# -*- coding: utf-8 -*-
__all__ = ["IntegratedLimbDarkOp"]
import theano
import theano.tensor as tt
from theano import gof
from .base_op import StarryBaseOp
class IntegratedLimbDarkOp(StarryBaseOp):
params_type = gof.ParamsType(
tol=theano.scalar.float64,
min_depth=theano.scalar.int32,
max_depth=theano.scalar.int32,
Nc=theano.scalar.int32,
circular=theano.scalar.bool,
)
__props__ = ()
func_file = "./integrated_limbdark.cc"
func_name = "APPLY_SPECIFIC(integrated_limbdark)"
def __init__(
self,
tol=1e-5,