# :FUNCtion:PARameters:FFT:PEAK:DOUBle:FDATa?

FFT Parameters Commands

- :FUNCtion:PARameters:FFT:AIMPedance
- :FUNCtion:PARameters:FFT:DETector:COUNt
- :FUNCtion:PARameters:FFT:DETector:TYPE
- :FUNCtion:PARameters:FFT:DISPlay
- :FUNCtion:PARameters:FFT:NFRequency
- :FUNCtion:PARameters:FFT:PEAK:ASCii:FDATa?
- :FUNCtion:PARameters:FFT:PEAK:ASCii:MDATa?
- :FUNCtion:PARameters:FFT:PEAK:COUNt
- :FUNCtion:PARameters:FFT:PEAK:DOUBle:FDATa?
- :FUNCtion:PARameters:FFT:PEAK:DOUBle:MDATa?
- :FUNCtion:PARameters:FFT:PEAK:ENABle
- :FUNCtion:PARameters:FFT:PEAK:LEVel
- :FUNCtion:PARameters:FFT:PEAK:SORT
- :FUNCtion:PARameters:FFT:PREFerence
- :FUNCtion:PARameters:FFT:PREFerence:TORigin
- :FUNCtion:PARameters:FFT:RBANdwidth?
- :FUNCtion:PARameters:FFT:RIMPedance
- :FUNCtion:PARameters:FFT:TFACtor
- :FUNCtion:PARameters:FFT:WINDow

## Query Syntax

    :FUNCtionN:PARameters:FFT:PEAK:DOUBle:FDATa?

Where N identifies one of up to 64 possible operators {1:64} that can be defined as part of a math function. The operators are numbered in the order that they were originally added to the function.

## Description

Returns the FFT peak frequency values in double format.

The data is sent in the order in which peaks are sorted (see `:FUNCtion:PARameters:FFT:PEAK:SORT`).

Use the `:FUNCtion:PARameters:FFT:PEAK:COUNt` command to set or query the number of annotated peaks (and values returned).

Use the `:FUNCtion:PARameters:FFT:PEAK:ASCii:FDATa?` query to return the FFT peak frequency values in ASCII format.

To get the FFT peak magnitude values, use `:FUNCtion:PARameters:FFT:PEAK:DOUBle:MDATa?` or `:FUNCtion:PARameters:FFT:PEAK:ASCii:MDATa?`.

See Definite-Length Block Response Data for more information.

### Returned Data Type

The `:FUNCtion:PARameters:FFT:PEAK:DOUBle:FDATa?` query returns double (8 bytes) values as definite-length block data. You must specify this data type in your program language's command that you use to query the data. The specifier for this data type in your programming language will likely be "d" and it is identified in this example with red text. Confirm this with your programming language's documentation. The following is an example of the command used in Python using PyVISA.

    endianness = Infiniium.query(':SYSTem:BORDer?')
    Infiniium.write(':SYSTem:BORDer LENDian')
    data = Infiniium.query_binary_values(':FUNCtion:PARameters:FFT:PEAK:DOUBle:FDATa?',
    	datatype='d',
    	container=list,
    	is_big_endian=False,
    	header_fmt='ieee')
    Infiniium.write(':SYSTem:BORDer ' + endianness)

### Endianness of Returned Block Data

To correctly interpret block data, you must know the endianness (byte order) of the returned data (integers or real), and you will most likely have to specify this same endianness in your program language's command that is used to query the data. Endianness can be set to "little endian" order in which the least significant byte is sent first and the most significant byte sent last. Or, the endianness can be set to "big endian" order in which the most significant byte is sent first and the least significant byte sent last.

To specify or query the endianness setting for binary block data, use the `:SYSTem:BORDer` command. The endianness setting applies to all binary queries except for `:DISK:FILE:READ?` query.

If you plan to change Infiniium's current endian setting, it is a good practice to query Infiniium's current endian setting and restore the setting when your program completes. This will avoid other programs having errors due to assuming a particular endianness setting.

After a factory default (`:SYSTem:FACTory`), little endian is set. A default setup (`:SYSTem:DEFault`) does not affect endianness.

Be aware that VXI plug-and-play drivers can change the endianness setting. As a result always explicitly set the endianness in your program before transferring any binary data.