File Exchange

image thumbnail

SDF Importer

version 1.0.4 (6.82 MB) by Justin Dinale
Enables importing of HP/Agilent/Keysight Standard Data Format (SDF) files within MATLAB and Octave.

17 Downloads

Updated 05 Aug 2018

View License

We present the ‘SDF Importer’, a package developed to enable reading of HP/Agilent/Keysight Standard Data Format (SDF) files within MATLAB and Octave.
We provide a brief introduction to the package’s functions, a description of the structure of the extracted data, and step by step instruction on extracting and displaying single-trace and multi-trace datasets. Additionally an assessment of the importer against the Standard Data Format Utilities supplied with original HP equipment is performed.

Comments and Ratings (6)

Justin Dinale

Bart,
I have made changes in v1.0.4 which should address the error you experienced. It was caused by an error in the way the arrays were reshaped just prior to line 195. Let me know how it goes.

Bart Kus

HP 89441A time capture file doesn't work with this SDF importer:

>> SDF_import('A:/CAPT2.DAT')
Error using eval
Undefined function or variable 'uint40'.

Error in SDF_import>SDF_uintX_vector (line 595)
eval(['retval = uint' num2str(bytes * 8) '(0);']);

Error in SDF_import>SDF_float_vector (line 865)
retval = double(typecast(SDF_uintX_vector(arg),'single'));

Error in SDF_import (line 195)
eval(['data.SDF_SCAN_STRUCT.scanVar(n,:) = SDF_' data.SDF_SCAN_STRUCT.zz_scanVar_type ...

Justin Dinale

Please be aware that for some reason File Exchange is not uploading the new version of SDF_Import.
I have been in contact with Mathworks, and they are investigating the problem.

Justin Dinale

JBSAAR,
If you email me a sample multi-channel measurement file from the HP35670a Dynamic Signal Analyzer, I'll have a look at it. Contact details functions comments.

JBSAAR

JBSAAR (view profile)

It does not appear to work for multi-channel measurements with data from an HP35670a Dynamic Signal Analyzer. I get the following error.

Error in SDF_import>SDF_Multi_ChannelY (line 1090)
tmp = data.SDF_YDATA_HDR.zz_raw_data(y_idx+1:y_idx+numBytes);

Error in SDF_import>SDF_YDATA_Process (line 425)
[data,y_idx] = SDF_Multi_ChannelY(data,n_ns,y_idx); % For some reason 'data' was 'tmp'

Error in SDF_import (line 237)
data = SDF_YDATA_Process(data,file_raw);

Single channel measurements work just fine.

JBSAAR

JBSAAR (view profile)

Updates

1.0.4

- Fixed reshaping scanVar arrays.
- Merged multiple scans into single array '.ext.sXd#v#'.
- Window corrections are improved.
- Frequency/Order datasets have narrowband correction applied by default.
- Minor spelling corrections.

1.0.3

No changes to the project. Number increased due to File Exchange not uploading correctly. Re-syncing version numbering with File Exchange. Code is identical to v1.0.1.

1.0.2

Version 1.0.1 corrections:
- Scaling of Y-channel data to account for channel order
- Incorrect variable reference when loading logarithmic x-axis data.
- Importer now deals with files marked as 'scan' data, which have no 'scan' data traces.

1.0.1

Version 1.0.1 corrections:
- Scaling of Y-channel data to account for channel order
- Incorrect variable reference when loading logarithmic x-axis data.
- Importer now deals with files marked as 'scan' data, which have no 'scan' data traces.

MATLAB Release Compatibility
Created with R2016a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.


Learn About Live Editor