09-03-2019 04:34 AM
Hello everyone,
I'm trying to open a .spc with labview. I'm referring to yout explanation but your last exemple don't run with me. Can you help me please ?
09-03-2019 05:41 AM
Hi colapili,
I'm trying to open a .spc with labview.
When you want to read "unfamiliar" data files with obscure file suffixes you need to know their formatting.
Do you know the formatting of those "spc" data?
Can you provide an example file, including format description and expected content after conversion?
09-03-2019 09:53 AM
Hello GerdW and Yamaeda,
I'm sorry but I'm not verry familiar with data structure of binary file... And sincerely I don't understand really this code. My datas.spc are from horiba, I'll contact them for more informations conserning .spc structure.
I don't know where replace a division by a Type Cast, is it indead the multiplication at the end ?
You will find in attachement a spc file.
Thank you
Nicolas
09-03-2019 10:10 AM
@colapili wrote:I'm sorry but I'm not verry familiar with data structure of binary file...
A binary file is just a collection of bytes and it is up to the original programmer to define what each bit means. Without knowing the data structure, there is no way to figure it out, so yes, contact the company that wrote the program that creates the file. In simple cases, we can guess the data structures with trial and error, but for more complicated cases, this is not possible.
I am curious why you would append to a 11+ year old thread about fixed-point format. Seems completely unrelated to your problem. You probably should have started a new thread instead. An spc extension can mean anything.
09-03-2019 02:06 PM - edited 09-03-2019 02:09 PM
Hi colapili,
something along this:
The first 0x200 bytes in the file contain some header data, the last ~0x400 bytes a lot of (readable) meta data:
ACQ. TIME (S) = 15
ACCUMULATIONS = 2 RANGE (CM-¹) = 400...3500 WINDOWS = 2 AUTOFOCUS = OFF SWIFT = OFF AUTOEXPOSURE = OFF SPIKE FILTER = MULTIPLE ACCUM. DELAY TIME (S) = 0 BINNING = 1 READOUT MODE = SIGNAL DENOISE = OFF ICS CORRECTION = OFF DARK CORRECTION = OFF INST. PROCESS = OFF DETECTOR TEMPERATURE (°C) = -69 INSTRUMENT = XPLORA DETECTOR = ANDOR CCD OBJECTIV = X100 GRATING = 1200T FILTR = 50% EXCIT_LINE = 532.17 SLIT = 100 HOLE = 100 LASER POL = NONE RAMAN POL = NONE OUTPUT = CAMERA STAGEXY = MARZHAUSER STAGEZ = MARZHAUSER X (µM) = -3787.15 Y (µM) = 937.8 Z (µM) = -1.3 FULL TIME(HH:MM) = 14:29 PROJECT = A SAMPLE = B SITE = C TITLE = D REMARK = DATE = 17.04.2018 14:06
(Note: moved your messages and their replies into your own thread.)
09-03-2019 03:50 PM - edited 09-03-2019 03:55 PM
Obviously, it's a 2D dataset (between 512 header and ending metadata) with about 651 traces of 1249 points each. The first trace is the nonlinear cm-1 calibration from 400...3500. The second trace might be some background reference. The remaining 659 traces can be re-shaped into an intensity graph, but for each trace only about the first 1241 are valid data, so take the appropriate subset (the remaining 8 points (32bytes) might have other meaning)
Here are the the first 100 traces of 1241 points each. Nice spectra 😄
(note that the Y axis uses logarithmic mapping for better details because of the large dynamic range of the data)
09-04-2019 05:24 AM
Ok, thank you both for your help.
I will try to move forward with the information you gave me
Nicolas
09-04-2019 07:26 AM
Bonjour à tous,
Est-ce que qqn pourrait m'expliquer comment lire un fichier binaire en Labview? J'ai du mal à comprendre comment cela fonctionne.
Le fichier en question (format galactic .spc) ci-joint contient des données spectroscopiques et d'autres informations. Mon but est d'en extraire les données d’intérêt (tableau de spectres 2D) et pour être sincère je ne sais pas comment faire...
J'ai pu avoir en informations (même si j'ai du mal à les comprendre) que les premières 0x200 bytes contiennent des données entêtes et les derniers ~0x400 de nombreuses metadatas ou encore que ce jeux de données 2D qui m’intéresse se situe entre l'entête 512 et les métadonnées. Logiquement il devrait y avoir 651 spectres avec 1249 points chacun.
En espérant que vous puissiez m'aider.
Bonne journée à tous.
Nicolas
09-04-2019 07:29 AM - edited 09-04-2019 07:30 AM