def four_mbm_parse(four_mbm_parser): return parse(four_mbm_parser, ["--first-two-mbm1-lsq12-max-pairs=22", "--first-two-mbm2-lsq12-max-pairs", "23", "--last-two-mbm1-lsq12-max-pairs=24", "--last-two-mbm2-lsq12-max-pairs=25", "--first-two-mbm1-bootstrap", "--first-two-mbm2-bootstrap", "--last-two-mbm1-bootstrap", "--last-two-mbm2-bootstrap"])
def main(args): p = CompoundParser([ execution_parser, application_parser, registration_parser, AnnotatedParser(parser=mk_mbm_parser(), namespace="mbm") ]) options = parse(p, args[1:]) stages = asymmetry_pipeline(options).stages execute(stages, options)
def main(args): p = CompoundParser( [execution_parser, application_parser, registration_parser, AnnotatedParser(parser=mbm_parser, namespace="mbm")]) options = parse(p, args[1:]) stages = asymmetry_pipeline(options).stages execute(stages, options)
def main(args): # TODO rewrite using `mk_application` p = CompoundParser([ execution_parser, application_parser, registration_parser, tamarack_parser, AnnotatedParser(parser=mbm_parser, namespace="mbm") ]) options = parse(p, args[1:]) stages = tamarack_pipeline(options).stages execute(stages, options)
def main(args): # this is probably too much heavy machinery since the options aren't tree-shaped; could just use previous style p = CompoundParser( [execution_parser, application_parser, registration_parser, #cast=RegistrationConf), lsq12_parser]) options = parse(p, args[1:]) stages = LSQ12_pipeline(options).stages execute(stages, options)
def main(args): # TODO rewrite using `mk_application` p = CompoundParser( [execution_parser, application_parser, registration_parser, tamarack_parser, AnnotatedParser(parser=mbm_parser, namespace="mbm")]) options = parse(p, args[1:]) stages = tamarack_pipeline(options).stages execute(stages, options)
def main(args): # this is probably too much heavy machinery since the options aren't tree-shaped; could just use previous style p = CompoundParser([ execution_parser, application_parser, registration_parser, #cast=RegistrationConf), lsq12_parser ]) options = parse(p, args[1:]) stages = LSQ12_pipeline(options).stages execute(stages, options)
def main(args): p = CompoundParser( [execution_parser, application_parser, registration_parser, #twolevel_parser, AnnotatedParser(parser=mk_mbm_parser(with_common_space=False), namespace="mbm"), # TODO use this before 1st-/2nd-level args # TODO to combine the information from all three MBM parsers, # could use `ConfigArgParse`r `_source_to_settings` (others?) to check whether an option was defaulted # or user-specified, allowing the first/second-level options to override the general mbm settings #AnnotatedParser(parser=mbm_parser, namespace="first_level", prefix="first-level"), #AnnotatedParser(parser=mbm_parser, namespace="second_level", prefix="second-level"), #stats_parser #segmentation_parser ]) # TODO add more stats parsers? options = parse(p, args[1:]) execute(two_level_pipeline(options).stages, options)
def main(args): p = CompoundParser([ execution_parser, application_parser, registration_parser, #twolevel_parser, AnnotatedParser( parser=mk_mbm_parser(with_common_space=False), namespace="mbm"), # TODO use this before 1st-/2nd-level args # TODO to combine the information from all three MBM parsers, # could use `ConfigArgParse`r `_source_to_settings` (others?) to check whether an option was defaulted # or user-specified, allowing the first/second-level options to override the general mbm settings #AnnotatedParser(parser=mbm_parser, namespace="first_level", prefix="first-level"), #AnnotatedParser(parser=mbm_parser, namespace="second_level", prefix="second-level"), #stats_parser #segmentation_parser ]) # TODO add more stats parsers? options = parse(p, args[1:]) execute(two_level_pipeline(options).stages, options)
def f(): options = parse(p, sys.argv[1:]) execute(pipeline(options).stages, options)
def application_parse(two_mbm_parser): return parse(CompoundParser([application_parser, AnnotatedParser(parser=two_mbm_parser, prefix="two-mbms", namespace="two-mbms")]), ["--two-mbms-mbm1-bootstrap", "--two-mbms-mbm2-bootstrap", "--two-mbms-mbm1-lsq12-max-pairs", "23", "--two-mbms-mbm2-lsq12-max-pairs=24", "img_1.mnc"])
def two_mbm_parse(two_mbm_parser): return parse(two_mbm_parser, ["--mbm1-lsq12-max-pairs=22", "--mbm1-bootstrap", "--mbm2-bootstrap"])
p = CompoundParser( [execution_parser, application_parser, registration_parser, lsq6_parser, # TODO: either switch back to automatically unpacking as part of `parse` # or write a helper to do \ns: C(**vars(ns)) lsq12_parser, # should be MBM or build_model ... nlin_parser, #AnnotatedParser(parser=BaseParser(addLSQ12ArgumentGroup), namespace='lsq12-inter-subj'), #addNLINArgumentGroup, stats_parser, chain_parser]) # TODO could abstract and then parametrize by prefix/ns ?? options = parse(p, sys.argv[1:]) # TODO: the registration resolution should be set somewhat outside # of any actual function? Maybe the right time to set this, is here # when options are gathered? if not options.registration.resolution: # if the target for the registration_chain comes from the pride_of_models # we can not use the registration_targets() function. The pride_of_models # works in a fairly different way, so we will separate out that option. if options.lsq6.target_type == TargetType.pride_of_models: pride_of_models_mapping = get_pride_of_models_mapping(options.lsq6.target_file, options.application.output_directory, options.application.pipeline_name) # all initial models that are part of the pride of models must have # the same resolution (it's currently a requirement). So we can get the # resolution from any of the RegistrationTargets: