Skip to content

Commit

Permalink
Fix typo in Karcher batch function
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcieslak committed Jun 13, 2018
1 parent ede4aa3 commit 2b7c6c6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions meap/batch_warp_dzdt.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ def process_physio_file((physio_file, output_file, srvf_lambda, srvf_max_karcher
reg.n_modes = n_modes
reg.detect_modes()

reg.physiodata.save(output_path)
abs_out = os.path.abspath(output_file)
reg.physiodata.save(abs_out)

# produces 2 files
return os.path.abspath(output_path)
logger.info("saved %s", abs_out)
return os.path.abspath(abs_out)


class FileToProcess(HasTraits):
Expand Down Expand Up @@ -148,7 +150,9 @@ def _input_directory_changed(self):

# Check if the output already exists
def make_output_file(input_file):
return input_file[:-len(".mea.mat")] + self.file_suffix
suffix = os.path.split(os.path.abspath(input_file))[1]
suffix = suffix[:-len(".mea.mat")] + self.file_suffix
return self.output_directory + "/" + suffix

self.files = [
FileToProcess(input_file = f, output_file=make_output_file(f)) \
Expand Down Expand Up @@ -182,6 +186,7 @@ def _b_run_fired(self):
Item("dzdt_num_inputs_to_group_warping",
label="Template uses N beats"),
Item("srvf_max_karcher_iterations", label="Max Iterations"),
Item("n_modes"), Item("srvf_t_min"), Item("srvf_t_max"),
Item("num_cores"),
Item("b_run", show_label=False)

Expand Down

0 comments on commit 2b7c6c6

Please sign in to comment.