Skip to content

scan_variables

Module containing variables required to perform a parameter scan

IPNSCNS = 1000 module-attribute

Maximum number of scan points

IPNSCNV = 81 module-attribute

Number of available scan variables

NOUTVARS = 84 module-attribute

CREATE_DICTS_FROM_DATACLASS = ScanData module-attribute

ScanData dataclass

Dataclass holding scan variables

Source code in process/data_structure/scan_variables.py
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
@dataclass(slots=True)
class ScanData:
    """Dataclass holding scan variables"""

    scan_dim: int = 1
    """1-D or 2-D scan switch (1=1D, 2=2D)"""

    isweep: int = 0
    """Number of scan points to calculate"""

    isweep_2: int = 0
    """Number of 2D scan points to calculate"""

    nsweep: int = 1
    """Switch denoting quantity to scan
    """

    nsweep_2: int = 3
    """nsweep_2 /3/ : switch denoting quantity to scan for 2D scan:"""

    sweep: list[float] = field(
        default_factory=lambda: np.zeros(IPNSCNS, dtype=np.float64)
    )
    """sweep(IPNSCNS) /../: actual values to use in scan"""

    sweep_2: list[float] = field(
        default_factory=lambda: np.zeros(IPNSCNS, dtype=np.float64)
    )
    """sweep_2(IPNSCNS) /../: actual values to use in 2D scan"""

    # Vars in subroutines scan_1d and scan_2d requiring re-initialising before
    # each new run

    first_call_1d: bool = True

    first_call_2d: bool = True

scan_dim = 1 class-attribute instance-attribute

1-D or 2-D scan switch (1=1D, 2=2D)

isweep = 0 class-attribute instance-attribute

Number of scan points to calculate

isweep_2 = 0 class-attribute instance-attribute

Number of 2D scan points to calculate

nsweep = 1 class-attribute instance-attribute

Switch denoting quantity to scan

nsweep_2 = 3 class-attribute instance-attribute

nsweep_2 /3/ : switch denoting quantity to scan for 2D scan:

sweep = field(default_factory=(lambda: np.zeros(IPNSCNS, dtype=(np.float64)))) class-attribute instance-attribute

sweep(IPNSCNS) /../: actual values to use in scan

sweep_2 = field(default_factory=(lambda: np.zeros(IPNSCNS, dtype=(np.float64)))) class-attribute instance-attribute

sweep_2(IPNSCNS) /../: actual values to use in 2D scan

first_call_1d = True class-attribute instance-attribute

first_call_2d = True class-attribute instance-attribute