'Create 2 gaussian models and some data with noise.
Create a fitter for the two models keeping the amplitude parameter
common for the two models.'

def setup_class(self):

    self.g1 = models.Gaussian1D(10, mean=14.9, stddev=0.3)
    self.g2 = models.Gaussian1D(10, mean=13, stddev=0.4)
    self.jf = JointFitter([self.g1, self.g2], {self.g1: [u'amplitude'], self.g2: [u'amplitude']}, [9.8])
    self.x = np.arange(10, 20, 0.1)
    y1 = self.g1(self.x)
    y2 = self.g2(self.x)
    with NumpyRNGContext(_RANDOM_SEED):
        n = np.random.randn(100)
    self.ny1 = (y1 + (2 * n))
    self.ny2 = (y2 + (2 * n))
    self.jf(self.x, self.ny1, self.x, self.ny2)
