Commit 824f26de authored by Bryce Hepner's avatar Bryce Hepner

big code run

parent 5d150231
...@@ -56,14 +56,14 @@ information_array = np.zeros((len(images),3)) ...@@ -56,14 +56,14 @@ information_array = np.zeros((len(images),3))
def celcius_to_kelvin(celcius): def celcius_to_kelvin(celcius):
return celcius + 273.15 return celcius + 273.15
for i in range(1000): for i in range(len(images)):
image_array = np.array(Image.open(sftp_client.open(images[i]))).astype(np.uint16) image_array = np.array(Image.open(sftp_client.open(images[i]))).astype(np.uint16)
current_frame_count = intarray_to_uint32(repopulate_array_with_bitstring(uint16_array_to_bitstring(image_array[0]))[84:88]) current_frame_count = intarray_to_uint32(repopulate_array_with_bitstring(uint16_array_to_bitstring(image_array[0]))[84:88])
frame_count_at_FFC = intarray_to_uint32(repopulate_array_with_bitstring(uint16_array_to_bitstring(image_array[0]))[88:92]) frame_count_at_FFC = intarray_to_uint32(repopulate_array_with_bitstring(uint16_array_to_bitstring(image_array[0]))[88:92])
# signaltonoise.append(1/np.std(image_array[1:])) # signaltonoise.append(1/np.std(image_array[1:]))
information_array[i,0] = current_frame_count - frame_count_at_FFC information_array[i,0] = current_frame_count - frame_count_at_FFC
# information_array[i,-1] = 1/np.std(image_array[1:]) # information_array[i,-1] = 1/np.std(image_array[1:])
information_array[i,-1] = mean_squared_error(gaussian_filter(image_array[1:],sigma=.2),image_array[1:]) information_array[i,-1] = mean_squared_error(gaussian_filter(image_array[1:],sigma=.4),image_array[1:])
# print(repopulate_array_with_bitstring(uint16_array_to_bitstring(image_array[0]))[76:77]) # print(repopulate_array_with_bitstring(uint16_array_to_bitstring(image_array[0]))[76:77])
# print("start") # print("start")
information_array[i,1] = intarray_to_uint32(repopulate_array_with_bitstring(uint16_array_to_bitstring(image_array[0]))[94:96]) - \ information_array[i,1] = intarray_to_uint32(repopulate_array_with_bitstring(uint16_array_to_bitstring(image_array[0]))[94:96]) - \
...@@ -91,8 +91,8 @@ plt.legend() ...@@ -91,8 +91,8 @@ plt.legend()
plt.xlabel("Frame_Spacing") plt.xlabel("Frame_Spacing")
plt.ylabel("Signal_to_Noise") plt.ylabel("Signal_to_Noise")
plt.show() plt.show()
print(np.max(information_array[:,0])) # print(np.max(information_array[:,0]))
print(information_array[-5:-1,0]) # print(information_array[-5:-1,0])
X = sm.add_constant(information_df.drop(["Signal_to_Noise"],axis=1)) X = sm.add_constant(information_df.drop(["Signal_to_Noise"],axis=1))
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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