Closed jfkcooper closed 12 months ago
This is probably a bug... and probably one that I introduced. We should be testing things like PolarizedQProbe but I don't think we currently do.
I seem to remember that it seemed the most appropriate probe for simulating polarised ToF data when we wrote our code. I'm currently fine just pinning to 0.8.14, but if there is a more appropriate probe to be using I can change too.
This fixes it, I think... do you think you could try it out? We can make another release soon.
diff --git a/refl1d/probe.py b/refl1d/probe.py
index 1c9fb04..a5ea6a1 100644
--- a/refl1d/probe.py
+++ b/refl1d/probe.py
@@ -2011,5 +2011,9 @@ class PolarizedQProbe(PolarizedNeutronProbe):
self.Q, self.dQ = Qmeasurement_union(xs)
self.calc_Qo = self.Q
+ @property
+ def calc_Q(self):
+ return self.calc_Qo
+
# Deprecated old long name
PolarizedNeutronQProbe = PolarizedQProbe
yup, that works
Will push, and probably release as "bugfix release"
thanks!
Fixed in v0.8.16
Below I have trimmed down to what I believe is close to the minimum code to reproduce what I am seeing, though i hacked some hard paths into it for the filenames in
__create_experiment()
so apologies. I was using this code (very similar at least) to make magnetic samples in my code, but something changed in release 0.8.15 which I'm pretty sure is to do with "preliminary support for theta_offset in PolarizedNeutronProbe" which now results in the code throwingAttributeError: "PolarizedQProbe" object has no attribute "_theta_offsets"
when run. I'm not sure if this is expected and I should change my implementation or a bug, either way any advice is appreciated.YIG_down.txt