Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package upgrades #159

Open
wants to merge 9 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ dependencies:
- conda-build
- conda-verify
- coverage
- numpy >= 1.20.3,< 2.0
- scipy >= 1.9.0,< 1.14.0
- python
- numpy == 1.26.4
- scipy == 1.14.1
- python >=3.10
- pyre == 0.8.3
- mantid
- matplotlib
Expand All @@ -33,5 +33,4 @@ dependencies:
- ipywidgets # used in one test
- pip
- pip:
- ipywe == 0.1.3a1
- git+https://github.com/neutrons/histogram-dev.git@next#egg=histogram-dev
8 changes: 4 additions & 4 deletions src/multiphonon/sqe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ def get_boundary_indexes(a):
iqehist.I[mask] = 0
iqehist.E2[mask] = 0
Q = iqehist.Q
f = interpolate.interp2d(E, Q, iqehist.I, kind="linear")
E2f = interpolate.interp2d(E, Q, iqehist.E2, kind="linear")
f = interpolate.RectBivariateSpline(E, Q, iqehist.I.T, kx=1, ky=1)
E2f = interpolate.RectBivariateSpline(E, Q, iqehist.E2.T, kx=1, ky=1)
dE = E[1] - E[0]
Emin = E[0] // dE * dE
Emax = E[-1] // dE * dE
# Enew = np.arange(Emin, Emax+dE/2, dE)
newS = f(newE, Q)
newS_E2 = E2f(newE, Q)
newS = f(newE, Q).T
newS_E2 = E2f(newE, Q).T
# create new histogram
Eaxis = H.axis("E", newE, unit="meV")
Qaxis = H.axis("Q", Q, unit="1./angstrom")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# -*- python -*-
# This algorithm should be deprecated with the deletion of ipywe. This algorithm is not covered in tests.
# Just in case users are using old jupyternotebooks that calls this algorithm it's renamed with *_depracated keyword at the moment.
# For this algorithm to work properly, ipywe needs to be installed.
#
import os

Expand Down
58 changes: 0 additions & 58 deletions tests/ui/getdos_TestCase.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,64 +27,6 @@ def test_contextload(self):
cntxt2.from_yaml(context_filepath)
return

def test1(self):
"""multiphonon.ui.getdos"""
from multiphonon.ui import Context, getdos

with tempfile.TemporaryDirectory() as tmpdirname:
context_filepath = os.path.join(tmpdirname, "context.yaml")

context = Context()
context.to_yaml(context_filepath)
context2 = Context()
context2.from_yaml(context_filepath)
s = str(context)

context.sample_nxs = "sample.nxs"
wiz = getdos.NxsWizardStart(context)
wiz.show()
wiz.sample_nxs = context.sample_nxs
wiz.validate()
wiz.nextStep()

wiz = getdos.GetMTNxs(context)
wiz.show()
wiz.mt_nxs = "mt.nxs"
wiz.validate()
wiz.nextStep()

wiz = getdos.GetEiT(context)
wiz.show()
wiz.validate()
wiz.nextStep()

wiz = getdos.GetEAxis(context)
wiz.show()
wiz.validate()
context.Emin, context.Emax, context.dE = -50.0, 50.0, 1.0
wiz.nextStep()

wiz = getdos.GetQAxis(context)
wiz.show()
wiz.validate()
context.Qmin, context.Qmax, context.dQ = 0.0, 15.0, 0.1
# wiz.nextStep()

context.initdos = "initdos.h5"
wiz = getdos.GetInitDOS(context)
wiz.show()
wiz.initdos = "initdos.h5"
wiz.validate()
wiz.nextStep()

wiz = getdos.GetParameters(context)
wiz.show()
wiz.validate()
# wiz.nextStep()
return

pass # end of TestCase


def exec_cmd(cmd):
if os.system(cmd):
Expand Down
Loading