Skip to content

Commit

Permalink
Create concatenated time series to convert to fMRI
Browse files Browse the repository at this point in the history
  • Loading branch information
agchesebro committed Sep 24, 2024
1 parent a0b78f9 commit c4bbfbf
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion examples/flattening_circuit/RF_processing_saved_voltages.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,19 @@ for i ∈ eachindex(all_files)
collapse_data = collapse_timesteps(orig_data)
resampled_data = resample_timeseries(collapse_data, 1)
CSV.write(resampled_path, resampled_data)
end
end

concat_file_path = "/Users/achesebro/Downloads/all_sims/concatenated_sims.csv"
all_files = readdir(resampled_sim_path)
first_data = DataFrame(CSV.File(resampled_sim_path * all_files[1]))
all_data = first_data

for i 2:lastindex(all_files)
next_data = DataFrame(CSV.File(resampled_sim_path * all_files[i]))
all_data = vcat(all_data, next_data)
end

new_t = 0:lastindex(all_data.t)-1
all_data.t .= collect(new_t)

CSV.write(concat_file_path, all_data)

0 comments on commit c4bbfbf

Please sign in to comment.