kuadrat / arpys

ARPES data analysis tools
GNU Lesser General Public License v3.0
12 stars 4 forks source link

loading Antaress data doesn't work. #18

Open Tappeo opened 4 years ago

Tappeo commented 4 years ago

I have an ARPES-data of Antares where is a radiational synchrotron in France, as Nexus format. I tried to load the Antares data with "dataloaders.py" of arpys as the following :

from arpys import dl, pp D = dl.load_data('CMA_2018-03-31_13-33-07.nxs')

However, I got the following error : WARNING: non-ASCII characters are present in the FITS file header and have been replaced by "?" characters [astropy.io.fits.util] WARNING: non-ASCII characters are present in the FITS file header and have been replaced by "?" characters [astropy.io.fits.util]

Exception : 'Unable to open object (component not found)' Exception : "Unable to open object (object 'Matrix' doesn't exist)" Exception : 'Unable to open object (component not found)' Exception : 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte Exception : "Unable to open object (object '2D_Data' doesn't exist)" Exception : Header missing END card. Exception : invalid load key, 'H'. Traceback (most recent call last): File "load_1.py", line 2, in D = dl.load_data('CMA_2018-03-31_13-33-07.nxs') File "/usr/local/lib/python3.7/site-packages/arpys/dataloaders.py", line 1134, in load_data raise Exception('Could not load data {}.'.format(filename)) Exception: Could not load data CMA_2018-03-31_13-33-07.nxs. I could load other radiational synchrotron data such as SIS and ADRESS with "dataloaders.py" as above. Just in case of Antares, it doesn't work. I guess that the file format is inappropriate for "dataloaders.py". Is it possible to read the data somehow? Thank you in advance. Tappeo
kuadrat commented 4 years ago

Hi, thanks for your message and sorry for the extremely late reply - somehow this has flown completely under my radar. In order for the dataloading to succeed, a respective dataloader class has to be implemented in dataloaders.py You can try to do it yourself, of if you send me some typical antares data (with metadata) so I can inspect the format, I could give it a go.