{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Tutorial 4: Data with errors\n", "\n", "This tutorial will talk about how to treat data with errors.\n", "\n", "**NOTE FOR CONTRIBUTORS: Always clear all output before committing (``Cell`` > ``All Output`` > ``Clear``)**!" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Magic\n", "%matplotlib inline\n", "# Reload modules whenever they change\n", "%load_ext autoreload\n", "%autoreload 2\n", "\n", "# Make clusterking package available even without installation\n", "import sys\n", "sys.path = [\"../../\"] + sys.path" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import clusterking as ck\n", "import numpy as np" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Loading the data created in Tutorial 1, this time as a ``DataWithErrors`` object (which has additional methods to add errors)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "dwe = ck.DataWithErrors(\"output/tutorial_basics.sql\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Adding errors" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "dwe.add_err_poisson(500)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
dwe.add_err_...
(or dwe.add_rel_err_...
) cells more than once, or the error gets added multiple times!\n",
"