Exemple #1
0
def test_move_1(populated_macrophage: MacrophageCellList,
                grid: RectangularGrid, cyto, tissue, fungus_list):
    rec_r = 10

    cell = populated_macrophage[0]
    vox = grid.get_voxel(cell['point'])
    assert vox.z == 3 and vox.y == 3 and vox.x == 3

    assert cyto.all() == 0
    cyto[4, 3, 3] = 10

    populated_macrophage.move(rec_r, grid, cyto, tissue, fungus_list)

    vox = grid.get_voxel(cell['point'])
    assert vox.z == 4 and vox.y == 3 and vox.x == 3
Exemple #2
0
def test_internalize_and_move(
    macrophage_list: MacrophageCellList,
    grid: RectangularGrid,
    fungus_list: FungusCellList,
    cyto,
    tissue,
):
    point = Point(x=35, y=35, z=35)
    macrophage_list.append(MacrophageCellData.create_cell(point=point))

    fungus_list.append(
        FungusCellData.create_cell(point=point,
                                   status=FungusCellData.Status.RESTING))
    fungus_list.append(
        FungusCellData.create_cell(point=point,
                                   status=FungusCellData.Status.RESTING))

    macrophage_list.internalize_conidia(1, 50, 1, grid, fungus_list)

    assert fungus_list.cell_data['internalized'][0]
    assert fungus_list.cell_data['internalized'][1]
    assert macrophage_list.len_phagosome(0) == 2

    rec_r = 10

    cell = macrophage_list[0]
    vox = grid.get_voxel(cell['point'])
    assert vox.z == 3 and vox.y == 3 and vox.x == 3

    assert cyto.all() == 0
    cyto[4, 3, 3] = 10

    macrophage_list.move(rec_r, grid, cyto, tissue, fungus_list)

    vox = grid.get_voxel(cell['point'])
    assert vox.z == 4 and vox.y == 3 and vox.x == 3

    for f in fungus_list:
        vox = grid.get_voxel(f['point'])
        assert vox.z == 4 and vox.y == 3 and vox.x == 3