Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit 81d24a0

Browse files
committed
Change data files to adapt to lfp changes
1 parent e5b4250 commit 81d24a0

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

coreneuron/io/nrn_filehandler.hpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,13 @@ class FileHandler {
114114
int read_mapping_info(T* mapinfo, NrnThreadMappingInfo* ntmapping, CellMapping* cmap) {
115115
int nsec, nseg, n_scan;
116116
size_t total_lfp_factors;
117+
int num_electrodes;
117118
char line_buf[max_line_length], name[max_line_length];
118119

119120
F.getline(line_buf, sizeof(line_buf));
120-
n_scan = sscanf(line_buf, "%s %d %d %zd", name, &nsec, &nseg, &total_lfp_factors);
121+
n_scan = sscanf(line_buf, "%s %d %d %zd %d", name, &nsec, &nseg, &total_lfp_factors, &num_electrodes);
121122

122-
nrn_assert(n_scan == 4);
123+
nrn_assert(n_scan == 5);
123124

124125
mapinfo->name = std::string(name);
125126

@@ -133,8 +134,9 @@ class FileHandler {
133134

134135
read_array<int>(&sec[0], nseg);
135136
read_array<int>(&seg[0], nseg);
136-
read_array<double>(&lfp_factors[0], total_lfp_factors);
137-
int num_electrodes = read_int();
137+
if (total_lfp_factors > 0) {
138+
read_array<double>(&lfp_factors[0], total_lfp_factors);
139+
}
138140

139141
int factor_offset = 0;
140142
for (int i = 0; i < nseg; i++) {

tests/integration/ring/0_3.dat

80 Bytes
Binary file not shown.

tests/integration/ring/1_3.dat

80 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)