Skip to content

Commit 8264f17

Browse files
fix: correct imports from utils and initialize diffraction objects properly
1 parent da3340b commit 8264f17

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/diffpy/labpdfproc/labpdfprocapp.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
from diffpy.labpdfproc.functions import CVE_METHODS, apply_corr, compute_cve
77
from diffpy.labpdfproc.tools import known_sources, load_metadata, preprocessing_args
8+
from diffpy.utils.diffraction_objects import XQUANTITIES, DiffractionObject
89
from diffpy.utils.parsers.loaddata import loadData
9-
from diffpy.utils.scattering_objects.diffraction_objects import XQUANTITIES, Diffraction_object
1010

1111

1212
def define_arguments():
@@ -170,12 +170,12 @@ def main():
170170
f"exists. Please rerun specifying -f if you want to overwrite it."
171171
)
172172

173-
input_pattern = Diffraction_object(wavelength=args.wavelength)
174173
xarray, yarray = loadData(filepath, unpack=True)
175-
input_pattern.insert_scattering_quantity(
176-
xarray,
177-
yarray,
178-
args.xtype,
174+
input_pattern = DiffractionObject(
175+
xarray=xarray,
176+
yarray=yarray,
177+
xtype=args.xtype,
178+
wavelength=args.wavelength,
179179
scat_quantity="x-ray",
180180
name=filepath.stem,
181181
metadata=load_metadata(args, filepath),

0 commit comments

Comments
 (0)