<jupyter_start><jupyter_text>Gain<jupyter_code>gain = ((f1m + f2m)-(b1m + b2m)) / (varianceflat-variancebias)
print("The gain is {0:f}".format(gain))<jupyter_output>The gain is 1.192997<jupyter_text>Readnoise<jupyter_code>readnoise = (gain*(variancebias**(1/2)))/ (2**(1/2))
print("Readnoise is {0:f} in ADU".format(readnoise))
print("Readnoise is {0:f} in electrons".format(readnoise*gain))<jupyter_output>Readnoise is 12.126773 in ADU
Readnoise is 14.467206 in electrons<jupyter_text>Linearity<jupyter_code>lineardatafile1 = "./1.5_sec.FIT"
lineardatafile2 = "./3_sec.FIT"
lineardatafile3 = "./6_sec.FIT"
lineardatafile4 = "./12_sec.FIT"
lineardatafile5 = "./15_sec.FIT"
lineardatafile6 = "./18_sec.FIT"
lineardatafile7 = "./24_sec.FIT"
lineardatafile8 = "./30_sec.FIT"
lineardatafile9 = "./36_sec.FIT"
lineardatafile10= "./42_sec.FIT"
lineardatafile11= "./48_sec.FIT"
lineardatafile12= "./54_sec.FIT"
lineardatafile13= "./60_sec.FIT"
lineardatafile14= "./80_sec.FIT"


my_fits1 = fits.open(lineardatafile1)
my_fits2 = fits.open(lineardatafile2)
my_fits3 = fits.open(lineardatafile3)
my_fits4 = fits.open(lineardatafile4)
my_fits5 = fits.open(lineardatafile5)
my_fits6 = fits.open(lineardatafile6)
my_fits7 = fits.open(lineardatafile7)
my_fits8 = fits.open(lineardatafile8)
my_fits9 = fits.open(lineardatafile9)
my_fits10= fits.open(lineardatafile10)
my_fits11= fits.open(lineardatafile11)
my_fits12= fits.open(lineardatafile12)
my_fits13= fits.open(lineardatafile13)
my_fits14= fits.open(lineardatafile14)


flats1 = my_fits1[0].data.mean()
flats2 = my_fits2[0].data.mean()
flats3 = my_fits3[0].data.mean()
flats4 = my_fits4[0].data.mean()
flats5 = my_fits5[0].data.mean()
flats6 = my_fits6[0].data.mean()
flats7 = my_fits7[0].data.mean()
flats8 = my_fits8[0].data.mean()
flats9 = my_fits9[0].data.mean()
flats10= my_fits10[0].data.mean()
flats11= my_fits11[0].data.mean()
flats12= my_fits12[0].data.mean()
flats13= my_fits13[0].data.mean()
flats14= my_fits14[0].data.mean()
x = (1.5,3,6,12,15,18,24,30,36,42,48,54,60,80)
y = (flats1,flats2,flats3,flats4,flats5,flats6,flats7,flats8,flats9,flats10,flats11,flats12,flats13,flats14)
fig, ax = plt.subplots(1,1)

fig.set_size_inches(12,6)

fig.tight_layout()

ax.plot(x,y,c='r')
ax.scatter(x,y)
ax.set_title("Linearity Plot of the CCD")
ax.set_ylabel("Counts")
ax.set_xlabel("Exposure in Seconds");
t = 300
g = 2
R = 6
SB = 604*2
dc = 10/3600
S = 6487*2
ns = 3.14*((30**2)-(20**2))
nl = 3.14*(5**2)

answer = (S/((S + nl*(1+(nl/ns))*(SB + t + dc + R**2))**(1/2)))
answer<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1807843137254902, 'fraction_numerical': 0.1011764705882353, 'mean_word_length': 6.777439024390244, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '217610', 'license': 'MIT', 'n_tokens_mistral': 1315, 'n_tokens_neox': 1174, 'n_words': 159, 'path': 'MichaelHiggins/.ipynb_checkpoints/CCDCode-checkpoint.ipynb', 'repo_name': 'Higgins00/Sp2018', 'size': '2550'}