def make_analysis(self, data, results=None, mask=None, positions=None):
mask = setup_phase_mask(data=data, mask=mask, mask_function=self.mask_function,<EOL>inner_mask_radii=self.inner_mask_radii)<EOL>if self.positions_threshold is not None and positions is not None:<EOL><INDENT>positions = list(map(lambda position_set: np.asarray(position_set), positions))<EOL><DEDENT>elif self.positions_threshold is None:<EOL><INDENT>positions = None<EOL><DEDENT>elif self.positions_threshold is not None and positions is None:<EOL><INDENT>raise exc.PhaseException('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>lens_data = li.LensData(ccd_data=data, mask=mask, sub_grid_size=self.sub_grid_size,<EOL>image_psf_shape=self.image_psf_shape, positions=positions,<EOL>interp_pixel_scale=self.interp_pixel_scale)<EOL>modified_image = self.modify_image(image=lens_data.image, results=results)<EOL>lens_data = lens_data.new_lens_data_with_modified_image(modified_image=modified_image)<EOL>if self.bin_up_factor is not None:<EOL><INDENT>lens_data = lens_data.new_lens_data_with_binned_up_ccd_data_and_mask(bin_up_factor=self.bin_up_factor)<EOL><DEDENT>self.pass_priors(results)<EOL>self.output_phase_info()<EOL>analysis = self.__class__.Analysis(lens_data=lens_data, cosmology=self.cosmology,<EOL>positions_threshold=self.positions_threshold, results=results)<EOL>return analysis<EOL>
Create an lens object. Also calls the prior passing and lens_data modifying functions to allow child
classes to change the behaviour of the phase.

Parameters
----------
positions
mask: Mask
    The default masks passed in by the pipeline
data: im.CCD
    An lens_data that has been masked
results: autofit.tools.pipeline.ResultsCollection
    The result from the previous phase

Returns
-------
lens : Analysis
    An lens object that the non-linear optimizer calls to determine the fit of a set of values