-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unify function output #689
Merged
Merged
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
5e40e47
modify pspm_combine_markerchannels
a803376
modify pspm_convert_au2unit and pspm_convert_area2diameter
9b391cc
fix pspm_load_channel
cb6813c
modify pspm_convert_hb2hp
9e5d630
modify pspm_convert_ppg2hb & pspm_emg_pp
2608a84
modify pspm_find_sounds
3ecf795
modify pspm_pupil_correct_eyelink
25345c1
modify pspm_resp_pp
545af94
modify pspm_scr_pp
d69277b
modify pspm_pp
5e973c7
modify pspm_merge
48a9edb
modify pspm_split_sessions
9d62414
modify pspm_remove_epochs
8b092c1
modify pspm_trim
afc20b9
modify pspm_import
ffe2f70
modify pspm_dcm
ae4a435
modify pspm_dcm_inv
ba1d6ff
modify pspm_glm
91d3fca
remove varargout in pspm_sf_... and pspm_transfer_function
72eaf15
modify pspm_version
06bad35
fixes after testing
cb29ec1
fixes after testing
31618c4
Merge branch 'develop' into unify-function-output
teddychao f2225b9
Merge branch 'develop' into unify-function-output
dominikbach c88cca3
modify pspm_interpolate
94cfdc8
improve pspm_select_channels
109035e
test fix
6b9c365
test fix
2dbd2fb
remove comment numbering in pspm_check_data
4969a2b
fix pspm_cfg_rename
ef8241b
fix pspm_cfg_find_sounds
b7fdc3e
Merge branch 'develop' into unify-function-output
dominikbach 5a8a12b
fix pspm_version and GUI for pspm_merge
bd999ac
fix pspm_rename and GUI item
9f8a9b4
improve test for gaze_convert
74ceee8
Merge branch 'unify-function-output' of github.com:bachlab/PsPM into …
17e42f1
fix test for pspm_rename
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,20 +23,20 @@ | |
{'semi', 'twthresh'}); | ||
options = pspm_update_struct(options, job, 'channel_action'); | ||
% call function | ||
[sts, winfo] = pspm_convert_ecg2hb(fn, options); | ||
[sts, outchannel] = pspm_convert_ecg2hb(fn, options); | ||
case 'ecg2hb_amri' | ||
options = pp_field.opt; | ||
options.channel = chan; | ||
options = pspm_update_struct(options, job, 'channel_action'); | ||
winfo = struct(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Think this line can be removed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ? |
||
[sts, winfo.channel] = pspm_convert_ecg2hb_amri(fn, options); | ||
[sts, outchannel] = pspm_convert_ecg2hb_amri(fn, options); | ||
case 'hb2hp' | ||
sr = job.pp_type{i}.hb2hp.sr; | ||
options = struct(); | ||
options.channel = chan; | ||
options.limit = job.pp_type{i}.hb2hp.limit; | ||
options = pspm_update_struct(options, job, 'channel_action'); | ||
[sts, winfo] = pspm_convert_hb2hp(fn, sr, options); | ||
[sts, outchannel] = pspm_convert_hb2hp(fn, sr, options); | ||
case 'ecg2hp' | ||
sr = job.pp_type{i}.ecg2hp.sr; | ||
% copy options | ||
|
@@ -51,16 +51,16 @@ | |
options = pspm_update_struct(options, job, {'channel_action'}); | ||
options.channel = chan; | ||
% call ecg2hb | ||
[sts, winfo] = pspm_convert_ecg2hb(fn, options); | ||
[sts, outchannel] = pspm_convert_ecg2hb(fn, options); | ||
if sts ~= -1 | ||
% replace channel | ||
options.channel_action = 'replace'; | ||
options = pspm_update_struct(options, ... | ||
job.pp_type{i}.ecg2hp, ... | ||
'limit'); | ||
options.channel = winfo.channel; | ||
options.channel = outchannel; | ||
% call ecg2hp | ||
[sts, winfo] = pspm_convert_hb2hp(fn, sr, options); | ||
[sts, outchannel] = pspm_convert_hb2hp(fn, sr, options); | ||
end | ||
case 'ppg2hb' | ||
options = struct(); | ||
|
@@ -73,10 +73,10 @@ | |
end | ||
options.channel = chan; | ||
options = pspm_update_struct(options, job, {'channel_action'}); | ||
[sts, winfo] = pspm_convert_ppg2hb(fn, options); | ||
[sts, outchannel] = pspm_convert_ppg2hb(fn, options); | ||
end | ||
if sts ~= -1 | ||
outputs{i} = winfo.channel; | ||
outputs{i} = outchannel; | ||
else | ||
outputs{i} = []; | ||
warning('Error occured during conversion. Could not finish correctly.'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
function out = pspm_cfg_run_rename(job) | ||
% Updated on 08-01-2024 by Teddy | ||
n = size(job.file,2); | ||
filename = cell(n,1); | ||
newfilename = cell(1,n); | ||
for i = 1:n | ||
filename{i} = job.file(i).filename{1}; | ||
newfilename{i} = job.file(i).newfilename; | ||
end | ||
out = pspm_ren(filename, newfilename); | ||
filename = job.filename{1}; | ||
newfilename = job.newfilename; | ||
[sts, out] = pspm_rename(filename, newfilename); | ||
if ~iscell(out) | ||
out = {out}; | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw other functions, such as
pspm_cfg_run_merge
has removedout={out}
if it is not a cell. I am not sure if this is still necessary here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GUI dependencies will be updated in a future PR.