Commit 596da333 authored by Bryce Hepner's avatar Bryce Hepner

deleted many files and testing code

parent fe1a66d3
...@@ -595,7 +595,7 @@ ...@@ -595,7 +595,7 @@
], ],
"metadata": { "metadata": {
"kernelspec": { "kernelspec": {
"display_name": "Python 3 (ipykernel)", "display_name": "Python 3.8.10 64-bit",
"language": "python", "language": "python",
"name": "python3" "name": "python3"
}, },
...@@ -610,6 +610,11 @@ ...@@ -610,6 +610,11 @@
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.8.10" "version": "3.8.10"
},
"vscode": {
"interpreter": {
"hash": "916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1"
}
} }
}, },
"nbformat": 4, "nbformat": 4,
......
...@@ -172,10 +172,12 @@ def create_testable_images(images, selected_channel, quantity_of_images): ...@@ -172,10 +172,12 @@ def create_testable_images(images, selected_channel, quantity_of_images):
# average_image = Image.fromarray(average_image) # average_image = Image.fromarray(average_image)
sftp_client.close() sftp_client.close()
def save_new_gauss(): def save_new_gauss():
"""\ """\
creates gaussian kernel with side length `l` and a sigma of `sig` creates gaussian kernel with side length `l` and a sigma of `sig`
""" """
# x,y = np.mgrid[-1:1:.003125, -1:1:.003125] # x,y = np.mgrid[-1:1:.003125, -1:1:.003125]
x,y = np.mgrid[-1:1:.44, -1:1:.44] x,y = np.mgrid[-1:1:.44, -1:1:.44]
print(x.shape) print(x.shape)
......
This diff is collapsed.
...@@ -515,7 +515,7 @@ def text_to_tiff(filename, list_dic, bins): ...@@ -515,7 +515,7 @@ def text_to_tiff(filename, list_dic, bins):
if __name__ == "__main__": if __name__ == "__main__":
scenes = file_extractor("averaged_images(11)") scenes = file_extractor("images")
images = image_extractor(scenes) images = image_extractor(scenes)
newnamesforlater = [] newnamesforlater = []
list_dic, bins = make_dictionary(images, 4, False) list_dic, bins = make_dictionary(images, 4, False)
...@@ -534,16 +534,13 @@ if __name__ == "__main__": ...@@ -534,16 +534,13 @@ if __name__ == "__main__":
newname = images[i][:-5] newname = images[i][:-5]
else: else:
newname = images[i][:-4] newname = images[i][:-4]
# print(newname)
newnamesforlater.append(newname + "_Compressed.txt") newnamesforlater.append(newname + "_Compressed.txt")
with open(newname + "_Compressed.txt", 'wb') as f: with open(newname + "_Compressed.txt", 'wb') as f:
f.write(inletters) f.write(inletters)
file_sizes_new.append((os.path.getsize(newname + "_Compressed.txt"))) file_sizes_new.append((os.path.getsize(newname + "_Compressed.txt")))
file_sizes_old.append((os.path.getsize(images[i]))) file_sizes_old.append((os.path.getsize(images[i])))
# sleep(5)
# if i % 50 == 0:
# print(i)
# sleep(20)
print(file_sizes_new) print(file_sizes_new)
print(file_sizes_old) print(file_sizes_old)
print(np.sum(file_sizes_new)/np.sum(file_sizes_old)) print(np.sum(file_sizes_new)/np.sum(file_sizes_old))
...@@ -551,7 +548,7 @@ if __name__ == "__main__": ...@@ -551,7 +548,7 @@ if __name__ == "__main__":
print(np.sum(file_sizes_new)/np.sum(file_sizes_old)) print(np.sum(file_sizes_new)/np.sum(file_sizes_old))
# list_dic = np.load("first_dic.npy", allow_pickle="TRUE") # list_dic = np.load("first_dic.npy", allow_pickle="TRUE")
bins = [21,32,48] bins = [21,32,48]
# os.system("ls")
# for i,item in enumerate(newnamesforlater): # for i,item in enumerate(newnamesforlater):
# print(item) # print(item)
# image, new_error, diff = huffman(images[i], 4, False) # image, new_error, diff = huffman(images[i], 4, False)
......
This diff is collapsed.
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