Skip to content

function load_input_signal refactor#42

Closed
aajayi-21 wants to merge 1 commit intodiffpy:mainfrom
aajayi-21:load_is
Closed

function load_input_signal refactor#42
aajayi-21 wants to merge 1 commit intodiffpy:mainfrom
aajayi-21:load_is

Conversation

@aajayi-21
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread diffpy/snmf/io.py
from diffpy.utils.parsers.loaddata import loadData

PDF_FILE_EXTENSIONS = {'.gr', '.cgr'}
DIFFRACTION_FILE_EXTENSIONS = {'.chi', 'iq', 'xye', '.xrd', '.xy'}
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@sbillinge sbillinge closed this Feb 7, 2026
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