From 9df51828167df0f582079db53711bc8a7b3663a1 Mon Sep 17 00:00:00 2001 From: Garry O'Donnell Date: Tue, 12 Jul 2022 15:01:33 +0000 Subject: [PATCH] Add example to readme --- README.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.rst b/README.rst index 2a3f88da..7bcea913 100644 --- a/README.rst +++ b/README.rst @@ -13,6 +13,30 @@ Documentation https://garryod.github.io/adcorr Releases https://github.com/garryod/adcorr/releases ============== ============================================== +A brief example of performing corrections using the library is presented below: + +.. code:: python + + frames = load_my_frames() + mask = load_my_mask() + count_times = load_count_times() + + frames = mask_frames(frames, mask) + frames = correct_deadtime( + frames, + count_times, + DETECTOR_MINIMUM_PULSE_SEPARATION, + DETECTOR_MINIMUM_ARRIVAL_SEPARATION, + ) + frames = correct_dark_current( + frames, + count_times, + BASE_DARK_CURRENT, + TEMPORAL_DARK_CURRENT, + FLUX_DEPENDANT_DARK_CURRENT, + ) + ... + .. |code_ci| image:: https://github.com/garryod/adcorr/workflows/Code%20CI/badge.svg?branch=main :target: https://github.com/garryod/adcorr/actions?query=workflow%3A%22Code+CI%22 :alt: Code CI