Skip to content

Commit

Permalink
sliding window script
Browse files Browse the repository at this point in the history
  • Loading branch information
kincsesbalint committed Aug 15, 2018
1 parent f6a2b4b commit 37a5ac2
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions connectivity/SlidingWinNetworkBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ def netmat(timeseries_list, measure="correlation",timewindow=38,winstepsize=2):
# #print os.path.join(os.getcwd(), str(i) + "_mtx.tsv")
# subject_matrix_list.append( str(os.path.join(os.getcwd(), directory, "mtx.tsv")) )

mean = pd.DataFrame(conn_measure.mean_)
mean.values[range(regnum), range(regnum)] = 0 # zero-out digonal
mean.columns = ts.columns
mean.index = mean.columns
outfile = measure.replace(' ', '_') + "_mean_mtx.tsv"
mean.to_csv(outfile, sep="\t")

return os.path.join(os.getcwd(), outfile), subject_matrix_list

# mean = pd.DataFrame(conn_measure.mean_)
# mean.values[range(regnum), range(regnum)] = 0 # zero-out digonal
# mean.columns = ts.columns
# mean.index = mean.columns
# outfile = measure.replace(' ', '_') + "_mean_mtx.tsv"
# mean.to_csv(outfile, sep="\t")
#
# return os.path.join(os.getcwd(), outfile), subject_matrix_list
return funccorstd


# the workflow
Expand Down

0 comments on commit 37a5ac2

Please sign in to comment.