MATLAB-Community-Toolboxes-at-INCF / DeepInterpolation-MATLAB

A MATLAB implementation of the DeepInterpolation principle.
Other
6 stars 4 forks source link

Remove the pop-up for adding the cwd to the path #27

Closed jbentvelsen closed 1 year ago

jbentvelsen commented 1 year ago

Remove the pop-up for adding the current working directory to the path. Before that, in the live scripts the plain filenames need to be replaced by relative paths to the files.

jbentvelsen commented 1 year ago

Instead of using absolute links, use a setup function that adds the required folders to the path.

stevevanhooser commented 1 year ago

@jbentvelsen - Thanks for this. It's my understanding that automatic set up functions are currently not MathWorks style but I think this is fine because it is run by each script and the user sees it.

I'd like to request two small changes:

  1. Can you please also fix tiny_ophys_inferrence.mlx here:
trained_model_file = '2019_09_11_23_32_unet_single_1024_mean_absolute_error_Ai93-0450.h5';
if ~isfile(fullfile('sample_data', trained_model_file))
    dropboxFileURL = 'https://www.dropbox.com/sh/vwxf1uq2j60uj9o/AAC0sZWahCJFBRARoYsw8Nnra/2019_09_11_23_32_unet_single_1024_mean_absolute_error_Ai93-0450.h5?dl=1';
    destinationFile = fullfile('sample_data',trained_model_file);
    try
        disp('Downloading trained model...');
        websave(destinationFile, dropboxFileURL);
        disp('Downloaded the trained model successfully.');
    catch ex
        disp('Error downloading the trained model.');
        throw(ex);
    end
else
    disp('Found the trained model')
end

so that it uses the same technique to identify where sample_data should be? That did not run for me unless I change to the right folder.

  1. Can you please give the file size in the comments for this file, so one knows how long to expect? (It's been downloading 20 minutes for me so far on Matlab Online and not done.)

Thanks Joris!

jbentvelsen commented 1 year ago

Thanks for your feedback! I have just pushed two commits incorporating it.