Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fitspec: cannot handle twins #158

Closed
mducle opened this issue Nov 24, 2023 · 0 comments · Fixed by #180
Closed

fitspec: cannot handle twins #158

mducle opened this issue Nov 24, 2023 · 0 comments · Fixed by #180
Labels
bug Something isn't working

Comments

@mducle
Copy link
Member

mducle commented Nov 24, 2023

fitspec is a method to fit the energy and intensity of spin wave modes at specific Q-points (like you would measure using a triple-axis spectrometer).

Internally it calls sw_egrid to calculate the scattering intensity swConv. For systems with twins, sw_egrid looks up the twin information in the base spinw obj. However, fitspec calls the original spinw/spinwave method with the fitmode, true flag which means that the base spinw object is not included in the spectrum struct.

We need to either include the spinw object in the spec struct when there is a twin or find some other way to pass on twin information in the spec struct.

@mducle mducle added the bug Something isn't working label Nov 24, 2023
@mducle mducle mentioned this issue Apr 25, 2024
mducle added a commit that referenced this issue May 20, 2024
* Fix bug where imag always plots in auto mode #172

* Allow row vector for hkl for single point #179

* Fix inverted user colormap #131

* Refactor sw_plotspec to avoid recursive calls #132

* Add fitspec fixes suggested by K Richardson #98

* Add spinw obj to spec for twin cases in fitspec #158

* Fix spec spinw object issues in fitmode

spinwave() now creates a .obj field regardless
  When fitmode=true, this a barebones struct
  When fitmode=false, this is a full spinw object
Fix issue with sw_plotspec when using fastmode/fitmode
Add basic test for fitspec() to check twins handling

* Fix bug in sw_plotspec 'fastmode' handling

* Fix issues from review. Add change log.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant