Data extraction from edat file

5,548 views
Skip to first unread message

ulli

unread,
Jul 5, 2010, 3:57:20 PM7/5/10
to E-Prime
Hi all,

is there an easier way than copy paste to extract your data from an
edat file? has anyone of you achieved to make this process automatic,
e.g. have the data read in automatically from Matlab?

any help would be appreciated!

thanks a lot!
Ulrike

liwenna

unread,
Jul 6, 2010, 8:00:00 AM7/6/10
to E-Prime
From or to matlab?

I always export my data to a .txt file (file > export > export to
statview and spss > untick the unicode option) in edat and the
resulting .txt file I then import in SPSS.

Tried anything like that?

Best,

AW

Michiel Spape

unread,
Jul 6, 2010, 10:36:31 AM7/6/10
to e-p...@googlegroups.com
To add to this, and also not able to provide many tips, I'd suggest merging the files first, THEN exporting. But I suppose that might be too obvious.

Anyway, in Matlab, it's pretty easy to just import the whole lot as text format. I think I still have some matlab code, if you need it:

names=0;
Filenames{1}='Collision 1i-201-1.gazedata';

nSubjects = size(Filenames,2);

for cSubject = 1: nSubjects

disp(['Subject ' num2str(cSubject) ' of ' num2str(nSubjects) ' reading data']);
[EyeData.Subject,EyeData.Session, EyeData.ID, EyeData.TETTime, EyeData.RTTime, EyeData.CursorX, EyeData.CursorY, EyeData.TimestampSec, EyeData.TimestampMicrosec, EyeData.XGazePosLeftEye, EyeData.YGazePosLeftEye, EyeData.XCameraPosLeftEye, EyeData.YCameraPosLeftEye, EyeData.DiameterPupilLeftEye, EyeData.DistanceLeftEye, EyeData.ValidityLeftEye, EyeData.XGazePosRightEye, EyeData.YGazePosRightEye, EyeData.XCameraPosRightEye, EyeData.YCameraPosRightEye, EyeData.DiameterPupilRightEye, EyeData.DistanceRightEye, EyeData.ValidityRightEye, EyeData.Subject, EyeData.TrialNum, EyeData.WhichTask, EyeData.Proc, EyeData.StartPosModCue, EyeData.StartPosModTarget, EyeData.DistractorHidden, EyeData.TargetHitsCue, EyeData.DistractorHitsCue, EyeData.Phase, EyeData.TaskTime, EyeData.ACC, EyeData.RT, EyeData.TargetX, EyeData.TargetY, EyeData.CueX, EyeData.CueY, EyeData.DistractorX, EyeData.DistractorY]=textread(Filenames{cSubject}, '%f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %s %s %f %f %f %f %f %s %f %f %f %f %f %f %f %f %f', 'delimiter', '\t','headerlines',1);
End


%Notice that Filenames here only contains one. Furthermore, these gazedata files are Tobii text files, pretty much the same as exported .edat files. \t is tab-based delimiter, and the whole lot is imported in various variable names in MatLab.

Hope that helps, sorry for the difficult-to-read code (matlab does that, I find).
Cheers,
Mich

Michiel Spapé
Research Fellow
Perception & Action group
University of Nottingham
School of Psychology

From or to matlab?

Tried anything like that?

Best,

AW

--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-p...@googlegroups.com.
To unsubscribe from this group, send email to e-prime+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.

David McFarlane

unread,
Jul 29, 2010, 4:55:52 PM7/29/10
to e-p...@googlegroups.com
Again for the record, I just want to add a plug
for using the Analyze facility built into
E-DataAid. This does a nice job of handling a
variety of basic descriptive statistics for
initial looks at the data, and with proper use
does a marvelous job of organizing data for
export to other analysis programs. Please study
the E-DataAid sections of the Getting Started
Guide, User's Guide, and Reference Guide that
come with E-Prime. As I have said before, it is
almost worth getting E-Prime just for for its
data handling capabilities, which are sadly much overlooked.

-- David McFarlane, Professional Faultfinder

andrew hill

unread,
Aug 17, 2010, 8:24:35 PM8/17/10
to e-p...@googlegroups.com
I've been trying to work a lot in E-DataAid recently, and find it's pretty unstable when working with large sets - e.g. I'm working with 21K rows, and filtering operations crash E-DataAid about half the time.

Even selecting a few columns and Edit->Copy can crash it.
Anyone have any advice? This is happening on 3 different machines, all of which with 4+ gb of RAM.

I do like the Analyze features, but since data manipulations before I get there cause crashes which produce unusable data files about half the time, I'm getting a bit frustrated.

Best,
Andrew


David Vinson

unread,
Aug 18, 2010, 4:49:32 AM8/18/10
to e-p...@googlegroups.com
Hi Andrew,

Which version of Windows are you using, and which version of E-Prime?
I haven't had crashing problems myself and deal with files >40k lines
all the time. I'm using E-Prime 2.0.8.22 (mostly), on Windows XP.

