> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# mapping:prep sampling fft

**Version: 0.0.0**

## Description

Prepare time sampling optimum for FFT computation and expected frequencies in output.

## Inputs

This table lists the input pins for this operator. Input pins define the data that the operator requires to perform its operation.
Some inputs are required, while others are optional and provide additional configuration.
Each parameter is detailed in the sections that follow the table.

| Pin number | Name | Status | Expected type(s) |
| - | - | - | - |
| **0** | [time\_freq\_support](#input_0) | Required | [`time_freq_support`](https://developer.synopsys.com/docs/dpf/dpf-framework/core-concepts/dpf-types#time-freq-support) |
| **1** | [cutoff\_frequency](#input_1) | | [`double`](https://developer.synopsys.com/docs/dpf/dpf-framework/core-concepts/dpf-types#standard-types) |
| **2** | [number\_sampling\_point](#input_2) | | [`int32`](https://developer.synopsys.com/docs/dpf/dpf-framework/core-concepts/dpf-types#standard-types) |

### time\_freq\_support (Pin 0)

* **Required:** Yes
* **Expected type(s):** [`time_freq_support`](https://developer.synopsys.com/docs/dpf/dpf-framework/core-concepts/dpf-types#time-freq-support)

Initial time domain TimeFreqSupport.

### cutoff\_frequency (Pin 1)

* **Required:** No
* **Expected type(s):** [`double`](https://developer.synopsys.com/docs/dpf/dpf-framework/core-concepts/dpf-types#standard-types)

Cutoff Frequency. In this case, number of points is calculated computing (time\_range \* cutoff\_freq \* 2) and taking the next power of 2 (optimum for fft calculation).

### number\_sampling\_point (Pin 2)

* **Required:** No
* **Expected type(s):** [`int32`](https://developer.synopsys.com/docs/dpf/dpf-framework/core-concepts/dpf-types#standard-types)

For number of sampling point (calculation with cutoff\_frequency is ignored).

## Outputs

This table lists the output pins for this operator.
Output pins provide the results of the operator's computation and can be connected to inputs of other operators or retrieved for further processing.
Each output is detailed in the sections that follow the table.

| Pin number | Name | Expected type(s) |
| - | - | - |
| **0** | [time\_tfs\_sampled](#output_0) | [`time_freq_support`](https://developer.synopsys.com/docs/dpf/dpf-framework/core-concepts/dpf-types#time-freq-support) |
| **1** | [freq\_tfs\_fft](#output_1) | [`time_freq_support`](https://developer.synopsys.com/docs/dpf/dpf-framework/core-concepts/dpf-types#time-freq-support) |

### time\_tfs\_sampled (Pin 0)

* **Expected type(s):** [`time_freq_support`](https://developer.synopsys.com/docs/dpf/dpf-framework/core-concepts/dpf-types#time-freq-support)

Optimum sampled time domain TimeFreqSupport.

### freq\_tfs\_fft (Pin 1)

* **Expected type(s):** [`time_freq_support`](https://developer.synopsys.com/docs/dpf/dpf-framework/core-concepts/dpf-types#time-freq-support)

Frequency domain TimeFreqSupport expected in output of FFT.

## Configurations

This operator supports [configuration options](https://developer.synopsys.com/docs/dpf/dpf-framework/core-concepts/operator-configurations.md) that modify its behavior.

### [mutex](https://developer.synopsys.com/docs/dpf/dpf-framework/core-concepts/operator-configurations.md#mutex)

* **Expected type(s):** [`bool`](https://developer.synopsys.com/docs/dpf/dpf-framework/core-concepts/dpf-types#standard-types)
* **Default value:** false

If this option is set to true, the shared memory is prevented from being simultaneously accessed by multiple threads.

## Scripting

This operator can be accessed through scripting interfaces using these identifiers.

**Category**: mapping

**Plugin**: core

**Scripting name**: prep\_sampling\_fft

**Full name**: mapping.prep\_sampling\_fft

**Internal name**: prepare\_sampling\_fft

**License**: None

## Examples

These examples demonstrate how to use this operator in different programming environments.
Each example shows how to instantiate the operator, connect the required inputs, and retrieve the output.

<details>
  <summary>C++</summary>

  ```cpp theme={null}
  #include "dpf_api.h"

  ansys::dpf::Operator op("prepare_sampling_fft"); // operator instantiation
  op.connect(0, my_time_freq_support);
  op.connect(1, my_cutoff_frequency);
  op.connect(2, my_number_sampling_point);
  ansys::dpf::TimeFreqSupport my_time_tfs_sampled = op.getOutput<ansys::dpf::TimeFreqSupport>(0);
  ansys::dpf::TimeFreqSupport my_freq_tfs_fft = op.getOutput<ansys::dpf::TimeFreqSupport>(1);
  ```
</details>

<details>
  <summary>CPython</summary>

  ```python theme={null}
  import ansys.dpf.core as dpf

  op = dpf.operators.mapping.prep_sampling_fft() # operator instantiation
  op.inputs.time_freq_support.connect(my_time_freq_support)
  op.inputs.cutoff_frequency.connect(my_cutoff_frequency)
  op.inputs.number_sampling_point.connect(my_number_sampling_point)
  my_time_tfs_sampled = op.outputs.time_tfs_sampled()
  my_freq_tfs_fft = op.outputs.freq_tfs_fft()
  ```
</details>

<details>
  <summary>IPython</summary>

  ```python theme={null}
  import mech_dpf
  import Ans.DataProcessing as dpf

  op = dpf.operators.mapping.prep_sampling_fft() # operator instantiation
  op.inputs.time_freq_support.Connect(my_time_freq_support)
  op.inputs.cutoff_frequency.Connect(my_cutoff_frequency)
  op.inputs.number_sampling_point.Connect(my_number_sampling_point)
  my_time_tfs_sampled = op.outputs.time_tfs_sampled.GetData()
  my_freq_tfs_fft = op.outputs.freq_tfs_fft.GetData()
  ```
</details>

## Changelog

* Version 0.0.0: Initial release.
