<jupyter_start><jupyter_text>This is an example notebook demonstrating the process of opening a single CMOST FITS file, displaying its properties and plotting the frames.<jupyter_code>import sys
sys.path.append('..')
from cmost_exposure import Exposure

import numpy as np
import matplotlib
import matplotlib.pyplot as plt

font = {'size' : 14, 'family' : 'sans-serif'}
matplotlib.rc('font', **font)

data_dir = '../data'
# Load exposure from its filepath
ex = Exposure('{}/100720/cmost001_20201007031546.fits'.format(data_dir),cleanup=False)
#ex = Exposure('{}/012621/cmostjpl006_20210127043652.fits'.format(data_dir),cleanup=False)

print(ex.get_info())
# Plot the raw image
plt.figure(figsize=[16,5])
plt.imshow(ex.raw_frames[0])
plt.colorbar(fraction=0.05, aspect=15, shrink=0.75)
plt.savefig('plots/20210203_raw_image.pdf')
plt.show()
plt.close()
# Plot the CDS image
plt.figure(figsize=[9,5])
plt.imshow(ex.cds_frames[0])
plt.colorbar(fraction=0.05, aspect=15, shrink=0.85)
plt.savefig('plots/20210203_cds_image.pdf')
plt.show()
plt.close()
# Histogram of pixel values
hist, bin_edges = np.histogram(ex.cds_frames[0], bins=100, range=(-5000,30000))
# Histogram of pixel values
plt.figure(figsize=[14,5])
plt.bar(bin_edges[:-1],hist,width=0.8*(bin_edges[1]-bin_edges[0]),align="edge")
plt.savefig('plots/20210203_histogram.pdf')
plt.show()
plt.close()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15873015873015872, 'fraction_numerical': 0.0836940836940837, 'mean_word_length': 7.158823529411765, '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': '584467', 'license': 'MIT', 'n_tokens_mistral': 620, 'n_tokens_neox': 520, 'n_words': 99, 'path': 'notebooks/20210203_View_CMOST_image.ipynb', 'repo_name': 'bwgref/cmost-analysis', 'size': '1386'}