Showing posts with label Tools. Show all posts
Showing posts with label Tools. Show all posts

Tuesday, 13 October 2015

Thesis Tools for Research Students


As it's that time of the year again(big thesis docs time), this is my essential writing tools email.   I recommend using both a reference manager and an automated proofreading tool.  Find one of each that you like and get to know it very well.  Your supervisor might thank me.... 

Every year I fix broken thesis documents that have all kinds of manually created messes.  Spend your time focusing on writing (or procrastination); but don't spend it working on reference lists or looking for typos and poor writing style.  Make your computer do the heavy lifting where it can help.

Reference Managers

Endnote  - http://libguides.scu.edu.au/content.php?pid=455662&sid=3732637 (PC & Mac. The SCU solution and it works) 
Mendeley - http://www.mendeley.com/features/reference-manager/  (Has fans among the phd's )

More Reference Managers

Automated Proofreading tools

StyleWriter - http://www.editorsoftware.com/  (PC. This is the one I have the most experience with and use) 
GingerPage  http://www.gingersoftware.com/  (PC, Android, IOS ... Mac via online service) Grammerly http://www.grammarly.com/  (Web based...??) 
Whitesmoke http://www.whitesmoke.com/  (Web based... ??)
 PerfectIt - http://www.intelligentediting.com/ (Word plugin...?)

More Proofreading tools




Using the tools you already have

Get familiar with the automated tools in MS Word that are there to help. (Anyone working in another editor... you're on your own)

1) Use the Style manager to style your document.
2) Use the cross-reference tool to create in-text references to tables, graphs and figures.
3) Use the "Table of Content" generator to automatically create and update your TOC. Ditto for tables of figures
4) Use the Page break and section break tools to split your sections. 
5) Use the caption tool on all tables, figures, graphs etc. 
6) Use your reference manager to automatically inject and style your Table of references. 

All these tools work together to automate the "grunt" work of producing large documents.  Use them or go crazy.  


Guides for working with Word on large docs
http://libroediting.com/blog/students-small-businesses-word-users/#wrd

More advanced Tools 

Reference Checker - Word macro to verify correctness of a reference.
http://www.goodcitations.com/

APA Style Guides
http://www.apastyle.org/learn/tutorials/



Thursday, 2 April 2015

Psychology Labs Technical Wiki is Up

Southern Cross University Psychology Labs Technical Wiki


https://sites.google.com/site/sculabsequipmentwiki/

This is a collection of knowledge about the labs, the equipment, specifications and such.  This will serve to document the technical details and give access for the students who are hunting these details during a midnight writing session. 

Let me know any additional details that you would like to see here and I will add them.

Monday, 25 August 2014

Automating the export of edat2 files from E-DataAid


So, you have a data set collected in E-Prime and you want to export for processing in another tool suite?  Since it takes half a dozen mouse clicks per file, you can only image how un-fun this gets once the data set grows to dozens or hundreds of files.

There are three methods for exporting a data set of edat2 files that I know of:

1) Manually click your way through the whole data set and export each individually.
2) Use E-Merge to merge the all the files into one huge file... then export it in one step... then figure out how to process it (either split it back into individual participant chunks or do a population study on the whole lot)

3) Use the below script to get it all done automagically in one mouseclick.

 My problem is that each year I have dozens of E-Prime data sets to handle.  This has resulted in needing to process literally hundreds of edat2 files every year.  I usually teach the student how to do the manual export method but that was still prone to human error and often resulted in me having to go and find a file that had been miss-named or skipped in the process.  More time and effort spent.  This is a repetative problem with no variability... there had to be an automated solution.

So after appropriate googling around and some futile autohotkey hacking, I contacted PST help and found a helpful customer support person.  After explaining my need and establishing that the first two solutions above were not suitable for my problem, the support person produced some documentation for a simple command line interface to E-DataAid.  This provided me with a scriptable interface that I needed.  Add a little Perl hacking and tada.... solution.

