Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Raw data extraction question

Reply
Thread Tools

Raw data extraction question

 
 
Maggie
Guest
Posts: n/a
 
      08-26-2009
i have event timing stretch of code i need to alter. here is code
below:
--------------
# we start each run with one full silent trial
# creating a "stub" with the duration of a full block
# less the discarded acquisitions
stub = block_dur - (distax * tr)

feed = sys.stdin.readlines()
sess = -1
for line in feed:
if re.search(line != rest):
time = (line + line (-1)) + (distax * tr)
print time

elif (line(-1) = rest):
# block onsets are determined by
# block number, block duration,
# and the stub; 3dDeconvolve
# takes care of making these
# "global"
time = (line) + (distax * tr)
print time
-----
my concern is that it is extracting line number and not data contained
on a given line. I need it to extract data from each line (excluding
lines with spaces and/or lines that contain the word "pause" or
"silence"). Basically i need ONLY raw data extracted from line 1 -
onward.

Please let me know if you have any suggestions.

Thanks!
 
Reply With Quote
 
 
 
 
Gabriel Genellina
Guest
Posts: n/a
 
      08-28-2009
En Wed, 26 Aug 2009 12:18:23 -0300, Maggie <(E-Mail Removed)> escribiķ:

> i have event timing stretch of code i need to alter. here is code
> below:
> --------------
> # we start each run with one full silent trial
> # creating a "stub" with the duration of a full block
> # less the discarded acquisitions
> stub = block_dur - (distax * tr)
>
> feed = sys.stdin.readlines()
> sess = -1
> for line in feed:
> if re.search(line != rest):
> time = (line + line (-1)) + (distax * tr)
> print time
>
> elif (line(-1) = rest):
> # block onsets are determined by
> # block number, block duration,
> # and the stub; 3dDeconvolve
> # takes care of making these
> # "global"
> time = (line) + (distax * tr)
> print time
> -----


When you post some piece of code, copy & paste it from the original
source; don't retype. The code above don't even compile.

> my concern is that it is extracting line number and not data contained
> on a given line. I need it to extract data from each line (excluding
> lines with spaces and/or lines that contain the word "pause" or
> "silence"). Basically i need ONLY raw data extracted from line 1 -
> onward.


How does a line look like? Post some sample lines.

--
Gabriel Genellina

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Canon 7D S-RAW/M-RAW Question Paul Furman Digital Photography 4 09-15-2009 09:02 PM
Re: Canon 7D S-RAW/M-RAW Question John McWilliams Digital Photography 2 09-04-2009 10:32 PM
Re: Canon 7D S-RAW/M-RAW Question Arun Digital Photography 0 09-03-2009 03:53 AM
Perl Patten Matching and Data Extraction Manasa Perl 2 05-19-2004 12:16 PM
Clock and data extraction Di'ego VHDL 0 12-21-2003 02:22 AM



Advertisments