Skip to content

Commit 7f8a0cf

Browse files
fix import of compress
1 parent 463d148 commit 7f8a0cf

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

autobackgroundmodel/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import json
1111
import tqdm
1212

13-
import compress
13+
from . import compress
1414

1515

1616
def compile(filenames):

autobackgroundmodel/compress.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,10 @@ def pca_check(M, U, s, V, mean):
4040
print("Using %d PCs, MSE = %.6G" % (len(s), numpy.mean((M - Mhat2)**2)))
4141
return M - Mhat2
4242

43-
def run(cmd, filename):
43+
def run(cmd, filename, mincts = 50000):
4444
f = h5py.File(filename, 'r')
4545
attrs = f['spectra'].attrs
4646
data = f['spectra'][()]
47-
mincts = 50000
48-
#mincts = 10000
4947

5048
if cmd == 'create':
5149
lo = data.min(axis=0)
@@ -168,9 +166,6 @@ def run(cmd, filename):
168166
plt.plot(cts[i,:], '-', color='r', alpha=0.5)
169167
plt.show()
170168

171-
#diff = (counts * cts.sum(axis=0).reshape(1,-1) - cts) / (cts + 1)
172-
#print 'largest ratio: %.3f' % numpy.abs(diff).max()
173-
174169

175170
if __name__ == '__main__':
176171
filename = sys.argv[2]

0 commit comments

Comments
 (0)