Okay, this works for me on MacOS. It seems you need to either set the “Default Save Directory” in File > ManageUserDirectories or define the full path to save. Can you try this script (but obviously use the correct path for your machine):
# import mantid algorithms, numpy and matplotlib
from mantid.simpleapi import *
import matplotlib.pyplot as plt
import numpy as np
DeltaPDF3D_MDE = CreateMDWorkspace(Dimensions='3', Extents='-3.1,3.1,-3.1,3.1,-0.1,0.1', Names='[H,0,0],[0,K,0],[0,0,L]',
Units='rlu,rlu,rlu', SplitInto='4',Frames='HKL,HKL,HKL')
# Add some Bragg peaks
for h in range(-3,4):
for k in range(-3,4):
FakeMDEventData(DeltaPDF3D_MDE, PeakParams='100,'+str(h)+','+str(k)+',0,0.01', RandomSeed='1337')
# Add addiontal peaks on [0.5,0.5,0.5] type positions
# This would correspond to negative substitutional correlations
for h in [-2.5,-1.5,-0.5,0.5,1.5,2.5]:
for k in range(-3,4):
FakeMDEventData(DeltaPDF3D_MDE, PeakParams='20,'+str(h)+','+str(k)+',0,0.1', RandomSeed='13337')
BinMD(InputWorkspace='DeltaPDF3D_MDE', AlignedDim0='[H,0,0],-3.05,3.05,61', AlignedDim1='[0,K,0],-3.05,3.05,61',
AlignedDim2='[0,0,L],-0.1,0.1,1', OutputWorkspace='DeltaPDF3D_MDH')
DeltaPDF3D(InputWorkspace='DeltaPDF3D_MDH',OutputWorkspace='fft_4',IntermediateWorkspace='int_4',
Method='Punch and fill',Size=0.3,CropSphere=True,SphereMax=3,Convolution=True, WindowFunction='None')
SaveMD(Filename='/Users/danielmurphy/Desktop/fft_4.h5', InputWorkspace='fft_4')
SaveMD(Filename='/Users/danielmurphy/Desktop/int_4.h5', InputWorkspace='int_4')