Skip to content

Commit

Permalink
Add source files
Browse files Browse the repository at this point in the history
  • Loading branch information
bobleesj committed Aug 11, 2024
1 parent 1cf0408 commit 42a7090
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 1 deletion.
24 changes: 24 additions & 0 deletions src/diffpy/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env python
##############################################################################
#
# (c) 2024 The Trustees of Columbia University in the City of New York.
# All rights reserved.
#
# File coded by: Billinge Group members and community contributors.
#
# See GitHub contributions for a more detailed list of contributors.
# https://github.com/diffpy/diffpy.nmf_mapping/graphs/contributors
#
# See LICENSE.rst for license information.
#
##############################################################################

"""Blank namespace package for module diffpy."""


from pkgutil import extend_path

__path__ = extend_path(__path__, __name__)

# End of file

25 changes: 25 additions & 0 deletions src/diffpy/nmf_mapping/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env python
##############################################################################
#
# (c) 2024 The Trustees of Columbia University in the City of New York.
# All rights reserved.
#
# File coded by: Billinge Group members and community contributors.
#
# See GitHub contributions for a more detailed list of contributors.
# https://github.com/diffpy/diffpy.nmf_mapping/graphs/contributors
#
# See LICENSE.rst for license information.
#
##############################################################################

"""Run NMF analysis on PDF and XRD data"""

# package version
from diffpy.nmf_mapping.version import __version__

# silence the pyflakes syntax checker
assert __version__ or True

# End of file

3 changes: 2 additions & 1 deletion src/diffpy/nmf_mapping/nmf_mapping_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
import numpy as np
import pandas as pd
from bg_mpl_stylesheets.styles import all_styles
from diffpy.utils.parsers.loaddata import loadData
from scipy import interpolate
from sklearn.decomposition import NMF, PCA
from sklearn.exceptions import ConvergenceWarning

from diffpy.utils.parsers.loaddata import loadData

plt.style.use(all_styles["bg_style"])
warnings.filterwarnings("ignore", category=FutureWarning)
warnings.filterwarnings("ignore", category=ConvergenceWarning)
Expand Down
26 changes: 26 additions & 0 deletions src/diffpy/nmf_mapping/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env python
##############################################################################
#
# (c) 2024 The Trustees of Columbia University in the City of New York.
# All rights reserved.
#
# File coded by: Billinge Group members and community contributors.
#
# See GitHub contributions for a more detailed list of contributors.
# https://github.com/diffpy/diffpy.nmf_mapping/graphs/contributors
#
# See LICENSE.rst for license information.
#
##############################################################################

"""Definition of __version__."""

# We do not use the other three variables, but can be added back if needed.
# __all__ = ["__date__", "__git_commit__", "__timestamp__", "__version__"]

# obtain version information
from importlib.metadata import version

__version__ = version("diffpy.nmf_mapping")

# End of file

0 comments on commit 42a7090

Please sign in to comment.