Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Commit 1d4a64c

Browse files
author
Jaquier Aurélien Tristan
committed
Turn pkl data file into npy file for py37 compatibility
1 parent 55f94ae commit 1d4a64c

File tree

5 files changed

+16
-5
lines changed

5 files changed

+16
-5
lines changed

bluepyopt/tests/test_ephys/test_features.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import numpy
88

99
from bluepyopt.ephys import efeatures
10-
from bluepyopt.ephys.responses import TimeVoltageResponse
10+
from bluepyopt.ephys.responses import TimeVoltageResponse, TimeLFPResponse
1111
from bluepyopt.ephys.serializer import instantiator
1212

1313

@@ -267,11 +267,22 @@ def test_extraFELFeature():
267267
testdata_dir = os.path.join(
268268
os.path.dirname(os.path.abspath(__file__)), 'testdata'
269269
)
270-
resp_fname = os.path.join(testdata_dir, 'lfpy_response_with_soma.pkl')
271-
responses_lst = pd.read_pickle(resp_fname)
270+
soma_time = numpy.load(os.path.join(testdata_dir, 'lfpy_soma_time.npy'))
271+
soma_voltage = numpy.load(
272+
os.path.join(testdata_dir, 'lfpy_soma_voltage.npy')
273+
)
274+
lfpy_time = numpy.load(os.path.join(testdata_dir, 'lfpy_time.npy'))
275+
lfpy_voltage = numpy.load(os.path.join(testdata_dir, 'lfpy_voltage.npy'))
276+
277+
soma_response = TimeVoltageResponse(
278+
name='soma_response', time=soma_time, voltage=soma_voltage
279+
)
280+
lfpy_response = TimeLFPResponse(
281+
name="lfpy_response", time=lfpy_time, lfp=lfpy_voltage
282+
)
272283
responses = {
273-
somatic_recording_name: responses_lst[0][1],
274-
recording_names['']: responses_lst[0][0],
284+
somatic_recording_name: soma_response,
285+
recording_names['']: lfpy_response,
275286
}
276287

277288
# compute for all electrodes
96 KB
Binary file not shown.
96 KB
Binary file not shown.
96 KB
Binary file not shown.

bluepyopt/tests/test_ephys/testdata/lfpy_response_with_soma.pkl renamed to bluepyopt/tests/test_ephys/testdata/lfpy_voltage.npy

19.9 MB
Binary file not shown.

0 commit comments

Comments
 (0)