Skip to content

Commit

Permalink
Fix sw_issymspec to recognise powder spectra (#146)
Browse files Browse the repository at this point in the history
* Fix sw_issymspec to recognise powder spectra

* Add release notes for #146
  • Loading branch information
mducle authored Jun 27, 2023
1 parent 12b0b45 commit 92551aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,7 @@ Bug Fixes
- No longer require a magnetic structure be initialised with ``genmagstr``
before using ``optmagstr``. If not intialised, a default ``nExt`` of
``[1 1 1]`` is used. This has also been clarified in the docstring.
- Fix bug where powder spectra was not recognised in ``sw_plotspec``,
introduced by a previous update to provide more helpful error messages.
- ``sw_instrument`` now calculates the limits for thetaMax, before it was
using the continuation of the thetaMin line to high Q which is incorrect.
using the continuation of the thetaMin line to high Q which is incorrect.
3 changes: 3 additions & 0 deletions swfiles/private/sw_issymspec.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
if ~isfield(spectra, 'ham')
if isfield(spectra, 'omega')
symobj = spectra.omega;
elseif size(spectra.hklA, 1) == 1 % Is a powder spectra
issym = false;
return
else
error('sw_issymspec:WrongInput', 'Invalid input spectra structure');
end
Expand Down

0 comments on commit 92551aa

Please sign in to comment.