{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Usual Tips & Tricks\n", "We loosely group here a few code lines that are relevant and useful throughout the analysis." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Initializaion of the notebooks\n", "We detail here the header we start almost all our notebooks with.\n", "\n", "#### Imports" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "#useful to make plots editable in the notebook; should not be used in a regular script\n", "%matplotlib notebook \n", "\n", "#To avoid typing the main path each time\n", "from sitelle.constants import FITS_DIR\n", "\n", "#We prefer our implementation of the SpectralCube\n", "from sitelle.process import SpectralCubePatch as SpectralCube" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Loading\n", "The datacubes are not calibrated by default. Calibration should be performed by the suer and respecified each time we launch a new instance of the cube." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "SN2_ORCS = SpectralCube(FITS_DIR/'orig/M31_SN2.merged.cm1.1.0.hdf5')\n", "#Astrometric calibration level 1 and 2:\n", "SN2_ORCS.set_wcs(FITS_DIR/'M31_SN2.1.0.ORCS/M31_SN2.1.0.wcs.deep_frame.fits')\n", "#Astrometric calibration level 3:\n", "SN2_ORCS.set_dxdymaps(FITS_DIR/'M31_SN2.1.0.ORCS/M31_SN2.1.0.wcs.dxmap.fits',\n", " FITS_DIR/'M31_SN2.1.0.ORCS/M31_SN2.1.0.wcs.dymap.fits')\n", "#Wavelength calibration\n", "SN2_ORCS.correct_wavelength(FITS_DIR/'M31_SN2.1.0.ORCS/M31_SN2.1.0.skymap.fits')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Usage of the plot methods" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Usage of the parallelization" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "celltoolbar": "Raw Cell Format", "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.14" } }, "nbformat": 4, "nbformat_minor": 2 }