resfreqs_matrix#

torchspin.resfreqs_matrix(sys, phi, theta, B, freq_range=None, threshold=1e-4, exp=None, opt=None, init_state=None, photo_weight=1.0)[source]#

Compute resonance frequencies and intensities for one orientation.

Diagonalizes H = H0 - B * muzL at fixed static field B and returns all transition frequencies E_j - E_i (MHz) together with their chi-averaged perpendicular transition rates.

Parameters:
  • sys (SpinSystem) – Spin system.

  • phi (float) – Azimuthal angle of the static field in the molecular frame (radians).

  • theta (float) – Polar angle of the static field in the molecular frame (radians).

  • B (float) – Static magnetic field (mT).

  • freq_range (tuple[float, float] | None) – Optional (nu_min, nu_max) in GHz. Transitions outside this range are removed from the output. If None, all transitions are returned.

  • threshold (float) – Relative intensity threshold for discarding weak transitions (default 1e-4). Set to 0 to keep all.

  • exp (Experiment | None) – Optional Experiment object. If provided, exp.Temperature is used for Boltzmann weighting.

  • opt (Options | None) – Optional Options object.

Returns:

  • freq – Resonance frequencies in MHz, shape (nTransitions,).

  • intensities – Transition intensities (a.u.), shape (nTransitions,).

Return type:

tuple[Tensor, Tensor]

Notes

The transition rate formula is identical to resfields():

TR = (|mu_L|² - |nB0·mu_L|²) / 2

which chi-averages over all orientations of the oscillating field B1 perpendicular to the static field B0.