Skip to content

Commit

Permalink
put acqread_python in import folder
Browse files Browse the repository at this point in the history
  • Loading branch information
teddychao committed May 20, 2024
1 parent 5812b94 commit 15f8fa7
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/pspm_read_acq_file.m → src/Import/acq/acqread_python.m
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
function data = pspm_read_acq_file(filename)
% Set the Python environment and the filename
function [sts, data] = acqread_python(filename)
% ● Description
% acqread_python read data from acq files
% ● Format
% [sts, data] = acqread_python(filename)
% ● Arguments
% filename: the ACQ data file to import
% import: the import struct of importing settings
% ● History
% Introduced in PsPM 6.1.2
% Written in May 2024 by Madni Abdul Wahab (Uni Bonn)

%% Set the Python environment and the filename
py_filename = py.str(filename);
acq_data = py.bioread.read(py_filename); % Load the data using Bioread

num_channels = length(acq_data.channels); % Determine the number of channels
data.channels = cell(1, num_channels);

% Iterate through each channel
%% Iterate through each channel
for idx = 1:num_channels
channel = acq_data.channels{idx};
data.channels{idx} = struct();
Expand Down Expand Up @@ -51,4 +62,3 @@
end

return;
end

0 comments on commit 15f8fa7

Please sign in to comment.