<commit_before>"""Coupling Measurement from Minimal Tune Separation."""

import sys as _sys
import os as _os
import time as _time
import logging as _log

import numpy as _np
from scipy.optimize import least_squares
import matplotlib.pyplot as _plt
import matplotlib.gridspec as _mpl_gs

from siriuspy.devices import PowerSupply, Tune

from ..utils import ThreadedMeasBaseClass as _BaseClass, \
    ParamsBaseClass as _ParamsBaseClass

# _log.basicConfig(format=)
root = _log.getLogger()
root.setLevel(_log.INFO)

handler = _log.StreamHandler(_sys.stdout)
handler.setLevel(_log.INFO)
formatter = _log.Formatter('%(levelname)7s ::: %(message)s')
handler.setFormatter(formatter)
root.addHandler(handler)


class CouplingParams(_ParamsBaseClass):
    """."""

    QUADS = (
        'QFB', 'QFA', 'QDB1', 'QDB2', 'QFP',
        'QDB1', 'QDB2', 'QDP1', 'QDP2', 'QDA',
        'Q1', 'Q2', 'Q3', 'Q4')

    def __init__(self):
        """."""
        super().__init__()
        self._quadfam_name = 'QFB'
        self.nr_points = 21
        self.time_wait = 5  # s
        self.neg_percent = 0.1/100
        self.pos_percent = 0.1/100
        self.coupling_resolution = 0.02/100

    @property
    def quadfam_name(self):
        """."""
        return self._quadfam_name

    @quadfam_name.setter<commit_msg>COMMISSCOUP.ENH: change default value of quad. fam. name<commit_after>"""Coupling Measurement from Minimal Tune Separation."""

import sys as _sys
import os as _os
import time as _time
import logging as _log

import numpy as _np
from scipy.optimize import least_squares
import matplotlib.pyplot as _plt
import matplotlib.gridspec as _mpl_gs

from siriuspy.devices import PowerSupply, Tune

from ..utils import ThreadedMeasBaseClass as _BaseClass, \
    ParamsBaseClass as _ParamsBaseClass

# _log.basicConfig(format=)
root = _log.getLogger()
root.setLevel(_log.INFO)

handler = _log.StreamHandler(_sys.stdout)
handler.setLevel(_log.INFO)
formatter = _log.Formatter('%(levelname)7s ::: %(message)s')
handler.setFormatter(formatter)
root.addHandler(handler)


class CouplingParams(_ParamsBaseClass):
    """."""

    QUADS = (
        'QFB', 'QFA', 'QDB1', 'QDB2', 'QFP',
        'QDB1', 'QDB2', 'QDP1', 'QDP2', 'QDA',
        'Q1', 'Q2', 'Q3', 'Q4')

    def __init__(self):
        """."""
        super().__init__()
        self._quadfam_name = 'Q3'
        self.nr_points = 21
        self.time_wait = 5  # s
        self.neg_percent = 0.1/100
        self.pos_percent = 0.1/100
        self.coupling_resolution = 0.02/100

    @property
    def quadfam_name(self):
        """."""
        return self._quadfam_name

    @quadfam_name.setter
{'fraction_non_alphanumeric': 0.12708018154311648, 'fraction_numerical': 0.023071104387291982, 'mean_word_length': 3.3008130081300813, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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}}
{'dir': 'git-commits-cleaned', 'id': '7575859', 'n_tokens_mistral': 980, 'n_tokens_neox': 916, 'n_words': 212}