{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Filtering\n", "\n", "Event filtering refers to the process of removing or extracting a subset of events based on some criterion such as the temperature of the measured sample at the time an event was detected.\n", "Scipp's binned data can be used for this purpose.\n", "\n", "Below, we describe two cases.\n", "In the simple case the data contains the required coordinate and `sc.bin` can be used directly.\n", "In the more complex case metadata requires preprocessing, and generally there are three steps to take:\n", "\n", "1. Preprocess the metadata used for filtering.\n", " For example, a noisy time series of temperature values needs to converted into a series of time intervals with a fixed temperature value within the interval.\n", " This process might involve defining thresholds and tolerances or interpolation methods between measured temperature values.\n", "2. Map event timestamps to temperature values.\n", "3. Filter data based on temperature values.\n", "\n", "## Preparation\n", "\n", "We create some fake data for illustration purposes." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "