{"action":"created","issue":{"url":"https://api.github.com/repos/avivrosenberg/rhrv/issues/1","repository_url":"https://api.github.com/repos/avivrosenberg/rhrv","labels_url":"https://api.github.com/repos/avivrosenberg/rhrv/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/avivrosenberg/rhrv/issues/1/comments","events_url":"https://api.github.com/repos/avivrosenberg/rhrv/issues/1/events","html_url":"https://github.com/avivrosenberg/rhrv/issues/1","id":321523897,"number":1,"title":"Can you give an example of how to use rhrv_batch?","user":{"login":"celesti0n","id":10427191,"avatar_url":"https://avatars2.githubusercontent.com/u/10427191?v=4","gravatar_id":"","url":"https://api.github.com/users/celesti0n","html_url":"https://github.com/celesti0n","followers_url":"https://api.github.com/users/celesti0n/followers","following_url":"https://api.github.com/users/celesti0n/following{/other_user}","gists_url":"https://api.github.com/users/celesti0n/gists{/gist_id}","starred_url":"https://api.github.com/users/celesti0n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/celesti0n/subscriptions","organizations_url":"https://api.github.com/users/celesti0n/orgs","repos_url":"https://api.github.com/users/celesti0n/repos","events_url":"https://api.github.com/users/celesti0n/events{/privacy}","received_events_url":"https://api.github.com/users/celesti0n/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-09T10:55:47Z","updated_at":"2018-05-16T12:45:22Z","closed_at":null,"author_association":"NONE","body":"It would be much appreciated. Just use the mitdb example just like in the rhrv call."},"comment":{"url":"https://api.github.com/repos/avivrosenberg/rhrv/issues/comments/389505352","html_url":"https://github.com/avivrosenberg/rhrv/issues/1#issuecomment-389505352","issue_url":"https://api.github.com/repos/avivrosenberg/rhrv/issues/1","id":389505352,"user":{"login":"avivrosenberg","id":75639,"avatar_url":"https://avatars2.githubusercontent.com/u/75639?v=4","gravatar_id":"","url":"https://api.github.com/users/avivrosenberg","html_url":"https://github.com/avivrosenberg","followers_url":"https://api.github.com/users/avivrosenberg/followers","following_url":"https://api.github.com/users/avivrosenberg/following{/other_user}","gists_url":"https://api.github.com/users/avivrosenberg/gists{/gist_id}","starred_url":"https://api.github.com/users/avivrosenberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avivrosenberg/subscriptions","organizations_url":"https://api.github.com/users/avivrosenberg/orgs","repos_url":"https://api.github.com/users/avivrosenberg/repos","events_url":"https://api.github.com/users/avivrosenberg/events{/privacy}","received_events_url":"https://api.github.com/users/avivrosenberg/received_events","type":"User","site_admin":false},"created_at":"2018-05-16T12:45:22Z","updated_at":"2018-05-16T12:45:22Z","author_association":"OWNER","body":"Hi,\r\n\r\nThanks for pointing that out; I need to add something about it to the README (and update it in general, it's not really accurate anymore).\r\n\r\nAnyhow, until I do that, here's a script that I used a while back to analyze some data for my research.\r\nIf you follow through and read some of the comments in the `rhrv_batch` function, it should give you a sense of how to use it.\r\n\r\n```matlab\r\nfolder = '...' \r\noutput_filename = '...'\r\n\r\n%% Analysis configuration\r\n\r\nrec_types =     {'NSR1+2', 'NSR1', 'NSR2'};\r\nrec_filenames = {'**/*', 'nsrdb/1*', 'nsr2db/nsr*'};\r\n\r\n% rhrv parameters\r\nparams = {'defaults',...\r\n    'filtrr.quotient.enable', 'false',...,\r\n    'filtrr.rr_min', 0.4,...\r\n    'filtrr.rr_max', 2.0,...\r\n    'hrv_freq.methods', {'lomb'},...\r\n    'hrv_freq.vlf_band', [0, 0.0033],...\r\n    'hrv_freq.win_func', 'rectwin',...\r\n    'hrv_freq.window_minutes', '',...\r\n    'hrv_freq.osf', 1,...\r\n    'mse.mse_metrics', false,...\r\n    'mse.mse_max_scale', 0,...\r\n    'dfa.n_incr', 4\r\n};\r\n\r\n%% Analyze data\r\n\r\n[batch_data] = rhrv_batch(folder,...\r\n    'rec_types', rec_types,...\r\n    'rec_filenames', rec_filenames,...\r\n    'ann_ext', 'atr',...\r\n    'rhrv_params', params,...\r\n    'min_nn', 300,...\r\n    'output_filename', [folder filesep output_filename],...\r\n    'writexls', true...\r\n);\r\n\r\n%% Save to file\r\nsave([folder filesep output_filename], 'batch_data');\r\n```\r\n\r\nNote that here the `folder` variable contains the path of a folder containing two folders `nsrdb` and `nsr2db`. These are two standard databases from PhysioNet.\r\nAlso this example is pretty basic, it doesn't show all features of the `rhrv_batch` function, but you can build on it.\r\n\r\nHope it helps.\r\nAviv"}}
{"actor":{"display_login":"avivrosenberg"}}