1 | #Ref test for DOS |
---|
2 | import os |
---|
3 | import numpy as np |
---|
4 | |
---|
5 | #location of perl script on disk |
---|
6 | dos_file_path = '/home/chs18285/Documents/dos/dos.pl' |
---|
7 | #location of input file on disk |
---|
8 | input_file_path = '/home/chs18285/Documents/dos/squaricn.phonon' |
---|
9 | |
---|
10 | def readLogFile(wsName): |
---|
11 | fname = "log.txt" |
---|
12 | dataX, dataY = np.loadtxt(fname, unpack=True) |
---|
13 | return CreateWorkspace(DataX=dataX, DataY=dataY, OutputWorkspace=wsName + "_refdata") |
---|
14 | |
---|
15 | os.system("perl %s %s > log.txt" % (dos_file_path, input_file_path)) |
---|
16 | ws = readLogFile("DOS") |
---|
17 | |
---|
18 | os.system("perl %s -ir %s > log.txt" % (dos_file_path, input_file_path)) |
---|
19 | ws = readLogFile("IR") |
---|
20 | |
---|
21 | os.system("perl %s -raman %s > log.txt" % (dos_file_path, input_file_path)) |
---|
22 | ws = readLogFile("Raman") |
---|