def tilepair_file(render, stack_from_json):
    tile_pair_file = "pt_match_opts_tilepair.json"
    tile_pairs = render_json_template(example_env, 'pt_match_opts_tilepairs.json',
                                                                  owner=render.DEFAULT_OWNER,
                                                                  project=render.DEFAULT_PROJECT,
                                                                  stack=pt_match_input_stack)
    with open(tile_pair_file, 'w') as f:
        json.dump(tile_pairs, f, indent=4)
    
    yield tile_pair_file
Beispiel #2
0
def tilepair_file(render, stack_from_json, tmpdir_factory):
    output_dir = str(tmpdir_factory.mktemp('tpairdir'))
    tile_pair_file = os.path.join(output_dir, "pt_match_opts_tilepair.json")
    tile_pairs = render_json_template(example_env,
                                      'pt_match_opts_tilepairs.json',
                                      owner=render.DEFAULT_OWNER,
                                      project=render.DEFAULT_PROJECT,
                                      stack=pt_match_input_stack)
    with open(tile_pair_file, 'w') as f:
        json.dump(tile_pairs, f, indent=4)

    yield tile_pair_file
Beispiel #3
0
        "/allen/aibs/pipeline/image_processing/volume_assembly/render-jars/production/scripts",
        'memGB': '2G'
    },
    "reference_stack": "reference_stack",
    "moving_stack": "moving_stack",
    "output_stack": "output_stack",
    "match_collection": "rough_align_fixes",
    "regsitration_model": "Affine",
    "reference_z": 133,
    "moving_z": 133,
    "overwrite_output": True,
    "consolidate_transforms": True
}

REF_STACK_TSPECS = render_json_template(
    example_env,
    'rough_registration_ref_stack_tspecs.json',
    test_data_root=TEST_DATA_ROOT)

MOVING_STACK_TSPECS = render_json_template(
    example_env,
    'rough_registration_moving_stack_tspecs.json',
    test_data_root=TEST_DATA_ROOT)

POINT_MATCHES = render_json_template(example_env,
                                     'rough_registration_point_matches.json',
                                     test_data_root=TEST_DATA_ROOT)


@pytest.fixture(scope='module')
def render():
    render_params['project'] = 'rough_registration'
    },
    "url_options":{
        "normalizeForMatching": "true",
        "renderWithFilter": "true",
        "renderWithoutMask": "true"
    },
    "outputDirectory": "/allen/programs/celltypes/workgroups/em-connectomics/gayathrim/scratch/ptmatch",
    "tile_stack": "point_match_optimization_test",
    "stack": "em_2d_montage_apply_mipmaps",
    "tilepair_file": "/allen/programs/celltypes/workgroups/em-connectomics/gayathrim/scratch/17797_1R/tilepairs/temca4_tilepair_test.json",
    "filter_tilepairs":True,
    "no_tilepairs_to_test":4,
    "max_tilepairs_with_matches":4  
}  

POINT_MATCH_OPTS_INPUT_STACK_TS =  render_json_template(example_env, 'point_match_opts_tilespecs.json',
                                                        test_data_root=TEST_DATA_ROOT)


@pytest.fixture(scope='module')
def render():
    render_params['project'] = 'point_match_optimization'  
    render = renderapi.connect(**render_params)
    return render

@pytest.fixture(scope='module')
def stack_from_json():
    tilespecs = [renderapi.tilespec.TileSpec(json=d)
                    for d in POINT_MATCH_OPTS_INPUT_STACK_TS]
    return tilespecs

@pytest.fixture(scope='module')