<jupyter_start><jupyter_text>How do single phases behave ?<jupyter_code>phaseflux = s._flux(0., testwave)
print np.shape(phaseflux)
plt.plot(testwave, phaseflux[0])
s.flux([0.], testwave)
model = sncosmo.Model(source=s)
model.flux(time=[0.], wave=np.arange(5500., 8000., 100))
model = sncosmo.Model(source=s)
model.set(z=0.5)
print (model.minwave(), model.maxwave())
fig, ax = plt.subplots()
ax.plot ( np.arange(5500., 12500, 100), model.flux(time=[0.], wave=np.arange(5500., 12500., 100))[0])
fig, ax = plt.subplots()
ax.plot(np.arange(-5., 10., 1.), 
        model.bandflux(time=np.arange(10.), band=['desr', 'desr','desr'], zp=25., zpsys='ab'),'ko')
#ax.plot(np.arange(-5., 10., 1.), 
#        model.bandflux(time=np.arange(-5., 10., 1.), band=['desi'], zp=25., zpsys='ab'),'rs')
waves = np.arange(4000., 8000.)
plt.plot(waves, s.color_law(waves))
import pandas as pd
df = pd.DataFrame(d, columns=['phase', 'wave', 'M0', 'alpha1', 'alpha2', 'alpha3', 'colorlaw','deltaM'])
df.head()
x = df.query('phase > -0.5 and phase < 0.5')
fig = x.plot(x='wave', y=['M0', 'alpha1', 'alpha2', 'alpha3', 'colorlaw'], 
       layout=(3,3), 
       subplots=True)
plt.plot(s._wave, s.alpha1(0., s._wave)[:, 0])
plt.plot(s._wave, s.color_law(s._wave))
np.shape(s.alpha1(0., s._wave))
np.shape(np.ones(shape=(len(s._wave), len(s._phase))))
np.broadcast_arrays(np.ones)
np.asarray(3)
np.ravel(3)
help(np.ravel)<jupyter_output>Help on function ravel in module numpy.core.fromnumeric:

ravel(a, order='C')
    Return a contiguous flattened array.
    
    A 1-D array, containing the elements of the input, is returned.  A copy is
    made only if needed.
    
    As of NumPy 1.10, the returned array will have the same type as the input
    array. (for example, a masked array will be returned for a masked array
    input)
    
    Parameters
    ----------
    a : array_like
        Input array.  The elements in `a` are read in the order specified by
        `order`, and packed as a 1-D array.
    order : {'C','F', 'A', 'K'}, optional
    
        The elements of `a` are read using this index order. 'C' means
        to index the elements in row-major, C-style order,
        with the last axis index changing fastest, back to the first
        axis index changing slowest.  'F' means to index the elements
        in column-major, Fortran-style order, with the
        first index changing fastest, and the last index[...]
{'fraction_non_alphanumeric': 0.17681159420289855, 'fraction_numerical': 0.039337474120082816, 'mean_word_length': 3.4823747680890538, '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': '610214', 'license': 'MIT', 'n_tokens_mistral': 955, 'n_tokens_neox': 870, 'n_words': 248, 'path': 'TasteSugar.ipynb', 'repo_name': 'rbiswas4/Add_sugar', 'size': '2415'}