One note, if you have any special characters in your columns (e.g. text
from other languages), this will cause E-Data-Aid to crash as soon as
you try to filter (or possibly select) columns.

Anyway this seems like a perfect situation to use E-Prime's online
support facility:
http://support.pstnet.com/e%2Dprime/support/login.asp
They are very helpful in troubleshooting problems like this - although
they seem to be deluged with requests (expect ~7-10 days waiting time).

good luck,
David V


--
David Vinson, Ph.D.
Senior Postdoctoral Researcher
Cognitive, Perceptual and Brain Sciences Research Department
University College London
26 Bedford Way, London WC1H 0AP
Tel +44 (0)20 7679 5311 (UCL internal ext. 25311)

Michiel Spape

unread,
Aug 18, 2010, 5:59:45 AM8/18/10
to e-p...@googlegroups.com
Hi Andrew & David,
I've been using E-DataAid in E-Prime 1 (I think it is exactly the same as the one in E-Prime 2) for years and also find it quite stable, whether or not there are many lines (though processing/filtering takes longer with more rows, obviously). However, I agree with Andrew that column selecting/hiding and some collapsing operations aren't exactly perfect, and would suggest mainly working around this problem - firstly by design (I save important dependent variables as Y_..., so that they all get placed together), secondly by exporting to excel, and lastly by adding new variables (I don't think many know this is even possible). As for the last, it does get fairly tricky to actually get your data copy-pasted (for example, from excel to e-dataAid): make sure the level is correct (generally, I add new variables to the deepest level - trial or subtrial), that you filter AFTER adding new variables, that new variables tend to work better as being String type (even if they're numbers) and that the same number of cells are being copied (from excel, for instance) as you have selected to be pasted in E-DataAid.
Happy to (e-Data)aid! (groan)

Michiel Spapé
Research Fellow
Perception & Action group
University of Nottingham
School of Psychology

Hi Andrew,

good luck,
David V

--

You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-p...@googlegroups.com.
To unsubscribe from this group, send email to e-prime+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.

This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.

David McFarlane

unread,
Aug 18, 2010, 1:56:23 PM8/18/10
to e-p...@googlegroups.com
Once again folks, please do *NOT* try to start a new thread by
replying to an existing thread and changing the subject line. This
does not do what you think it does, on Google Groups it just changes
the name of the existing thread, which then messes up the
archive. If you want to start a new thread, please just start a
fresh message to e-p...@googlegroups.com.

In posting this reminder I also changed the the thead topic back to
"Data extraction from edat file".

-- David McFarlane, Professional Faultfinder

andrew hill

unread,
Aug 18, 2010, 8:55:22 PM8/18/10
to e-p...@googlegroups.com
Thanks David, and thanks for the reminder re starting new threads.

No special characters in my files, though the problem may be that I'm working with around 215K rows.

This is on WinXP, and the latest E-prime 2 installers.

It also started getting really bad after I had done a bunch of changing data - e.g. I have a column called "Group" that was all filled in with "1" and I selected different subjects (using filters) to name them more appropriate things.. I was able to select subsets of my 40 subjects with the filtering, and cut-paste to change "1" to a text word, but about the time I finished that the files became unusably unstable.

I'll probably try working with subsets of my data and then pasting it back together when doing the stats..

Others have suggested that I should use Excel's pivot tables instead of E-DataAid'd Analyze feature - will read up on that (I'm doing a GLM with mixed repeated measures - some measures across time and some not, so it's a bit complicated).

Best,
Andrew

uv

unread,
Dec 8, 2016, 8:57:58 AM12/8/16
to E-Prime
Hi
I just wrote a matlab function for reading the txt file, instead of the edat. Not the data aid exported file but the ugly txt output of e-prime from which edat are born and recovered. You can follow my github link to get it. I did not try to make it identical to edat, just to get everything out in one piece. You get matlab table as output, and if you wish also an xlsx file.
for xlsx run it like this
ePrimeTxt2vars('ExpName-1-1.txt','results_1_1.xlsx');
or like that to keep it in matlab
[T,headervars]=ePrimeTxt2vars('ExpName-1-1.txt');
feel free to perfect my function, please share if you got it better

David McFarlane

unread,
Dec 8, 2016, 12:00:28 PM12/8/16
to e-p...@googlegroups.com
Thanks for the MATLAB code. Also, if you upgrade to E-Prime 3
Professional, it should "Automatically generate text data files upon
completion of experiment". See
http://www.pstnet.com/eprime.cfm?tabID=Features .

-- David McFarlane


On 2016-12-08 8:57 AM, uv wrote:
> Hi
> I just wrote a matlab function for reading the txt file, instead of the
> edat. Not the data aid exported file but the ugly txt output of e-prime
> from which edat are born and recovered. You can follow my github link
> <https://github.com/yuval-harpaz/work-drafts/blob/master/matlab/ePrimeTxt2vars.m> to
Reply all
Reply to author
Forward
0 new messages