Skip to content
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

WFDB_PATH not loaded from environment #149

Open
achuthpv opened this issue Dec 6, 2017 · 3 comments
Open

WFDB_PATH not loaded from environment #149

achuthpv opened this issue Dec 6, 2017 · 3 comments

Comments

@achuthpv
Copy link

achuthpv commented Dec 6, 2017

wfdbloadlib.m, which is supposed to load WFDB libraries and set configurations, is currently not looking for environment variable "WFDB" in Octave/MATLAB. So, its value always get defaulted to
if(isempty(WFDB_PATH))
tmpCache=[config.MATLAB_PATH '..' filesep 'database' filesep];
WFDB_PATH=['. ' tmpCache ' http://physionet.org/physiobank/database/'];
end
as WFDB_PATH is set as empty at the beginning of wfdbloadlib.m.

Wouldn't it be better to start with WFDB_PATH=getenv("WFDB"); and then set defaults if it is empty.
This would give anyone the flexibility to point the path to desired database folders at the beginning of code execution without going through the hassle of editing the toolbox files.

I am using release 0-10-0, with Octave and Ubuntu 14.04.

@jcbsv
Copy link

jcbsv commented May 24, 2018

In the previous version(s) you could supply a full path with the record-name and it worked without the need for defining a search path. I prefer the behavior of the previous version(s).

@jcbsv
Copy link

jcbsv commented May 25, 2018

A temporary fix that enables loading of data files from a local path is to set WFDB_PATH = [' ']; in wfdbloadlib.m.

@achuthpv
Copy link
Author

You can always set environment variable like WFDB_PATH using setenv() from within Octave/Matlab code/script. The good thing about it is that, based upon requirement it is very easy to write in script the way one can pass the record name. Just as @jcbsv mentioned in this comment, you can set WFDB_PATH as ' ' (space in single quotes) when required to pass full file path. For a person who doesn't require any of this, WFDB_PATH would usually be unset. In such cases, the default can be taken.
Problem right now is that, if any modification has to be done for the way the records are accessed, it has to be done within the plugin and depending upon different requirements it has to be changed manually every single time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants