Raw data extraction question

M

Maggie

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!
 
G

Gabriel Genellina

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top