JaneliaSciComp / G4_Display_Tools

Collection of tools for the G4 LED arena displays.
Creative Commons Attribution 4.0 International
2 stars 2 forks source link

Wrong hard-coded path in `create_settings_file()` #67

Closed floesche closed 1 year ago

floesche commented 1 year ago

I am trying to follow the documentation on how to run a data analysis manually. The attempt to create a data analysis settings file fails with <mypath> is the directory that contains the metadata.mat file produced by the conductor:

> create_settings_file('newanalysis.mat', '<mypath>')
Error using load
Unable to read file '/Users/taylorl/Desktop/narrowGrating09-08-21_17-27-53/later_processing_settings.mat'.
No such file or directory.

Error in DA_plot_settings (line 484)
    process_settings = load(exp_settings.path_to_processing_settings);

Error in create_settings_file
floesche commented 1 year ago

OK, I understood now that the step above wasn't necessary for my use case and I can skip it.

I already have a file single_fly_analysis.mat in my folder, which should be OK as a basis for the analysis. According to the documentation of Running a typical analysis I now saw this error:

>> da = create_data_analysis_tool('<mypath>\single_fly_analysis.mat', '-single', '-hist', '-tsplot');`
Error using create_data_analysis_tool (line 195)
cannot find processed file in specified folder

I am guessing the problem is that I moved the file to a different location now? So, unless I move the files back to where they were before, I would probably need to go back to running the create_settings_file() function after all?

floesche commented 1 year ago

The previous assumption is confirmed. If I move the file back to the previous location, I can run the da.run_analysis on the data sets.

taylorlm88 commented 1 year ago

Just confirming, yes, the single_fly_analysis.mat file which was created using create_settings_file() has paths in it indicating where to find all the data. You could update the paths in single_fly_analysis.mat directly using matlab, or you could update the variables in create_settings_file() to indicate your new location and run it to create a new settings .mat file. Alternatively, move the data back to the location the single_fly_analysis.mat expects it to be in.