Skip to content

Commit

Permalink
Merge pull request #3 from sbillinge/cleaned
Browse files Browse the repository at this point in the history
bit of cleaning now I got the package to install correctly
  • Loading branch information
sbillinge authored Feb 27, 2024
2 parents abc8f1d + 5998b6f commit 244f8bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions diffpy/labpdfproc/functions.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import numpy as np
from diffpy.utils.scattering_objects.diffraction_objects import Diffraction_object

wavelengths = {"Mo": 0.7107, "Ag": 0.59}
def compute_cve(diffraction_data, mud, wavelength):
# for a given mu and d and lambda, we will compute cve on a tth grid
# something arbitrary for the moment
cve = diffpy.utils.DiffractionObject()
cve = Diffraction_object()
cve_x = diffraction_data.on_tth[0]
cve_y = cve_x * mud * wavelength
cve.insert_scattering_quantity(cve_x, cve_y, "tth", metadata={ })
Expand Down
4 changes: 2 additions & 2 deletions diffpy/labpdfproc/labpdfprocapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from diffpy.labpdfproc.functions import compute_cve, apply_corr, wavelengths
from diffpy.utils.parsers.loaddata import loadData
from diffpy.utils.scattering_objects import DiffractionObject
from diffpy.utils.scattering_objects.diffraction_objects import Diffraction_object


known_sources = ["Ag", "Mo"]
Expand Down Expand Up @@ -51,7 +51,7 @@ def main():

args = get_args()
wavelength = wavelengths[args.anode_type]
input_pattern = DiffractionObject()
input_pattern = Diffraction_object()
xarray, yarray = loadData(args.data_file, unpack=True)
input_pattern.insert_scattering_quantity(xarray, yarray, "tth", metadata={ })

Expand Down

0 comments on commit 244f8bd

Please sign in to comment.