Jump to content
PDS Geosciences Node Community

How to read the ChemCam LIBS EDR spectra data from Curiosity?


Recommended Posts

Hello, Greetings!


We are interested in reading the raw LIBS EDR spectra data from Curiosity (ChemCam) that have been released on Feb 27, 2013 at http://pds-geosciences.wustl.edu/msl/msl-m-chemcam-libs-2-edr-v1/. The data are in two parts one with *.lbl extension and the other in *.dat extension. We have tried to read one pair of the ChemCam LIBS EDR data using the latest "readpds.pro" routine in IDL (http://pdssbn.astro.umd.edu/tools/tools_readPDS.shtml); we attempted to read the lbl and dat parts; but in either way; there are error messages that we encounter as shown in the following. Our question is: How can we read these ChemCam LIBS EDR data files in IDL? Which tools should we use?  Is the IDL-code for reading ChemCam LIBS EDR files available to the public?   


Thank you all !



Trying to read the lbl file it says:


ENVI> img = READPDS('cl1_398380569edr_f0030000ccam04010m1.lbl')

Now reading header: cl1_398380569edr_f0030000ccam04010m1.lbl

Now reading header: ./CCAM_LIBS_ANCILLARY_V4.FMT

% POINTPDS: Error: Could Not open data file. If possible, move this file to your local directory and try again. It is located under the label directory in the parent data file. The data file that could not be opened:./CCAM_ANCILLARY_TMPS_V4.FMT

% Execution halted at: $MAIN$ 



Trying to read the .dat file it says:


ENVI> img = READPDS('cl1_398380569edr_f0030000ccam04010m1.dat')

Error: label must contain viable PDS_VERSION_ID keyword

Link to comment
Share on other sites

Hi ba75 -


  Good questions. Currently there is not an easy way to read a ChemCam LIBS data file into IDL. This is because the READPDS algorithm is unaware of two things: detached labels and format files.Unlike MER data, all MSL data has detached labels with the metadata that IDL needs to read in the data. IDL does not know about external labels. (Don't get confused by the attached label that exists within the .DAT file. It is for internal MSL use.)


You can look in the detached label to see the format of the data table. You also will need to look in the format files for some of the table definition. Rather than repeat the definition for all 385 columns in every single detached label, there are pointers in the label to format files. You can find the format files in the label directory on the Geo web site (http://pds-geosciences.wustl.edu/msl/msl-m-chemcam-libs-2-edr-v1/mslccm_0xxx/label/) or in the ChemCam data set documents on the Analyst's Notebook (http://an.rsl.wustl.edu/msl/mslbrowser/tab.aspx?t=re).

Link to comment
Share on other sites

  • 10 months later...

You have probably already solved this elsewhere, but the immediate reason for the failure above is that READPDS.PRO could not find the .FMT files; they are in the LABEL/ subdirectory of the data set.


The larger problem is that READPDS.PRO and its ancillary routines are all but useless i.e. they work with some labels but are very sensitive to things like missing keywords, or keywords in a different order than, they expect to see.  So even if you put the .FMT files in a location where they could be found you would not be much closer to reading these data (I've tried).


I am working on READPDS for another project but it will take a while and may not fix this problem; I hope you have not been waiting with bated breath for an answer.


Finally, I am a software consultant with a quarter of a century of experience dealing with this kind of stuff and I am pretty sure I could solve your problem quickly, via READPDS or most likely something specific for these data, if you are willing to pay for it.


Best regards,


Brian Carcich

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...