Find below my solution and some notes.

The Solution for Exporting edat2 files to text files

For this solution I used perl as my scripting language of choice. I recomend the ActiveState ActivePerl. 

To use this file you will need perl and E-Prime 2 installed on the computer.  Then simply copy this script into a text file and name it something useful, like "DumpEdatToText.pl" and save it in the directory with the edat2 files.

The doubleclick the perl script to run it. It should export each edat2 file to a tab-delimited text file named with the participant id and session id. For example "p1s1.csv"  (Note: while this is not strictly speaking a CSV file, the file extension makes it easy to import into Excel for my purposes)

Following is my perl script:

#get all the edat2 files in the current directory
my @files = glob("*.edat2");

#process file each individually
foreach my $file(@files){

    print $file . " being processed\n";

    #get the participant ID and session ID from the file name
    my $p = "partID not found";
    #my $p = substr $file, index($file, "-"), 1;
    if ($file =~ /\-([^-]+)\-/)
    {
        $p = $1;
    }
   
    my $s = "SessionID not found";
    if ($file =~ /\-([^-]+)\./)
    {
        $s = $1;
    }
   
    my $outfileName = "p" . $p . "s" . $s . ".csv";

    #process the command file
    my $theCommandFileName = "cmdFile.txt";
    unless( open cmdFile, '>:crlf', $theCommandFileName){
        die "\nUnable to open $theCommandFileName\n";
    }

    print cmdFile ("Inheritance=true" . "\n");
    print cmdFile ("InFile=" . $file . "\n");
    print cmdFile ("OutFile=" . $outfileName . "\n");
    print cmdFile ("ColFlags=0" . "\n");
    print cmdFile ("ColNames=1" . "\n");
    print cmdFile ("Comments=0" . "\n");
    print cmdFile ("BegCommentLine=" . "\n");
    print cmdFile ("EndCommentLine=" . "\n");
    print cmdFile ("DataSeparator=    " . "\n"); #<tab character
    print cmdFile ("VarSeparator=    " . "\n"); #<tab character
    print cmdFile ("BegDataLine=" . "\n");
    print cmdFile ("EndDataLine=" . "\n");
    print cmdFile ("MissingData=" . "\n");
    print cmdFile ("Unicode=1" . "\n");

    close cmdFile;
   
    #pass the command file to E-DataAid for export
    system('"C:\Program Files (x86)\PST\E-Prime 2.0\Program\E-DataAid.exe" /e /f cmdFile.txt');
}


End Perl Script

Notes

Error Messages from E-DataAid
Error 1
No Output and no error message generated when running the following command
"C:\Program Files (x86)\PST\E-Prime 2.0\Program\E-DataAid.exe" /e  exampleB.txt

Solution – forgot to include the /f flag on command line. Now works.
"C:\Program Files (x86)\PST\E-Prime 2.0\Program\E-DataAid.exe" /e /f exampleB.txt
The missing flag should generate an error message.

Error 2
Message: “Error Reading Unicode from command file”
Solution – Added “Unicode=1” to end of command file.  Guessed that it’s a flag field. Seems to work.

Error 3
Message: “Error Reading E-Prime data file: D:\TestDumper\test.edat2 file” 
Solution – Had the full path to the file in the command file. Replaced with a relative path and the command worked. 
InFile=D:\TestDumper\test.edat2  <-Failed
InFile=nBackVerbal-1-1.edat2 <- Worked

Error 4
Leaving the “InFile=” field empty will crash E-DataAid
E-DataAid should correctly handle and report the missing field.

Error 5
Leaving the “OutFile=” field empty will generate a spurious error message.  “Error exporting to text file: .” 
E-DataAid  should detect the missing field and correctly report that there is no output file name supplied.

Error 6
Absolute file path in the “InFile=” field to edat2 file cause failure.
This may be due to assuming that the file is in the current working directory????
Solution- Use a relative path or work in the same directory.