@@ -22,7 +22,9 @@ class LatticeData:
2222
2323
2424def calculate_optics (
25- at_lattice : at .Lattice , refpts : ArrayLike , disable_emittance : bool = False
25+ at_lattice : at .lattice_object .Lattice ,
26+ refpts : ArrayLike ,
27+ disable_emittance : bool = False ,
2628) -> LatticeData :
2729 """Perform the physics calculations on the lattice.
2830
@@ -33,7 +35,7 @@ def calculate_optics(
3335
3436 Args:
3537 at_lattice (at.lattice_object.Lattice): AT lattice definition.
36- refpts (numpy.array ): A boolean array specifying the points at which
38+ refpts (numpy.typing.NDArray ): A boolean array specifying the points at which
3739 to calculate physics data.
3840 disable_emittance (bool): whether to calculate emittance.
3941
@@ -79,7 +81,7 @@ class ATSimulator:
7981 _at_lat (at.lattice_object.Lattice): The centralised instance of an
8082 AT lattice from which the
8183 physics data is calculated.
82- _rp (numpy.array ): A boolean array to be used as refpts for the
84+ _rp (numpy.typing.NDArray ): A boolean array to be used as refpts for the
8385 physics calculations.
8486 _disable_emittance (bool): Whether or not to perform the beam
8587 envelope based emittance calculations.
@@ -388,7 +390,7 @@ def get_orbit(self, field=None):
388390 if None return whole orbit vector.
389391
390392 Returns:
391- numpy.array : The x, x phase, y or y phase for the AT lattice as an
393+ numpy.typing.NDArray : The x, x phase, y or y phase for the AT lattice as an
392394 array of floats the length of the AT lattice.
393395
394396 Raises:
@@ -417,7 +419,7 @@ def get_dispersion(self, field=None):
417419 None return whole dispersion vector.
418420
419421 Returns:
420- numpy.array : The eta x, eta prime x, eta y or eta prime y for the
422+ numpy.typing.NDArray : The eta x, eta prime x, eta y or eta prime y for the
421423 AT lattice as an array of floats the length of the AT lattice.
422424
423425 Raises:
@@ -441,31 +443,31 @@ def get_alpha(self):
441443 """Return the alpha vector at every element in the AT lattice.
442444
443445 Returns:
444- numpy.array : The alpha vector for each element.
446+ numpy.typing.NDArray : The alpha vector for each element.
445447 """
446448 return self ._lattice_data .twiss ["alpha" ][:- 1 ]
447449
448450 def get_beta (self ):
449451 """Return the beta vector at every element in the AT lattice.
450452
451453 Returns:
452- numpy.array : The beta vector for each element.
454+ numpy.typing.NDArray : The beta vector for each element.
453455 """
454456 return self ._lattice_data .twiss ["beta" ][:- 1 ]
455457
456458 def get_mu (self ):
457459 """Return mu at every element in the AT lattice.
458460
459461 Returns:
460- numpy.array : The mu array for each element.
462+ numpy.typing.NDArray : The mu array for each element.
461463 """
462464 return self ._lattice_data .twiss ["mu" ][:- 1 ]
463465
464466 def get_m66 (self ):
465467 """Return the 6x6 transfer matrix for every element in the AT lattice.
466468
467469 Returns:
468- numpy.array : The 6x6 transfer matrix for each element.
470+ numpy.typing.NDArray : The 6x6 transfer matrix for each element.
469471 """
470472 return self ._lattice_data .twiss ["M" ][:- 1 ]
471473
@@ -506,7 +508,7 @@ def get_radiation_integrals(self):
506508 """Return the 5 Synchrotron Integrals for the AT lattice.
507509
508510 Returns:
509- numpy.array : The 5 radiation integrals.
511+ numpy.typing.NDArray : The 5 radiation integrals.
510512 """
511513 return numpy .asarray (self ._lattice_data .radint )
512514
@@ -542,7 +544,7 @@ def get_damping_partition_numbers(self):
542544 """Return the damping partition numbers for the 3 normal modes.
543545
544546 Returns:
545- numpy.array : The damping partition numbers of the AT lattice.
547+ numpy.typing.NDArray : The damping partition numbers of the AT lattice.
546548 """
547549 _ , I2 , _ , I4 , _ = self ._lattice_data .radint
548550 Jx = 1 - (I4 / I2 )
@@ -558,7 +560,7 @@ def get_damping_times(self):
558560 Radiation; August 2013; eqn. 68
559561
560562 Returns:
561- numpy.array : The damping times of the AT lattice.
563+ numpy.typing.NDArray : The damping times of the AT lattice.
562564 """
563565 E0 = self .get_energy ()
564566 U0 = self .get_energy_loss ()
0 commit comments