<jupyter_start><jupyter_text>Main<jupyter_code>demdata = pd.read_csv('suvi_trf_rad.txt', delimiter = ' \t ', engine = "python")
print(demdata.keys())
demdata.columns = [0, 1, 2, 3, 4, 5, 6] #reassigns the column titles by their indicies 
print(demdata.keys())
lgt=list(map(lambda x: np.log10(x), list(demdata[0][x] for x in list(map(lambda x: x*4 + 72, np.arange(0,21)))))) 
print('graphing SUVI response functions')
response([demdata[1].tolist(),
          demdata[2].tolist(), 
          demdata[3].tolist(), 
          demdata[4].tolist(), 
          demdata[5].tolist(), 
          demdata[6].tolist()],list(map(lambda x: np.log10(x), demdata[0]))) 
resp = np.zeros((21, 4))
for i in range(4): 
    for x, j in zip(list(map(lambda x: x*4 + 72, np.arange(0, 21))),  range(21)):
        resp[j][i] = demdata[demdata.columns[i+1]][x]*100 #not sure if necessary
locations = 0
Dict = linear_alg(resp, lgt) # [63, 4] matrix
img94  = fits.open('SUVI_Composite_094_2017_09_10.fits')
img131 = fits.open('SUVI_Composite_131_2017_09_10.fits')
img171 = fits.open('SUVI_Composite_171_2017_09_10.fits')
img195 = fits.open('SUVI_Composite_195_2017_09_10.fits')
img = np.array([img94[0].data*100, img131[0].data*100, img171[0].data*100, img195[0].data*100])
tolfac = 0.1 # originaly 1.4
em, nimg  = DEM_solve(img, Dict, lgt, tolfac, locations)
wide,height,layer = np.shape(nimg)
np.shape(img)
for ik in range(layer):
    fig = plt.figure(figsize=(10,6),dpi=80)
    ax1 = fig.add_subplot(121)
    cax1 = ax1.imshow(img[ik, :, :]**0.25, origin='lower', cmap='hot')
    ax2 = fig.add_subplot(122)
    cax2 = ax2.imshow(nimg[:, :, ik]**0.25, origin='lower', cmap='jet')
    #ax1.set_title('Observed {}'.format(fwvs[ik]))
    #ax2.set_title('Simulated {}'.format(fwvs[ik]))
    #ax1.set_xticklabels([])
    #ax1.set_yticklabels([])
    #ax2.set_xticklabels([])
    #ax2.set_yticklabels([])
    ax2.set_xlim(wide/2-80,wide/2+80)
    ax2.set_ylim(wide/2-80,wide/2+80)
    fig.colorbar(cax1, ax = ax1)
    fig.colorbar(cax2, ax = ax2)
    plt.show()
#animate(em)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.19401544401544402, 'fraction_numerical': 0.0859073359073359, 'mean_word_length': 4.542780748663102, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '371416', 'license': 'MIT', 'n_tokens_mistral': 980, 'n_tokens_neox': 880, 'n_words': 145, 'path': 'notebookDEM.ipynb', 'repo_name': 'vlslv/PythonDEM', 'size': '2072'}