docstr: Test align with images of different sizes
  
  regression test of img-1300
docstr_tok: ["Test","align","with","images","of","different","sizes","regression","test","of","img-1300"]
code: def test_06_02_different_sizes_pad(self):
      """Test align with images of different sizes
  
      regression test of img-1300
      """
      np.random.seed(612)
      shape = (61, 43)
      i, j = np.mgrid[0 : shape[0], 0 : shape[1]]
      image1 = np.random.randint(0, 10, size=shape).astype(float) / 10.0
      image1[
          np.sqrt(((i - shape[0] / 2) ** 2 + (j - shape[1] / 2) ** 2))
          < 20
      ] = 0.5
      image2 = image1[2:-2, 2:-2]
      workspace, module = self.make_workspace(
          (image1, image2), (None, None)
      )
      assert isinstance(module, Align)
      module.crop_mode.value = C_PAD
      module.run(workspace)
      i1 = workspace.image_set.get_image("Aligned0")
      assert isinstance(i1, Image)
      p1 = i1.pixel_data
      i2 = workspace.image_set.get_image("Aligned1")
      p2 = i2.pixel_data
      assert tuple(p1.shape) == tuple(p2.shape)
      assert np.all(p1[2:-2, 2:-2] == p2[2:-2, 2:-2])
      assert not i1.has_mask
      mask = np.zeros(shape, bool)
      mask[2:-2, 2:-2] = True
      assert i2.has_mask
      assert np.all(mask == i2.mask)
  
imports: from io import StringIO
  import numpy
  from cellprofiler_core.constants.measurement import COLTYPE_INTEGER
  from cellprofiler_core.measurement import Measurements
  from cellprofiler_core.modules.align import Align, A_SIMILARLY, A_SEPARATELY, M_MUTUAL_INFORMATION, C_SAME_SIZE, C_CROP, C_PAD, M_CROSS_CORRELATION, MEASUREMENT_FORMAT, C_ALIGN
  from cellprofiler_core.object import ObjectSet
  from cellprofiler_core.pipeline import Pipeline, LoadException
  from cellprofiler_core.preferences import set_headless
  from cellprofiler_core.workspace import Workspace
  from tests.core.modules import read_example_image
  from cellprofiler_core.image import ImageSetList, Image
label_desc: Use image node_id 20 for calling the TestAlign obj's underlying member method code with example usage: obj.test_06_02_different_sizes_pad() without return types