BlueQuartzSoftware / DREAM3D

Data Analysis program and framework for materials science data analytics, based on the managing framework SIMPL framework.
http://dream3d.bluequartz.net
Other
158 stars 73 forks source link

TSL EDAX .ang hex grid to square grid fails to convert files with error -600 #132

Closed imikejackson closed 10 years ago

imikejackson commented 10 years ago

The EbsdLib/TSL/AngReader file will fail to read some HEX grid files because the number of points to read that is computed based on the header information does not match the number of entries read during the parsing of the data section. This can lead to a "Premature end of File" error message. Technically the reading did not fail, the parser just did not read the expected number of entries before the end of the file was reached. This means that the some of the data has default fill values instead of data from the file. We need to figure out if this is actually an error or just a "soft fail" and present a warning to the users. Comments anyone.

wlenthe commented 10 years ago

I haven't looked too closely at the EBSD IO filters but could we just check for an EoF character somewhere?

On Tue, Dec 10, 2013 at 7:13 PM, Mike Jackson notifications@github.comwrote:

The EbsdLib/TSL/AngReader file will fail to read some HEX grid files because the number of points to read that is computed based on the header information does not match the number of entries read during the parsing of the data section. This can lead to a "Premature end of File" error message. Technically the reading did not fail, the parser just did not read the expected number of entries before the end of the file was reached. This means that the some of the data has default fill values instead of data from the file. We need to figure out if this is actually an error or just a "soft fail" and present a warning to the users. Comments anyone.

— Reply to this email directly or view it on GitHubhttps://github.com/dream3d/DREAM3D/issues/132 .

imikejackson commented 10 years ago

The issue is that the ANG header states values for the NumRows, Even and Odd Columns. Calculating the number of data points to read does not always correlate with what is in the file. In this case the calculation says we should be reading more data rows that are in the file. There is a detection for the EOF which is what triggers the error signal to be sent. The issue is what to do? Treat it as an error? a warning? ANG files are known not to match up with their headers. I want to make sure that the user understands that we tried to read a set amount of data but failed to do that. There is now junk data in some of the data points and they (the user) should do something about that. I pushed my changes in both the master and Develop branches. Take a look and try out the codes with some hex files to see if everything continues to work.