def create_comparison_state(image, position, radius=<NUM_LIT>, snr=<NUM_LIT:20>,<EOL>method='<STR_LIT>', extrapad=<NUM_LIT:2>, zscale=<NUM_LIT:1.0>):
<EOL>image = common.pad(image, extrapad, <NUM_LIT:0>)<EOL>s = init.create_single_particle_state(imsize=np.array(image.shape), sigma=<NUM_LIT:1.0>/snr,<EOL>radius=radius, psfargs={'<STR_LIT>': np.array([<NUM_LIT>, <NUM_LIT:1.0>, <NUM_LIT>]), '<STR_LIT:error>': <NUM_LIT>, '<STR_LIT>': <NUM_LIT:2>},<EOL>objargs={'<STR_LIT>': method}, stateargs={'<STR_LIT>': False, '<STR_LIT>': <NUM_LIT:4>, '<STR_LIT>': zscale})<EOL>s.obj.pos[<NUM_LIT:0>] = position + s.pad + extrapad<EOL>s.reset()<EOL>s.model_to_true_image()<EOL>timage = <NUM_LIT:1>-np.pad(image, s.pad, mode='<STR_LIT>', constant_values=<NUM_LIT:0>)<EOL>timage = s.psf.execute(timage)<EOL>return s, timage[s.inner]<EOL>
Take a platonic image and position and create a state which we can
use to sample the error for peri. Also return the blurred platonic
image so we can vary the noise on it later