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

function load_input_signal refactor #42

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aajayi-21
Copy link
Contributor

No description provided.

@@ -3,6 +3,9 @@
from pathlib import Path
from diffpy.utils.parsers.loaddata import loadData

PDF_FILE_EXTENSIONS = {'.gr', '.cgr'}
DIFFRACTION_FILE_EXTENSIONS = {'.chi', 'iq', 'xye', '.xrd', '.xy'}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a much earlier comment, you mentioned that finding the file type by the file extension may not be a good idea. Do you know of any libraries that can do this (such as in diffpy.utils).

Copy link
Contributor

@sbillinge sbillinge Aug 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks to me as if you are trying to find the data_type from the extension. Is that right or is it teh file-type you are after? LoadData is pretty flexible, it should successfully read all the file extensions you put up there (I am not familiar with .xrd)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in other words, I don;t think you need to do this.

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

Successfully merging this pull request may close these issues.

2 participants