Quasars / orange-spectroscopy

Other
52 stars 58 forks source link

FPA size calculation incorrect #502

Open borondics opened 3 years ago

borondics commented 3 years ago

In agilent.py the _fpa_size function is not entirely correct.

If there is a DAT file with non-square mosaic data then the FPA size calculation is incorrect.

@stuart-cls we can discuss this if you want.

stuart-cls commented 3 years ago

Hi @borondics , this is a deliberate design choice to prevent users from accidentally opening the non-square thumbnail .dat files that are present in a mosaic dataset.

Do you have a use case for the thumbnails? To be honest, I'm not certain how they are averaged. I think the dimensions and perhaps energy axis would be incorrect, but I've never looked since our users always want the original data.

borondics commented 3 years ago

I see!

In this case though I think it would be better to provide a more meaningful 'error' message. What do you think?

On Thu, Dec 3, 2020 at 4:08 PM Stuart Read notifications@github.com wrote:

Hi @borondics https://github.com/borondics , this is a deliberate design choice to prevent users from accidentally opening the non-square thumbnail .dat files that are present in a mosaic dataset.

Do you have a use case for the thumbnails? To be honest, I'm not certain how they are averaged. I think the dimensions and perhaps energy axis would be incorrect, but I've never looked since our users always want the original data.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Quasars/orange-spectroscopy/issues/502#issuecomment-738061722, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQDIGWJ3WLPJXY2OYGGVULSS6SVHANCNFSM4UMCFMGA .

stuart-cls commented 3 years ago

Perhaps something like "This looks like a mosiac dataset, try opening with the .dmt loader?"

Or we could even just try checking if it's a mosaic dataset ourselves, that would be even more user-friendly! (assuming the user doesn't have a bunch of mixed datasets in the same folder, I suppose)