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

File path in sey from file #97

Open
lmether opened this issue Jun 11, 2019 · 0 comments
Open

File path in sey from file #97

lmether opened this issue Jun 11, 2019 · 0 comments

Comments

@lmether
Copy link
Collaborator

lmether commented Jun 11, 2019

In the following code, sey_file_real doesn't seem to be used:

        if type(sey_file) is dict:
            sey_properties = sey_file
        else:
            # Search for file with given name, either as an absolute path or in the dedicated folder
            # Absolute path has precedence.
            candidate_files = [
                os.path.expanduser(sey_file),
                os.path.abspath(os.path.dirname(__file__)) + '/sey_files/' + sey_file,
            ]
            existing_files = filter(os.path.isfile, candidate_files)
            if not existing_files:
                raise ValueError('SEY file %s is not found' % sey_file)
            sey_file_real = existing_files[0]
            print('Secondary emission from file %s' % sey_file_real)

            sey_properties = sio.loadmat(sey_file)
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

1 participant