<jupyter_start><jupyter_text>Phot Files<jupyter_code>fname = os.path.join(oldDir, 'LSST_Ia_PHOT.FITS')
data = Table.read(fname)
phot1 = data.to_pandas()
phot1.FLT = phot1.FLT.apply(lambda x: x.strip())
phot1 = phot1.query('FLT != "-"')
fname = os.path.join(newDir, 'LSST_Ia_PHOT.FITS')
data = Table.read(fname)
phot2 = data.to_pandas()
phot2.FLT = phot2.FLT.apply(lambda x: x.strip())
phot2 = phot2.query('FLT != "-"')
fig, ax = plt.subplots(2, 3)
_ = phot1.query('MAG > 15 and MAG < 50').hist('MAG', by='FLT', bins=np.arange(18, 40, 2), ax=ax,
                                          **{'histtype':'step', 
                                                                                         'normed':True, 
                                                                                         'lw':2,
                                                                                         #'ls': 'dashed',
                                                                                         'color':'k',
                                                                                          'alpha':1})
#ax[0,0].hist(phot1.query('FLT == "g "').MAG)
_ = phot2.query('MAG > 15 and MAG < 50').hist('MAG', by='FLT', bins=np.arange(18, 40, 2),ax=ax,
                                                                                        **{'histtype':'step', 
                                                                                         'normed':True, 
                                                                                         'lw':2,
                                                                                         'ls':'dashed',
                                                                                         'color':'r',
                                                                                          'alpha':1})
for axs in ax[-1]:
    axs.set_xlabel('MAG')
fig, ax = plt.subplots(2, 3)
_ = phot1.query('MAG > 15 and MAG < 50').hist('MAGERR', by='FLT', bins=np.arange(0., 2., 0.1), ax=ax,
                                          **{'histtype':'step', 
                                                                                         'normed':True, 
                                                                                         'lw':2,
                                                                                          #'log':True,
                                                                                         #'ls': 'dashed',
                                                                                         'color':'k',
                                                                                          'alpha':1})
#ax[0,0].hist(phot1.query('FLT == "g "').MAG)
_ = phot2.query('MAG > 15 and MAG < 50').hist('MAGERR', by='FLT', bins=np.arange(0., 2., 0.1),ax=ax,
                                                                                        **{'histtype':'step', 
                                                                                         'normed':True,
                                                                                          #'log':True,
                                                                                         'lw':2,
                                                                                         'ls':'dashed',
                                                                                         'color':'r',
                                                                                          'alpha':1})
for axs in ax[-1]:
    axs.set_xlabel('MAGERR')
fig, ax = plt.subplots(2, 3)
_ = phot1.query('MAG > 15 and MAG < 50').hist('MAGERR', by='FLT', bins=np.arange(0., 2., 0.1), ax=ax,
                                          **{'histtype':'step', 
                                                                                         'normed':True, 
                                                                                         'lw':2,
                                                                                          #'log':True,
                                                                                         #'ls': 'dashed',
                                                                                         'color':'k',
                                                                                          'alpha':1})
#ax[0,0].hist(phot1.query('FLT == "g "').MAG)
_ = phot2.query('MAG > 15 and MAG < 50').hist('MAGERR', by='FLT', bins=np.arange(0., 2., 0.1),ax=ax,
                                                                                        **{'histtype':'step', 
                                                                                         'normed':True,
                                                                                          #'log':True,
                                                                                         'lw':2,
                                                                                         'ls':'dashed',
                                                                                         'color':'r',
                                                                                          'alpha':1})
for axs in ax[-1]:
    axs.set_xlabel('MAGERR')
phot1['SNR'] = phot1['FLUXCAL'] / phot1['FLUXCALERR']
phot2['SNR'] = phot2['FLUXCAL'] / phot2['FLUXCALERR']
fig, ax = plt.subplots(2, 3)
_ = phot1.query('SNR >=0.').hist('SNR', by='FLT', ax=ax, 
                             **{'histtype':'step', 'lw':2, 'color':'k', 'alpha':1., 'bins':np.arange(0., 50., 1)})
_ = phot2.query('SNR >=0.').hist('SNR', by='FLT', ax=ax, 
                             **{'histtype':'step', 'lw':2, 'color':'r', 'ls':'dashed',
                                'alpha':1., 'bins':np.arange(0., 50., 1)})

for axs in ax:
    for axl in axs:
        _ = axl.set_xlim(0., 10.)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12265248462689048, 'fraction_numerical': 0.020442080771148414, 'mean_word_length': 0.5414959016393442, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 154, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '171136', 'license': 'MIT', 'n_tokens_mistral': 1287, 'n_tokens_neox': 1166, 'n_words': 206, 'path': 'examples/CheckingDataSims.ipynb', 'repo_name': 'rbiswas4/DataQualityChar', 'size': '6017'}