<jupyter_start><jupyter_text>Once you've downloaded the reference files from dropbox to a folder set the path to that folder here. No need to unzip them.<jupyter_code>soss_read_refs.PATH = '/home/talens-irex/Dropbox/SOSS_Ref_Files'<jupyter_output><empty_output><jupyter_text>Example: how to use the trace table.<jupyter_code>reference = soss_read_refs.RefTraceTable()
wavelenghts, y = reference('Y', subarray='SUBSTRIP96')
wavelenghts, x = reference('X', subarray='SUBSTRIP96')
plt.subplot(111, aspect='equal')
plt.plot(x, y)
plt.xlim(0, 2047)
plt.ylim(0, 95)
wavelengths = np.linspace(2, 3, 101)
wavelengths, troughput = reference('THROUGHPUT', wavelengths=wavelengths, order=2)
plt.plot(wavelengths, troughput)
plt.xlabel('Wavelength')
plt.ylabel('Throughput')<jupyter_output><empty_output><jupyter_text>Example: how to use the 2d profile and 2d wavemap.<jupyter_code>reference = soss_read_refs.Ref2dProfile()
profile = reference(order=2)
plt.imshow(profile, origin='lower')<jupyter_output><empty_output><jupyter_text>If you don't want the 2d maps to have their padding removed and binned down to native pixels.<jupyter_code>profile = reference(native=False)
plt.imshow(profile, origin='lower')
reference = soss_read_refs.Ref2dWave()
wavemap = reference(subarray='SUBSTRIP96', offset=[2.3, 3.5])
plt.imshow(wavemap, origin='lower')<jupyter_output><empty_output><jupyter_text>Example: how to use the kernels.<jupyter_code>reference = soss_read_refs.RefKernels()
wavelengths, kernels = reference()
print(wavelengths)
plt.imshow(kernels, origin='lower')<jupyter_output>[[0.5  0.55 0.6  ... 5.1  5.15 5.2 ]
 [0.5  0.55 0.6  ... 5.1  5.15 5.2 ]
 [0.5  0.55 0.6  ... 5.1  5.15 5.2 ]
 ...
 [0.5  0.55 0.6  ... 5.1  5.15 5.2 ]
 [0.5  0.55 0.6  ... 5.1  5.15 5.2 ]
 [0.5  0.55 0.6  ... 5.1  5.15 5.2 ]]
{'fraction_non_alphanumeric': 0.15097493036211698, 'fraction_numerical': 0.06518105849582173, 'mean_word_length': 5.27972027972028, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '542891', 'license': 'MIT', 'n_tokens_mistral': 793, 'n_tokens_neox': 715, 'n_words': 149, 'path': 'SOSS/extract/soss_read_refs.ipynb', 'repo_name': 'njcuk9999/jwst-mtl', 'size': '1795'}