Skip to content

Commit

Permalink
fixed typos and updated 2nd part of plan
Browse files Browse the repository at this point in the history
  • Loading branch information
sangfrois committed Apr 8, 2020
1 parent 1d3c45b commit 7759012
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion phys2bids/phys2bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

def print_summary(filename, ntp_expected, ntp_found, samp_freq, time_offset, outfile):
"""
Prints a summary onscreen and in file with informations on the files.
Print a summary onscreen and in file with informations on the files.
Parameters
----------
Expand Down
19 changes: 12 additions & 7 deletions phys2bids/split2phys.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,23 +97,28 @@ def split2phys(filename, indir='.', outdir='.', ntp_list=[0], tr_list=[1], thr=N

#
for run_idx, run_tps in list_ntp:
# ascertain run length
BlueprintInput.check_trigger_amount(ntp=run_tps, tr=list_tr[run_idx])
start_index = 0
# why are we playing with the object in time - wouldn't it be better to play in samples?
end_index = {index of spike 0} + {run_tps*list_tr[run_idx]}
run_Blueprint[run_idx] = BlueprintInput.timeseries[:end_index+padding, :]
padding =
# define idx of first trigger and padding length
start_index = BlueprintInput.timeseries[0]
padding = arb_val

# I'M A BIT CONFUSED here. not sure if i get this right
end_index = start_index + (run_tps * list_tr[run_idx])
run_Blueprint[run_idx] = BlueprintInput.timeseries[start_index - padding:
end_index + padding, :]

# if last value in the list "number of timepoints in run"
if run_idx == list_ntp.size[0]:
end_index + padding <= number of indexes
end_index + padding # <= number of indexes hmmm... don't remember our plan

# not sure how to define padding
# not sure how and where to define padding
else:
padding = number of indexes - end_index
BlueprintInput = BlueprintInput.timeseries[end_index + padding; , :]

# make dict exportable
# delete at index


def _main(argv=None):
Expand Down

0 comments on commit 7759012

Please sign in to comment.