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

Problem with guess_bins with 360 degree scans #328

Open
jadball opened this issue Sep 27, 2024 · 6 comments
Open

Problem with guess_bins with 360 degree scans #328

jadball opened this issue Sep 27, 2024 · 6 comments

Comments

@jadball
Copy link
Contributor

jadball commented Sep 27, 2024

Line 435 here is incorrectly triggered when we collect a 360 degree single-turn scan (often omax - omin is slightly larger than 360)

def guessbins(self):
ny, nomega = self.shape
self.omin = self.omega.min()
self.omax = self.omega.max()
if (self.omax - self.omin) > 360:
# multi-turn scan...
self.omin = 0.0
self.omax = 360.0
self.omega_for_bins = self.omega % 360
else:
self.omega_for_bins = self.omega

@jonwright
Copy link
Member

Do you want the check to be (360 + omegastep), or is there some other problem with it?

@jadball
Copy link
Contributor Author

jadball commented Sep 27, 2024

I'll need to double-check with the raw data once I'm back in the office to see if that will be sufficient, but it was slightly over 360 degrees for sure (check Wolfgang's last scanning expt)

@jonwright
Copy link
Member

The reason the mod360 is in there is for datasets with continuous (e.g. always forward) rotation. If the scan is over by a few degrees, it means some angles get measured twice instead of once. This is more of an intensity normalisation problem rather than a wrong omega bin problem. Omega at 362 degrees and 2 degrees are supposed to be the same projection...?

@jadball
Copy link
Contributor Author

jadball commented Sep 27, 2024

The problem is that if we go from, say, -181 to 181 degrees, the mod360 is invoked, which forces the omega range to 0-360. This means our omin, omax and omega_for_bins are no longer in agreement with cf.omega which is used later down the line for sinogram histogram generation (top of 2_S3DXRD... .ipynb) for the whole sample mask

@jonwright
Copy link
Member

Might be better to use dataset.sinohist for whole sample sinograms and fix the problem in there.
We had a bunch of data using a "full1" or "f2scan" which was always going forward to be quicker - that case will need testing and debugging again at some point. Especially if we upgrade the huber tower to spin faster.

@jadball
Copy link
Contributor Author

jadball commented Sep 27, 2024

I'll take a look at the notebooks using a 360 scan as a test dataset and try to use sinohist going forward

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants