def calc_fluxes(self, min_flux = <NUM_LIT>, outlier_iterations=<NUM_LIT:5>,<EOL>max_outlier_obs=<NUM_LIT:4>, outlier_limit=<NUM_LIT>):
jj, ii = self.center<EOL>numer = np.zeros(len(self.times))<EOL>denom = np.zeros(len(self.times))<EOL>factr = np.zeros(len(self.times))<EOL>numer_pix = self.postcard[:,self.targets == <NUM_LIT:1>]<EOL>numer = np.sum(numer_pix, axis=<NUM_LIT:1>)<EOL>tar_vals = np.zeros((len(self.times), int(np.max(self.targets)+<NUM_LIT:1>-<NUM_LIT:2>-self.ignore_bright)))<EOL>for i in range(<NUM_LIT:2>+self.ignore_bright,int(np.max(self.targets)+<NUM_LIT:1>)):<EOL><INDENT>tval = np.sum(self.postcard[:,self.targets == i], axis=<NUM_LIT:1>)<EOL>tar_vals[:,i-<NUM_LIT:2>-self.ignore_bright] = tval <EOL><DEDENT>for i in range(len(self.obs_filenames)):<EOL><INDENT>if np.max(tar_vals[i]) < min_flux:<EOL><INDENT>tar_vals[self.qs == self.qs[i]] = <NUM_LIT:0.0><EOL><DEDENT><DEDENT>all_tar = np.zeros((len(self.times), int(np.max(self.targets)-self.ignore_bright)))<EOL>all_tar[:,<NUM_LIT:0>] = numer<EOL>all_tar[:,<NUM_LIT:1>:] = tar_vals<EOL>self.photometry_array = all_tar<EOL>for i in range(len(tar_vals[<NUM_LIT:0>])):<EOL><INDENT>for j in range(<NUM_LIT:4>):<EOL><INDENT>g = np.where(self.qs == j)[<NUM_LIT:0>]  <EOL>tar_vals[g,i] /= (np.median(tar_vals[g,i])+<NUM_LIT>)<EOL><DEDENT><DEDENT>tar_vals_old = tar_vals + <NUM_LIT:0.0><EOL>for i in range(outlier_iterations):<EOL><INDENT>nonzeros = np.where(tar_vals[<NUM_LIT:0>,:] != <NUM_LIT:0>)[<NUM_LIT:0>]<EOL>med = np.median(tar_vals[:,nonzeros], axis=<NUM_LIT:1>)<EOL>std = np.std(tar_vals[:,nonzeros], axis=<NUM_LIT:1>)<EOL>if np.sum(tar_vals) != <NUM_LIT:0.0>:<EOL><INDENT>tar_vals_old = tar_vals + <NUM_LIT:0.0><EOL><DEDENT>for k in range(len(tar_vals[<NUM_LIT:0>])):<EOL><INDENT>h = np.where((np.abs(med-tar_vals[:,k])/std) > outlier_limit)[<NUM_LIT:0>]<EOL>if len(h) >= max_outlier_obs:<EOL><INDENT>tar_vals[:,k] = <NUM_LIT:0><EOL><DEDENT><DEDENT><DEDENT>if np.sum(tar_vals) == <NUM_LIT:0.0>:<EOL><INDENT>tar_vals = tar_vals_old + <NUM_LIT:0.0><EOL><DEDENT>denom = np.sum(tar_vals, axis=<NUM_LIT:1>)<EOL>self.target_flux_pixels = numer_pix<EOL>self.reference_flux = denom<EOL>
Determine the suitable reference stars, and then the total flux in those stars and 
in the target star in each epoch

Args: 
    min_flux: The size of the region around the target star to be plotted. Images will be a square 
        with side length ``image_region`` (default: ``5000``)
    outlier_iterations: The number of iterations to remove outliers from the reference star sample
        (stars at epochs with more than ``max_outlier_obs`` observations more than ``outlier_limit`` standard
        deviations from the median value for all stars after normalization) (default: ``5``)
    max_outlier_obs: The maximum number of epochs at which a star is allowed to be more than ``outlier_limit``
        standard deviations from the median value for all stars before it is removed as a suitable
        reference star (default: ``4``)
    outlier_limit: The level of deviation (measured in standard deviations) which a target is allowed
        to be discrepant from the median. If it is this discrepant at more than ``max_outlier_obs``
        epochs, it is removed from consideration (default: ``1.7``)