Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. # LAT light curve fit
  2.  
  3. one = LATLike(...)
  4. two = LATLike(...)
  5. three = LATLike(...)
  6.  
  7. data = DataList(one, two, three)
  8.  
  9. model = Model(...)
  10.  
  11. # Set auxiliary variable for at least one parameter
  12. time = AuxiliaryVariable(..)
  13. model.link(...)
  14.  
  15. one.tag(time, 1.5)
  16. two.tag(time, 10.7)
  17. three.tag(time, 1234.5)
  18.  
  19. datas = []
  20.  
  21. for det in ['n0','n1','n2']:
  22.  
  23. for interval in intervals:
  24.  
  25. this_plugin = GBMLike(...)
  26.  
  27. datas.append(this_plugin)
  28.  
  29. data = DataList(*datas)
  30.  
  31. @decorators...
  32. def tag_decorator():
  33.  
  34. if self._tags:
  35.  
  36. for tag, value in self._tags:
  37.  
  38. tag.value = value
  39.  
  40. yield
  41.  
  42. def tag(self, aux_variable, value):
  43.  
  44. # self._tags is set to [] in the __init__ of the mother class
  45.  
  46. self._tags.append((aux_variable, value))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement