Standardize the variables within a range [-1.0 and 1.0]

        This replaces the local copies of this data. When it's time to
        scale back, use destandardize from the datasource for that.

def standardize(self):
        """Standardize the variables within a range [-1.0 and 1.0]

        This replaces the local copies of this data. When it's time to
        scale back, use destandardize from the datasource for that.

        """


        nonmissing = numpy.invert(self.missing)
        nmcount = numpy.sum(nonmissing)

        self.covariates = []
        self.phenotypes = []

        for idx in range(0, self.covar_count):
            x = self.datasource.covariate_data[idx]
            nonmissing = x != PhenoCovar.missing_encoding
            mx = numpy.mean(x[nonmissing])
            sx = numpy.std(x[nonmissing])
            self.covariates.append((x-mx)/sx)

        for idx in range(0, self.pheno_count):
            y = self.datasource.phenotype_data[idx]
            nonmissing = y != PhenoCovar.missing_encoding
            my = numpy.mean(y[nonmissing])
            sy = numpy.std(y[nonmissing])
            self.phenotypes.append((y-my)/sy)