Commit 1054b22f authored by Anchal Gupta's avatar Anchal Gupta

Fixed filesDir error

parent dc33c180
......@@ -31,10 +31,8 @@ def beatnoteSpecPlot(filesDir=None, savedEstPSDs=None,
cwd = os.getcwd()
if filesDir is not None:
os.chdir(filesDir)
else:
filesDir=''
fl = os.listdir(filesDir)
fl = os.listdir()
BNspecList = []
for fn in fl:
if fn.find('BeatnoteSpectrum_') == 0:
......@@ -47,7 +45,6 @@ def beatnoteSpecPlot(filesDir=None, savedEstPSDs=None,
except BaseException:
inst = 'Moku'
BNspecList += [[fn, np.loadtxt(fn), temp['detector'], inst]]
os.chdir(cwd)
BNspecList.sort(key=fnTomktime)
nosbud = noiseBudget(lightInit=True)
toPlot = []
......@@ -122,12 +119,9 @@ def beatnoteSpecPlot(filesDir=None, savedEstPSDs=None,
if unverified:
ax.text(100, 100,'UNVERIFIED', fontsize=50, color='gray', ha='center',
va='bottom', alpha=0.5)
asdPlot1.savefig(asdPlot1Name,
facecolor=asdPlot1.get_facecolor(),
bbox_inches='tight')
for ind in range(-3,0):
fn = BNspecList[ind][0]
nosbud.loadASD(filesDir + fn,
nosbud.loadASD(fn,
label = fnToLabel(fn),
key = 'latest'+str(-1*ind))
toPlot += ['latest1', 'latest2', 'latest3']
......@@ -140,6 +134,10 @@ def beatnoteSpecPlot(filesDir=None, savedEstPSDs=None,
if unverified:
ax.text(100, 100,'UNVERIFIED', fontsize=50, color='gray', ha='center',
va='bottom', alpha=0.5)
os.chdir(cwd)
asdPlot1.savefig(asdPlot1Name,
facecolor=asdPlot1.get_facecolor(),
bbox_inches='tight')
asdPlot2.savefig(asdPlot2Name,
facecolor=asdPlot2.get_facecolor(),
bbox_inches='tight')
......
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