def test_sphere_estimate_argument_parse_vonmises(self): argv_str = """{0} {1} -fod {2} -lld {3} -sc 1 -si 50 -sw 20 -ff""".format( self.__output, self.__input[0], self.__output_fit, self.__output_ll) argv = argv_str.split() args = sphere_estimate.argument_parse(argv) args_answer = { "output_dest": self.__output, "depth_file_path": [self.__input[0]], "fod": self.__output_fit, "lld": self.__output_ll, "m": "vonmises", "M": "sampling", "nmix": 1, "si": 50, "sw": 20, "sc": 1, "st": 1, "ss": 1234, "ff": True, "p": None, "ll": False, "j": -1, "om": "LBFGS", "sh": 5 } self.assertDictEqual(args, args_answer)
def test_sphere_estimate_argument_parse_wrappedcauchy(self): argv_str = """{0} {1} -m wrappedcauchy""".format( self.__output, self.__input[0]) argv = argv_str.split() args = sphere_estimate.argument_parse(argv) args_answer = { "output_dest": self.__output, "depth_file_path": [self.__input[0]], "fod": None, "lld": None, "m": "wrappedcauchy", "M": "sampling", "nmix": 1, "si": 3000, "sw": 1000, "sc": 1, "st": 1, "ss": 1234, "ff": False, "p": None, "ll": False, "j": -1, "om": "LBFGS", "sh": 5 } self.assertDictEqual(args, args_answer)
def test_sphere_estimate_command_sampling_elc_single(self): argv_str = """{0} {1} -m explinearcardioid -sc 1 -si 30 -sw 20 -ff""".format(self.__output, self.__input[0], self.__output_fit, self.__output_ll) argv = argv_str.split() args = sphere_estimate.argument_parse(argv) sphere_estimate.main(args, SphereEstimateTest.logger)
def test_sphere_estimate_command_optimizing_vm_single_mix_upper(self): argv_str = """{0} {1} -M optimizing -m vonmises -nmix 2 -ff""".format( self.__output, self.__input_mix_upper[0], ) argv = argv_str.split() args = sphere_estimate.argument_parse(argv) sphere_estimate.main(args, SphereEstimateTest.logger)
def test_sphere_estimate_command_optimizing_wc_single_upper(self): argv_str = """{0} {1} -M optimizing -m wrappedcauchy -ff""".format( self.__output, self.__input_upper[0], ) argv = argv_str.split() args = sphere_estimate.argument_parse(argv) sphere_estimate.main(args, SphereEstimateTest.logger)
def test_sphere_estimate_command_optimizing_miaejp_single(self): argv_str = """{0} {1} -M optimizing -m miaejonespewsey -ff""".format( self.__output, self.__input[0], ) argv = argv_str.split() args = sphere_estimate.argument_parse(argv) sphere_estimate.main(args, SphereEstimateTest.logger)
def test_sphere_estimate_command_optimizing_miaevm_multiple(self): argv_str = """{0} {1} {2} -M optimizing -m miaevonmises -ff""".format( self.__output, self.__input[0], self.__input[1], ) argv = argv_str.split() args = sphere_estimate.argument_parse(argv) sphere_estimate.main(args, SphereEstimateTest.logger)
def test_sphere_estimate_command_optimizing_elc_single(self): argv_str = """{0} {1} -M optimizing -m explinearcardioid -ff""".format( self.__output, self.__input[0], ) argv = argv_str.split() args = sphere_estimate.argument_parse(argv) sphere_estimate.main(args, SphereEstimateTest.logger)
def test_sphere_mcplot_command_wc(self): model = "wrappedcauchy" # Generate input data argv_str = "{0} {1} -m {2} -si 50 -sw 10 -sc 1".format( self.__input_e, self.__input_d, model) argv = argv_str.split() args = sphere_estimate.argument_parse(argv) sphere_estimate.main(args, SphereMcplotTest.logger) # Visualize plot argv_str = "{0} {1} {2} 0 -m {3}".format(self.__output, self.__input_d, self.__input_e, model) argv = argv_str.split() args = sphere_mcplot.argument_parse(argv) sphere_mcplot.main(args, SphereMcplotTest.logger)
def test_sphere_mcplot_command_invmiaevm_opt(self): model = "invmiaevonmises" # Generate input data argv_str = "{0} {1} -m {2} -M optimizing -ff -nmix 2".format( self.__input_e, self.__input_ds, model) argv = argv_str.split() args = sphere_estimate.argument_parse(argv) sphere_estimate.main(args, SphereMcplotTest.logger) # Visualize plot argv_str = "{0} {1} {2} 0 -m {3} -M optimizing".format( self.__output, self.__input_ds, self.__input_e, model) argv = argv_str.split() args = sphere_mcplot.argument_parse(argv) sphere_mcplot.main(args, SphereMcplotTest.logger)
def test_sphere_estimate_command_sampling_vm_single_ll_lld(self): argv_str = """{0} {1} -lld {2} -sc 1 -si 30 -sw 20 -ff""".format( self.__output, self.__input[0], self.__output_ll) argv = argv_str.split() args = sphere_estimate.argument_parse(argv) sphere_estimate.main(args, SphereEstimateTest.logger)