Exporting Spectrum Data

Learn more about this powerhouse application. Discuss features, applications, tips and tricks. Share Macro scripts, data files and settings files.

Exporting Spectrum Data

Postby Fleckenstein » Mon May 17, 2010 2:57 pm

Dear ADI,
The Spectrum feature looks very promising indeed. I was wondering though whether it is possible to export the entire Spectrum matrix, i.e. Freq vs Time (in expt) for further analysis as either text, bin or ASCII. At teh moment it is possible to save a single Spectrum Text File but not multiples.
thanks for any assistance.

cheers
Fleckenstein
 
Posts: 3
Joined: Mon May 17, 2010 2:45 pm

Re: Exporting Spectrum Data

Postby jenlow » Tue May 18, 2010 10:40 pm

In LabChart 7.1 for Windows you can export or copy and paste a number of things as text:
  • the data from the Power Spectrum Density plot (the upper plot in the Spectrum View)
  • any of the channel calculations (using Save As Text)
  • any of the Data Pad calculations
However Spectrum does not provide a convenient way to export the full spectrogram (the lower plot in the Spectrum View). The spectrogram contains a large amount of data, so exporting as text may not be practical. In many cases I think that software being used to provide further analysis on this data could also readily generate it from the raw signal - for example MATLAB can do this. If that's not the case then it may be possible to write a LabChart script to run through the file exporting the data FFT by FFT.

Were you hoping to use a software package to do further analysis, or were you thinking of writing something yourself?
John Enlow
Development Manager, ADInstruments, New Zealand
User avatar
jenlow
 
Posts: 63
Joined: Mon Feb 08, 2010 2:23 am
Location: New Zealand

Re: Exporting Spectrum Data

Postby Fleckenstein » Wed May 19, 2010 8:52 am

Hi John,

thanks for the suggestions. we did try to quickly generate a macro to step through and save each individual FFT, but as far as we can tell it is not possible to access the "Save Spectrum" dialogue from the macro commands nor were the options for the data pad sufficient to use it as in intermediate step. are we overlooking anything?
ideally we would like to transfer the data to Igor Pro, which cannot readily deal with large dats sets such as those generated in Chart. we are recording about 25 minutes worth of data at 10kHz so Matlab would be an alternative and perhaps we will have to step over.
thanks again.

best
Johannes
Fleckenstein
 
Posts: 3
Joined: Mon May 17, 2010 2:45 pm

Re: Exporting Spectrum Data

Postby jenlow » Thu May 27, 2010 6:12 am

Using a macro to do this is fairly involved, but is possible. Here's an example LabChart 7.1 file with a macro that exports all the spectrogram data to a text file:

Single Channel Data - Complex Arithmetic Stimulation - Macro.adicht
Saving Large Spectrogram as Text
(1.34 MiB) Downloaded 468 times


To use it just open the file, and click on the macro button in the LabChart toolbar. This outputs a fair amount of data so takes a while to run - the resulting text file has 600,000 frequency/dB pairs.

You can modify the PasteBlock subroutine in the macro to change the output file format if you wish. I hope this helps!
John Enlow
Development Manager, ADInstruments, New Zealand
User avatar
jenlow
 
Posts: 63
Joined: Mon Feb 08, 2010 2:23 am
Location: New Zealand

Re: Exporting Spectrum Data

Postby Fleckenstein » Fri Jul 23, 2010 2:23 pm

Hi John,

just wanted to thank you for the macro - works like a charm!

cheers
Johannes
Fleckenstein
 
Posts: 3
Joined: Mon May 17, 2010 2:45 pm


Return to LabChart in Research

cron