StollLab / EasySpin

MATLAB toolbox for Electron Paramagnetic Resonance (EPR) spectroscopy
http://easyspin.org
MIT License
48 stars 25 forks source link

nucspinadd: bug fixes #247

Closed redman-a closed 2 years ago

redman-a commented 2 years ago

This commit fixes three bugs in nucspinadd.m

  1. Spelling mistake with error
  2. If more than one nucleus has already been declared to Sys with isotropic/principle value notation, attempting to add a third with a full tensor fails as the function treats T0 in appendtensor as a single nucleus when applying fullifyA and fullifyQ
  3. If nuclei already exist in Sys with nqi and an additional nucleus is added without a nqi, Sys.Q is not updated with zeros, as a result the number of rows in Sys.Q no longer corresponds to the number of nuclei.
stestoll commented 2 years ago

Looks great, thank you!