CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Avatar for Testing 18.04.

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

| Download
Project: Testing 18.04
Views: 731
Kernel: Python 3 (Ubuntu Linux)

Python 3 SEP

import numpy as np import matplotlib.pyplot as plt from astropy.io import fits fits_image_filename = fits.util.get_testdata_filepath('test0.fits')
fits_image_filename
'/usr/local/lib/python3.5/dist-packages/astropy/io/fits/tests/data/test0.fits'
data2 = fits.open(fits_image_filename)
data =data2[-3].data
m, s = np.mean(data), np.std(data) plt.imshow(data, interpolation='nearest', cmap='gray', vmin=m-s, vmax=m+s, origin='lower') plt.colorbar();
Image in a Jupyter notebook
import sep
data_sep = data.byteswap().newbyteorder().astype('float') bkg = sep.Background(data_sep)
m, s = np.mean(bkg), np.std(bkg) plt.imshow(bkg, interpolation='nearest', cmap='gray', vmin=m-s, vmax=m+s, origin='lower') plt.colorbar();
Image in a Jupyter notebook