Skip to content

Commit

Permalink
Move PeakCollection into the correct sub-package
Browse files Browse the repository at this point in the history
Refs #219
  • Loading branch information
peterfpeterson committed Dec 19, 2019
1 parent b157dd4 commit a5fe3ea
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 9 deletions.
6 changes: 3 additions & 3 deletions pyrs/core/mantid_fit_peak.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from pyrs.core import mantid_helper
from pyrs.utilities import checkdatatypes
from pyrs.core import peak_fit_engine
from pyrs.core.peak_collection import PeakCollection
from pyrs.peaks import PeakCollection
import numpy as np
from mantid.api import AnalysisDataService
from mantid.simpleapi import CreateWorkspace, FitPeaks
Expand Down Expand Up @@ -322,7 +322,7 @@ def fit_multiple_peaks(self, sub_run_range, peak_function_name, background_funct
Returns
-------
Dict
dictionary of ~pyrs.core.peak_collection.PeakCollection with peak tag as key
dictionary of ~pyrs.peaks.PeakCollection with peak tag as key
"""
peak_collection_dict = dict()
Expand Down Expand Up @@ -362,7 +362,7 @@ def _set_profile_parameters_values_from_fitting(self, peak_tag, sub_runs, peak_p
Returns
-------
~pyrs.core.peak_collecton.PeakCollection
~pyrs.peaks.PeakCollection
Fitted peak's information
"""
Expand Down
4 changes: 2 additions & 2 deletions pyrs/core/peak_fit_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def fit_multiple_peaks(self, sub_run_range, peak_function_name, background_funct
Returns
-------
List of ~pyrs.core.peak_collection.PeakCollection
List of ~pyrs.peaks.PeakCollection
"""
raise NotImplementedError('Virtual base class member method fit_multiple_peaks')
Expand Down Expand Up @@ -346,7 +346,7 @@ def get_peaks(self, peak_tag):
Returns
-------
pyrs.core.peak_collection.PeakCollection
pyrs.peaks.PeakCollection
Collection of peak information
"""
Expand Down
2 changes: 1 addition & 1 deletion pyrs/core/summary_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def write_csv(self, sample_logs, peak_collections, tolerance=1E-10):
----------
sample_logs: ~pyrs.dataobjects.SampleLogs
peak_collections: list
list of :py:obj:`~pyrs.core.peak_collection.PeakCollection`
list of :py:obj:`~pyrs.peaks.PeakCollection`
tolerance : float
relative tolerance of variance to treat a sample log as a constant value
and bring into extended header
Expand Down
3 changes: 3 additions & 0 deletions pyrs/peaks/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from __future__ import (absolute_import, division, print_function) # python3 compatibility

from .peak_collection import PeakCollection
File renamed without changes.
2 changes: 1 addition & 1 deletion pyrs/utilities/rs_project_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import os
from pyrs.utilities import checkdatatypes
from pyrs.core.instrument_geometry import AnglerCameraDetectorGeometry, HidraSetup
from pyrs.core.peak_collection import PeakCollection
from pyrs.peaks import PeakCollection
from pyrs.dataobjects import SampleLogs


Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_peak_fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Test class and methods implemented for peak fitting
import numpy
from pyrs.core import pyrscore
from pyrs.core.peak_collection import PeakCollection
from pyrs.peaks import PeakCollection
from pyrs.core.peak_profile_utility import PeakShape, BackgroundFunction
from pyrs.core.summary_generator import SummaryGenerator
from pyrs.dataobjects import SampleLogs
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_hidra_project_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import numpy as np
import datetime
from pyrs.core import peak_profile_utility
from pyrs.core.peak_collection import PeakCollection
from pyrs.peaks import PeakCollection
import pytest


Expand Down

0 comments on commit a5fe3ea

Please sign in to comment.