<jupyter_start><jupyter_text>code review- PEP8 compliance - spaces around operators FIXED- dont use list use arrays when size is predetermined FIXED- moved lines that do not depend on ff out of the ffs loop FIXED- your fist savefig statement returned an error cause fig is not defined FIXED- put counter so user knows how long its gonna be FIXED- plot the firse derived product first, leff first then r which depends on leff FIXED<jupyter_code>%matplotlib inline

import numpy as np
from utils import *
import matplotlib.pyplot as plt
from mdwarf_interp import mdwarf_interp
mdwarf_interp('m5.all.na.k.fits', plotit=True)
plt.plot(WAVELENGTH, make_bb(WAVELENGTH, 2800, normed=1.6e22))

import numpy as np
from utils import *

filters = ['u', 'g', 'r', 'i', 'z', 'y']

#weff = np.array([lamb_eff_BB(band="g", temp=t, verbose=False) for t in range(100,100000,1000)])
weff = np.array([lamb_eff(band=f, verbose=False) for f in filters])
plt.plot(dcr_offset(weff, airmass = 1.4))
plt.xlabel("filters")
plt.xticks(range(6), labels=["u","g","r","i","z","y"])
plt.title("flat spectrum u,g,r,i,z,y");
print("in R DCR should be 57.1 arcsec: ", dcr_offset(weff[2], airmass = 1.4))
weff = np.array([lamb_eff_BB(band=f, temp=3000, verbose=False) for f in filters])
plt.plot(dcr_offset(weff, airmass = 1.4))
plt.ylabel("DCR arcsec")
plt.xlabel("filters")
plt.xticks(range(6), labels=["u","g","r","i","z","y"])
plt.title("blackbody at temperatures 3000m u,g,r,i,z,y");
print("DCR in r should be ")
weff = np.array([lamb_eff_BB(band="g", temp=t, verbose=False) 
                 for t in range(3000,10000,1000)])
plt.plot(range(3000,10000,1000), dcr_offset(weff, airmass = 1.4))
plt.ylabel("DCR arcsec")
plt.xlabel("BB temperature")
plt.title("blackbody at temperatures 3000-10000K g band");
weff = np.array([lamb_eff_BB(band="i", temp=t, verbose=False) 
                 for t in range(3000,10000,1000)])
plt.plot(dcr_offset(weff, airmass = 1.4))
plt.ylabel("DCR arcsec")
plt.xlabel("BB temperature")
plt.title("blackbody at temperatures 3000-10000K i band");
w_eff1 = np.array([md_lamb_eff(band=f, temp=3000, mdname='m5.all.na.k.fits', ff=0)  
                  for f in filters])
w_eff2 = np.array([lamb_eff_BB(band=f, temp=2800,)  
                  for f in filters])
plt.plot(dcr_offset(w_eff1, airmass = 1.4), label="BB")
plt.plot(dcr_offset(w_eff2, airmass = 1.4), '--', label="MD")
plt.ylabel("DCR arcsec")
plt.xlabel("filters")
plt.xticks(range(6), labels=["u","g","r","i","z","y"])
plt.title("blackbody at temperatures 2800m  normalized \nMD spectrum no BB added");
w_eff = np.array([md_lamb_eff(band='g', temp=t, mdname='m5.all.na.k.fits', ff=0.2)  
                   for t in range(3000,10000,1000)])
plt.plot(range(3000,10000,1000), dcr_offset(w_eff, airmass = 1.4))
plt.ylabel("DCR arcsec")
plt.xlabel("BB temperature")
plt.title("blackbody at temperatures 3000-10000m  over MD spectrum");<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16615279205207262, 'fraction_numerical': 0.05721137375813635, 'mean_word_length': 5.186440677966102, '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': '442701', 'license': 'MIT', 'n_tokens_mistral': 1251, 'n_tokens_neox': 1093, 'n_words': 274, 'path': 'testing_nb_FBB.ipynb', 'repo_name': 'RileyWClarke/flarubin', 'size': '2919'}