Skip to content

Instantly share code, notes, and snippets.

@giacomov
Last active December 7, 2016 20:01
Show Gist options
  • Save giacomov/f4171956203e38bcd5c1f185b3378db3 to your computer and use it in GitHub Desktop.
Save giacomov/f4171956203e38bcd5c1f185b3378db3 to your computer and use it in GitHub Desktop.
# LAT light curve fit
one = LATLike(...)
two = LATLike(...)
three = LATLike(...)
data = DataList(one, two, three)
model = Model(...)
# Set auxiliary variable for at least one parameter
time = AuxiliaryVariable(..)
model.link(...)
one.tag(time, 1.5)
two.tag(time, 10.7)
three.tag(time, 1234.5)
datas = []
for det in ['n0','n1','n2']:
for interval in intervals:
this_plugin = GBMLike(...)
datas.append(this_plugin)
data = DataList(*datas)
@decorators...
def tag_decorator():
if self._tags:
for tag, value in self._tags:
tag.value = value
yield
def tag(self, aux_variable, value):
# self._tags is set to [] in the __init__ of the mother class
self._tags.append((aux_variable, value))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment