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

Error during 'Preview' of .ebsp file #12

Closed
bschue opened this issue Aug 31, 2021 · 7 comments
Closed

Error during 'Preview' of .ebsp file #12

bschue opened this issue Aug 31, 2021 · 7 comments

Comments

@bschue
Copy link

bschue commented Aug 31, 2021

Hello!

I am currently attempting to process a .ebsp file in EMSphinx built from source.

During the 'Preview' process on the first page of the Indexing Wizard I get a vector subscript out of range error. Upon hitting preview.. the process will continue until the very end where the patterns should be displaying.

Capture

I have been trying to hunt down the location this particular bug but no luck yet. Any comments on where it could be taking place or what is happening?

I am familiar with the code use and have successfully processed the example data, but with experimental data gathered by our group we get thrown this error.

Thanks for any comments!

Ben

@marcdegraef
Copy link
Collaborator

marcdegraef commented Aug 31, 2021 via email

@bschue
Copy link
Author

bschue commented Aug 31, 2021

Hi Marc,

Thanks for the really quick reply! I believe this set was uncompressed.. but before I say that for sure I'll gather another dataset and see if I get the same error.

I do have another series of patterns which I exported (an incredible pain storage wise) and will use your Matlab code to generate a .data file.

Let me play around with that and gather another uncompressed .ebsp dataset and report back.

Thanks, Marc!

Ben

@bschue
Copy link
Author

bschue commented Oct 17, 2021

Hey @marcdegraef

Finally got back to this issue. I have rescanned a couple datasets with uncompressed patterns. Same issue is arising with the
"vector subscript out of range" when previewing patterns.

Hopefully this isn't too complicated of a fix..

Thanks for all of your help!

Ben

Capture

@jwestraadt
Copy link

jwestraadt commented Feb 5, 2022

Hi Ben,

I managed to get it working by incorporating this pull request. It looks like the height and width of the patterns is switched around in the histogram equalization code. I think the Ni example data has square patterns, so it is not an issue, but the .ebsp files typically have rectangular patterns where this becomes an issue.

I found another issue with pattern batch sizes when working with .ebsp files before I finally got it working, but will raise it as a separate issue. If I make the batch size equal to a factor of the total number of patterns, then it completes the analysis.

Johan

@bschue
Copy link
Author

bschue commented Feb 8, 2022

Hey Johan,

Thank you for the update! I'll incorporate your pull request and see how it plays with my data. I will report back with any findings.

Cheers,
Ben

@bschue
Copy link
Author

bschue commented Feb 8, 2022

Hi Ben,

I managed to get it working by incorporating this pull request. It looks like the height and width of the patterns is switched around in the histogram equalization code. I think the Ni example data has square patterns, so it is not an issue, but the .ebsp files typically have rectangular patterns where this becomes an issue.

I found another issue with pattern batch sizes when working with .ebsp files before I finally got it working, but will raise it as a separate issue. If I make the batch size equal to a factor of the total number of patterns, then it completes the analysis.

Johan

Hey Johan,

Solution worked for me but towards the end of analysis I get another error. Is this what you have seen as well?
Cheers,

EMSphInx_error_2

@jwestraadt
Copy link

jwestraadt commented Feb 9, 2022

Hi Ben,

I have created another issue for this error: #13

You have 255x196 = 44100 patterns in the .ebsp file. Under "Indexing parameters" on the right, try setting the "batchsize" to say 100, which is a factor of the total number of patterns. At the moment it is set to 0, which will automatically determine the batchsize. This number might not be a factor of the total number of patterns. Some initial debugging shows that this error might be related to reading the last partial batch from the .ebsp in the following loop of the index_ebsd.cpp file.

	size_t batches = idxData.pat->numPat() / nml.batchSize;//how many batches are needed
	if(batches * nml.batchSize < idxData.pat->numPat()) ++batches;//extra batch for leftovers
	for(size_t i = 0; i < batches; i++) {//loop over batches
		const size_t start = i * nml.batchSize;//first pattern
		const size_t end = std::min(start + nml.batchSize, idxData.pat->numPat());//last pattern
		pool.schedule(std::bind(idxData.workItem, std::placeholders::_1));//queue indexing
	}

Please also make sure to output the vendor file as ".ang" and not ".ctf" as it will give another error. I have logged this as a separate issue #14. You might also find the discussions on the pattern center determination on the Oxford system useful.

@bschue bschue closed this as completed Mar 21, 2022
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

3 participants