<jupyter_start><jupyter_text>deeptrack.sequencesThis example introduces the module deeptrack.sequences.  1. What is a sequence?Sequences are lists of images, where any image in the series may depend on previous images. They can be used to create videos. They can also be used to resolve the same feature-set several times, changing only a subset of the properties of the features; an example would be imaging a sample at several focal planes.To resolve a sequence, you create an instance of the feature `Sequence`, with the feature you want to resolve as the first input, and `sequence_length` as a second input. By default, properties remain constant in a series. This means that each step in the sequence is by default the same.To make the properties change, you should call the function `Sequential` with the feature you want to change during the sequence as the first input, and a set of functions as keyword arguments. These functions will be converted to instances of `SequentialProperty`, which behave similarly to regular properties. For more information about how sequential properties work, see [properties_example.ipynb](properties_example.ipynb).  2. Setup<jupyter_code>import numpy as np

from deeptrack.optics import Fluorescence
from deeptrack.scatterers import Ellipse
from deeptrack.sequences import Sequential, Sequence<jupyter_output><empty_output><jupyter_text>3. Example - A rotating ellipse<jupyter_code>optics = Fluorescence(
    NA=0.6,
    magnification=10,
    resolution=1e-6,
    wavelength=633e-9,
    output_region=(0, 0, 32, 32),
)

ellipse = Ellipse(
    position_unit="pixel",
    position=(16, 16),
    intensity=1,
    radius=(1.5e-6, 1e-6),
    rotation=0, # This will be the value at time 0.
    upsample=2
)

def get_rotation(sequence_length, previous_value):
    return previous_value + 2*np.pi / sequence_length


rotating_ellipse = Sequential(ellipse, rotation=get_rotation)    

imaged_rotating_ellipse = optics(rotating_ellipse)

imaged_rotating_ellipse_sequence = Sequence(imaged_rotating_ellipse, sequence_length=50)

imaged_rotating_ellipse_sequence.plot()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.06425891181988742, 'fraction_numerical': 0.016416510318949345, 'mean_word_length': 5.2368421052631575, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '257866', 'license': 'MIT', 'n_tokens_mistral': 633, 'n_tokens_neox': 607, 'n_words': 237, 'path': 'examples/sequences_example.ipynb', 'repo_name': 'agtaon/DeepTrack-2.0', 'size': '2132'}