@@ -221,7 +221,7 @@ def _resp_fork(variables: VariableList, **kwargs):
221
221
class _SvdSolver (abc .ABC ):
222
222
"""SVD solver for response matrices."""
223
223
224
- def __init__ (self , nobs , nvar ):
224
+ def __init__ (self , nobs : int , nvar : int ):
225
225
self ._shape = (nobs , nvar )
226
226
self ._response = None
227
227
self ._obsmask = np .ones (nobs , dtype = bool )
@@ -253,7 +253,7 @@ def varweights(self): ...
253
253
def obsweights (self ): ...
254
254
255
255
@property
256
- def shape (self ) -> tuple :
256
+ def shape (self ) -> tuple [ int , int ] :
257
257
"""Shape of the response matrix."""
258
258
return self ._shape
259
259
@@ -424,18 +424,18 @@ def __str__(self):
424
424
return f"{ type (self ).__name__ } ({ no } observables, { nv } variables)"
425
425
426
426
@property
427
- def varweights (self ):
427
+ def varweights (self ) -> np . ndarray :
428
428
"""Variable weights."""
429
429
return self .variables .deltas
430
430
431
431
@property
432
- def obsweights (self ):
432
+ def obsweights (self ) -> np . ndarray :
433
433
"""Observable weights."""
434
434
return self .observables .flat_weights
435
435
436
436
def correct (
437
437
self , ring : Lattice , nvals : int = None , niter : int = 1 , apply : bool = False
438
- ):
438
+ ) -> np . ndarray :
439
439
"""Compute and optionally apply the correction.
440
440
441
441
Args:
@@ -932,7 +932,7 @@ def tauwj(muj, muw):
932
932
return resp
933
933
934
934
@property
935
- def bpmweight (self ):
935
+ def bpmweight (self ) -> np . ndarray :
936
936
"""Weight of position readings."""
937
937
return self .observables [0 ].weight
938
938
@@ -941,7 +941,7 @@ def bpmweight(self, value):
941
941
self .observables [0 ].weight = value
942
942
943
943
@property
944
- def stsumweight (self ):
944
+ def stsumweight (self ) -> np . ndarray :
945
945
"""Weight of steerer summation."""
946
946
return self .observables [1 ].weight
947
947
@@ -950,7 +950,7 @@ def stsumweight(self, value):
950
950
self .observables [1 ].weight = value
951
951
952
952
@property
953
- def steerdelta (self ):
953
+ def steerdelta (self ) -> np . ndarray :
954
954
"""Step and weight of steerers."""
955
955
return self .variables [: self .nbsteers ].deltas
956
956
@@ -959,7 +959,7 @@ def steerdelta(self, value):
959
959
self .variables [: self .nbsteers ].deltas = value
960
960
961
961
@property
962
- def cavdelta (self ):
962
+ def cavdelta (self ) -> np . ndarray :
963
963
"""Step and weight of RF frequency deviation."""
964
964
return self .variables [self .nbsteers ].delta
965
965
@@ -1126,7 +1126,7 @@ def exclude_vars(self, *varid: int | str, refpts: Refpts = None) -> None:
1126
1126
super ().exclude_vars (* varid , * names )
1127
1127
1128
1128
@property
1129
- def bpmweight (self ):
1129
+ def bpmweight (self ) -> np . ndarray :
1130
1130
"""Weight of position readings."""
1131
1131
return self .observables [0 ].weight
1132
1132
@@ -1135,7 +1135,7 @@ def bpmweight(self, value):
1135
1135
self .observables [0 ].weight = value
1136
1136
1137
1137
@property
1138
- def steerdelta (self ):
1138
+ def steerdelta (self ) -> np . ndarray :
1139
1139
"""Step and weight on steerers."""
1140
1140
return self .variables .deltas
1141
1141
0 commit comments