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_01_different_sizes_crop(self):
      """Test align with images of different sizes
  
      regression test of img-1300
      """
      np.random.seed(61)
      shape = (61, 43)
      for method in (M_CROSS_CORRELATION, M_MUTUAL_INFORMATION):
          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]
          for order, i1_name, i2_name in (
              ((image1, image2), "Aligned0", "Aligned1"),
              ((image2, image1), "Aligned1", "Aligned0"),
          ):
              workspace, module = self.make_workspace(
                  order, (None, None)
              )
              assert isinstance(module, Align)
              module.alignment_method.value = method
              module.crop_mode.value = C_CROP
              module.run(workspace)
              i1 = workspace.image_set.get_image(i1_name)
              assert isinstance(i1, Image)
              p1 = i1.pixel_data
              i2 = workspace.image_set.get_image(i2_name)
              p2 = i2.pixel_data
              assert tuple(p1.shape) == tuple(p2.shape)
              assert np.all(p1 == p2)
              assert i1.has_crop_mask
              crop_mask = np.zeros(shape, bool)
              crop_mask[2:-2, 2:-2] = True
              assert np.all(i1.crop_mask == crop_mask)
              assert not i2.has_crop_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 19 for calling the TestAlign obj's underlying member method code with example usage: obj.test_06_01_different_sizes_crop() without return types