Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • wenxuan.jia/pygwinc
  • sean-leavey/pygwinc
  • sebastian.steinlechner/pygwinc
  • nicholas.demos/pygwinc
  • chris.whittle/pygwinc
  • raymond.robie/pygwinc
  • mateusz.bawaj/pygwinc
  • anchal.gupta/pygwinc
  • 40m/pygwinc
  • evan.hall/pygwinc
  • kevin.kuns/pygwinc
  • geoffrey-lovelace/pygwinc
  • brittany.kamai/pygwinc
  • daniel-brown/pygwinc
  • lee-mcculler/pygwinc
  • jameson.rollins/pygwinc
  • gwinc/pygwinc
17 results
Show changes
Commits on Source (2)
......@@ -252,7 +252,8 @@ class Budget(Noise):
# initialize all noise objects
for nc in self.noises:
name = self.__init_noise(nc, noises)
self._budget_noises.add(name)
if name:
self._budget_noises.add(name)
# initialize common calibrations and add to all budget noises
for cal in self.calibrations:
self.__add_calibration(cal, self._budget_noises)
......@@ -270,25 +271,21 @@ class Budget(Noise):
cal = None
if isinstance(nc, (list, tuple)):
noise = nc[0]
cals = nc[1]
cals = nc[1:]
else:
noise = nc
cals = []
if noise_filt and noise not in noise_filt:
return
name = self.__add_noise(noise)
for cal in cals:
self.__add_calibration(cal, [noise])
return name
def __add_noise(self, noise):
noise_obj = noise(
*self.args,
**self.kwargs
)
name = noise_obj.name
if noise_filt and name not in noise_filt:
return
logging.debug("init {}".format(noise_obj))
self._noise_objs[name] = noise_obj
for cal in cals:
self.__add_calibration(cal, [name])
return name
def __add_calibration(self, cal, noises):
......