Commit ac1c6cef authored by Hannah Middleton's avatar Hannah Middleton
Browse files

the ascii script will now make results directories itself if they dont exist already

parent cd1a37a1
......@@ -61,7 +61,7 @@ def runningARLS(fileName,order,filteredResultsDir='./',scaleReference=1.,lambd=0
wLength=10240
if ki/wLength == ki//wLength and ki!=0:
np.savetxt('{0}/weights/adap_{1}.txt'.format(filteredResultsDir,ki), adap)
np.savetxt('{0}/filter/adap_{1}.txt'.format(filteredResultsDir,ki), adap)
#plt.clf()
#plt.bar(np.arange(0,len(adap),1), adap)
#plt.savefig('{0}/weights/weights_checking-{1}.png'.format(filteredResultsDir,ki))
......
......@@ -7,7 +7,7 @@ Need to adapt to read in frame files for real LIGO data
"""
import argparse
import os
import arlsASCII
def getCommandLineArguments():
......@@ -36,16 +36,20 @@ def getCommandLineArguments():
def main():
# command line arguments
# setup for the filter
args = getCommandLineArguments()
# command line arguments
unfilteredData = args.dataFileToFilter
order = args.order
resultsLocation = args.filtedResultsDir
# if the results directory does not exist, this will make it
if not os.path.exists(resultsLocation):
os.makedirs(resultsLocation)
if not os.path.exists(resultsLocation+'/filter'):
os.makedirs(resultsLocation+'/filter')
print("running the ARLS...")
arlsASCII.runningARLS(unfilteredData, order, filteredResultsDir=resultsLocation, scaleReference=args.refScalingFactor,lambd=args.lambd)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment