<jupyter_start><jupyter_text>The pycoco SNClass___This is the workhorse class for manipulating the data in and out of CoCo<jupyter_code>%matplotlib notebook
from matplotlib import pyplot as plt

import os
import numpy as np
from astropy.table import Table

import pycoco as pcc
sn = pcc.classes.SNClass('SN2007uy')
sn.name<jupyter_output><empty_output><jupyter_text>Photometry<jupyter_code>sn.load_phot( path = os.path.join(pcc.defaults._default_data_dir_path,"lc/SN2007uy.dat"), verbose = True)
sn.phot.data
sn.phot.plot()
sn.plot_lc()
sn.phot.save(filename="SN2007uy_test.dat", path=os.curdir)<jupyter_output>has data
./SN2007uy_test.dat
['BessellB', 'BessellV', 'SDSS_r', 'SDSS_i']
Writing ./SN2007uy_test.dat<jupyter_text>Spectra<jupyter_code>sn.load_list(os.path.join(pcc.defaults._default_list_dir_path, sn.name+".list"))
sn.load_spec()
sn.plot_spec()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12514092446448705, 'fraction_numerical': 0.02254791431792559, 'mean_word_length': 7.88, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '655541', 'license': 'MIT', 'n_tokens_mistral': 373, 'n_tokens_neox': 348, 'n_words': 60, 'path': 'notebooks/Tutorials/3 - pycoco_SNClass.ipynb', 'repo_name': 'RobFirth/pycoco', 'size': '887'}