[Back to Interface] [Prev] [Next]

SDsetcal/sfscal

intn SDsetcal(int32 sds_id, float64 cal, float64 cal_err, float64 offset, float64 offset_err, int32 data_type)

sds_id

IN:

Data set identifier returned by SDcreate or SDselect

cal

IN:

Calibration factor

cal_err

IN:

Calibration error

offset

IN:

Uncalibrated offset

offset_err

IN:

Uncalibrated offset error

data_type

IN:

Data type of uncalibrated data

Purpose

Sets the calibration information.

Return value

Returns SUCCEED (or 0) if successful and FAIL (or -1) otherwise.

Description

SDsetcal stores the calibration record associated with a data set. A calibration record contains the following information:


cal


Calibration factor


cal_err


Calibration error


offset


Uncalibrated offset


offset_err


Uncalibrated offset error


data_type


Data type of uncalibrated data


The relationship between a value cal_value stored in a data set and the original value is defined as: orig_value = cal * (cal_value - offset).

The variable offset_err contains a potential error of offset, and cal_err contains a potential error of cal. Currently the calibration record is provided for information only. The SD interface performs no operations on the data based on the calibration tag.

The calibration information is automatically cleared after a call to SDreaddata or SDwritedata. Therefore, SDsetcal must be called once for each data set that is to be read or written.

FORTRAN

integer function sfscal(sds_id, cal, cal_err, offset, offset_err, data_type)

integer sds_id, data_type

real*8 cal, cal_err, offset, offset_err



[Back to Interface] [Prev] [Next]

hdfhelp@ncsa.uiuc.edu
HDF Reference Manual - 04/08/98, NCSA HDF Development Group.