UMPsychMethodsCore / MethodsCore

All of the projects that the methods core develops, combined into one repository!
7 stars 0 forks source link

Second Level Script #41

Closed sripada closed 12 years ago

sripada commented 12 years ago

@mangstad wrote a script for performing second level analyses. It needs a few changes before it can be released for MethodsCore customers.

  1. Get the Second Level script into Template and Central format.
  2. Integrate GenPath into the script. A goal will be to feed all paths through GenPath in order to generate more useful error feedback for the user (e.g., an error message saying that the script could not find a particular image associated with a particular job). The script also needs to use GenPath-based recursive makdir routine, rather than the current makdir routine.
  3. The JobFile currently has a slot that contains the column number of an 'ImageColumn' in the scan file (where the ImageColumn contains the image number associated with the job). We would now prefer that the JobFile directly specifies the image number associated with the job. To ensure compatibility with existing versions of the script, we need a flag in the Template script that controls whether the JobFile slot is an ImageColumn are directly specifies an image.
  4. The JobFile currently has a number of auxiliary columns that specify parameters associated with factors and covariates (e.g., 'Variance', 'Dependence', 'GMSCA'). We would like to make all these 'parameter' columns optional. If the user does not provide columns with these headings, then the script will assign the parameter values automatically.

We are hoping @heffjos will take up this issue. Others involved: @dankessler, @sripada

dankessler commented 12 years ago

This commentary is really useful, but the issue itself is a duplicate of #39

dankessler commented 12 years ago

Since it's a duplicate, I'm going to close it, but I have cross-referenced it from #39.

mangstad commented 12 years ago

To expand on some of this.

3: As @sripada mentions, this needs to maintain backwards compatibility, so the default if the flag is not set is to assume it's the old style (number in image column references a column number from scanfile). Only if the flag is set to 1 (or whatever value is being used for the flag) should the script assume that numbers in the image column refer directly to contrast image numbers.

4: You should be able to look in the script at how GMSCA and ANCOVA columns are handled, as at some point in the past I made those optional. But again, the script needs to work if the columns are present to maintain backwards compatibility or if they are absent it needs to use some default values (which may vary depending on the type of model being run).

Also, I'll add 5: we'd like to add better (read: any) error handling to the script (and eventually all our scripts). Daniel and I just went over how we're going to go about this. I'm going to write a quick shell of a mc_Error script which will be used for errors. mc_Error will take an error string -- either just a string or with sprintf type format specifiers with additional variables -- and will then do several things including, throw an actual error in Matlab, pop up an error dialog window with the error string, and eventually will log this error to a logfile once the mc_Logger function is also completed. You don't necessarily need to go through the whole file right now to add error handling (unless you want to) but for any code that you're adding/editing try to add reasonable error checks. I'm going to submit a pull request for the skeleton mc_Error tonight so that Daniel can pull it into Universe so it can start being used while it gets completed.


Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues

dankessler commented 12 years ago

FYI the pull request for the skeleton of the error handler is done, so if folks fetch from universe and base new work on that develop (or merge it into their feature branches) they can take advantage of the new error handling in their features.

On Mon, Mar 26, 2012 at 5:15 PM, Mike Angstadt < reply@reply.github.com

wrote:

To expand on some of this.

3: As @sripada mentions, this needs to maintain backwards compatibility, so the default if the flag is not set is to assume it's the old style (number in image column references a column number from scanfile). Only if the flag is set to 1 (or whatever value is being used for the flag) should the script assume that numbers in the image column refer directly to contrast image numbers.

4: You should be able to look in the script at how GMSCA and ANCOVA columns are handled, as at some point in the past I made those optional. But again, the script needs to work if the columns are present to maintain backwards compatibility or if they are absent it needs to use some default values (which may vary depending on the type of model being run).

Also, I'll add 5: we'd like to add better (read: any) error handling to the script (and eventually all our scripts). Daniel and I just went over how we're going to go about this. I'm going to write a quick shell of a mc_Error script which will be used for errors. mc_Error will take an error string -- either just a string or with sprintf type format specifiers with additional variables -- and will then do several things including, throw an actual error in Matlab, pop up an error dialog window with the error string, and eventually will log this error to a logfile once the mc_Logger function is also completed. You don't necessarily need to go through the whole file right now to add error handling (unless you want to) but for any code that you're adding/editing try to add reasonable error checks. I'm going to submit a pull request for the skeleton mc_Error tonight so that Daniel can pull it into Universe so it can start being used while it gets completed.


Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues


Reply to this email directly or view it on GitHub:

https://github.com/UMPsychMethodsCore/MethodsCore/issues/41#issuecomment-4704456

Daniel A. Kessler Research Area Computer Specialist Psychiatry - Rachel Upjohn Building University of Michigan, Ann Arbor kesslerd@umich.edu +1 734.418.8134