Skip to content

Commit

Permalink
Merge pull request #386 from ISISNeutronMuon/remove-failing-analysis
Browse files Browse the repository at this point in the history
Remove failing analysis
  • Loading branch information
ChiCheng45 authored Mar 25, 2024
2 parents 87de379 + 73fa60d commit dc6dc0d
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 13 deletions.
2 changes: 2 additions & 0 deletions MDANSE/Src/MDANSE/Framework/Jobs/CroppedTrajectory.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class CroppedTrajectory(IJob):
Crop a trajectory in terms of the contents of the simulation box (selected atoms or molecules) and the trajectory length.
"""

enabled = False

label = "Cropped Trajectory"

category = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ class CurrentCorrelationFunction(IJob):
in space and time)'
"""

enabled = False

label = "Current Correlation Function"

category = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
class DipoleAutoCorrelationFunction(IJob):
""" """

enabled = False

label = "Dipole AutoCorrelation Function"

category = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ class GlobalMotionFilteredTrajectory(IJob):
In the global motion filtered trajectory, the universe is made infinite and all the configurations contiguous.
"""

enabled = False

label = "Global Motion Filtered Trajectory"

category = (
Expand Down
2 changes: 2 additions & 0 deletions MDANSE/Src/MDANSE/Framework/Jobs/McStasVirtualInstrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ class McStasVirtualInstrument(IJob):
instrument resolution, self-shielding and multiple scattering.
"""

enabled = False

label = "McStas Virtual Instrument"

category = (
Expand Down
2 changes: 2 additions & 0 deletions MDANSE/Src/MDANSE/Framework/Jobs/RigidBodyTrajectory.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ class RigidBodyTrajectory(IJob):
doi: 10.1080/08927029108022453.
"""

enabled = False

label = "Rigid Body Trajectory"

category = (
Expand Down
20 changes: 7 additions & 13 deletions MDANSE/Tests/UnitTests/Analysis/test_scattering.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def qvector_spherical_lattice(trajectory):
)


@pytest.fixture(scope="function")
@pytest.fixture(scope="module")
def dcsf():
temp_name = tempfile.mktemp()
parameters = {}
Expand All @@ -45,7 +45,7 @@ def dcsf():
"SphericalLatticeQVectors",
{"seed": 0, "shells": (5.0, 36, 10.0), "n_vectors": 10, "width": 9.0},
)
parameters["running_mode"] = ("monoprocessor",)
parameters["running_mode"] = ("single-core",)
parameters["trajectory"] = short_traj
parameters["weights"] = "b_coherent"
dcsf = IJob.create("DynamicCoherentStructureFactor")
Expand All @@ -54,7 +54,7 @@ def dcsf():
os.remove(temp_name + ".mda")


@pytest.fixture(scope="function")
@pytest.fixture(scope="module")
def disf():
temp_name = tempfile.mktemp()
parameters = {}
Expand All @@ -67,7 +67,7 @@ def disf():
"SphericalLatticeQVectors",
{"seed": 0, "shells": (5.0, 36, 10.0), "n_vectors": 10, "width": 9.0},
)
parameters["running_mode"] = ("monoprocessor",)
parameters["running_mode"] = ("single-core",)
parameters["trajectory"] = short_traj
parameters["weights"] = "b_incoherent2"
disf = IJob.create("DynamicIncoherentStructureFactor")
Expand Down Expand Up @@ -151,35 +151,29 @@ def test_gdisf(trajectory):
os.remove(temp_name + ".mda")


@pytest.mark.xfail(reason="see docstring")
def test_ndtsf(disf, dcsf, qvector_spherical_lattice):
"""A known problem that will have to be fixed."""
temp_name = tempfile.mktemp()
parameters = {}
parameters["atom_selection"] = None
parameters["atom_transmutation"] = None
parameters["frames"] = (0, 10, 1)
parameters["disf_input_file"] = disf
parameters["dcsf_input_file"] = dcsf
parameters["q_vectors"] = qvector_spherical_lattice
parameters["running_mode"] = ("monoprocessor",)
parameters["running_mode"] = ("single-core",)
parameters["trajectory"] = short_traj
parameters["output_files"] = (temp_name, ("MDAFormat",))
parameters["weights"] = "b_incoherent2"
ndtsf = IJob.create("NeutronDynamicTotalStructureFactor")
ndtsf.run(parameters, status=True)
assert path.exists(temp_name + ".mda")
assert path.isfile(temp_name + ".mda")
os.remove(temp_name + ".mda")


@pytest.mark.xfail(reason="see docstring")
def test_ssfsf(disf):
"""Also fails at the moment. Must be fixed soon"""
temp_name = tempfile.mktemp()
parameters = {}
parameters["sample_inc"] = disf
parameters["running_mode"] = ("monoprocessor",)
parameters["running_mode"] = ("single-core",)
parameters["instrument_resolution"] = ("Ideal", {})
parameters["output_files"] = (temp_name, ("MDAFormat",))
ndtsf = IJob.create("StructureFactorFromScatteringFunction")
Expand All @@ -203,7 +197,7 @@ def test_ccf(qvector_spherical_lattice):
parameters["interpolation_mode"] = "automatic"
parameters["output_files"] = (temp_name, ("MDAFormat",))
parameters["q_vectors"] = qvector_spherical_lattice
parameters["running_mode"] = ("monoprocessor",)
parameters["running_mode"] = ("single-core",)
parameters["trajectory"] = short_traj
parameters["weights"] = "b_coherent"
ndtsf = IJob.create("CurrentCorrelationFunction")
Expand Down

0 comments on commit dc6dc0d

Please sign in to comment.