> ## 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.

# centroid_fc class

**Namespace:** [Ans.DataProcessing.operators.math](https://developer.synopsys.com/docs/dpf/dpf-mechanical/api/Ans.DataProcessing/operators/math)

## Summary

Computes the centroid of all the matching fields of a fields container at a given time or frequency, using fieldOut = field1\*(1.-fact)+field2\*(fact).

available inputs: `fields_container` (FieldsContainer), `time_freq` (double), `step` (Int32) (optional), `time_freq_support` (TimeFreqSupport) (optional)

available outputs: `fields_container` (FieldsContainer)

## Example

```python theme={null}
op = centroid_fc()

op = centroid_fc(fields_container=my_fields_container,time_freq=my_time_freq,step=my_step,time_freq_support=my_time_freq_support)
```

## Class Information

| Property | Value |
| - | - |
| Namespace | `Ans.DataProcessing.operators.math` |
| Assembly | `Ans_Dpf_Native_dll_cs` |
| Base Class | `Ans.DataProcessing.internal_objects.BaseOperator` |

## Inputs

### fields\_container

FieldsContainer with fields for centroid calculation

**Type:** *LinkableInput*

### time\_freq

Time or frequency value for field selection

**Type:** *LinkableInput*

### step

Optional step specification

**Type:** *LinkableInput*

### time\_freq\_support

Optional TimeFreqSupport for field resolution

**Type:** *LinkableInput*

## Outputs

### fields\_container

FieldsContainer with centroid calculation results at specified time/frequency

**Type:** *LinkableOutput*

## Constructors

#### Constructor

```python theme={null}
centroid_fc()
```

#### Constructor

```python theme={null}
centroid_fc(fields_container, time_freq, step, time_freq_support, config)
```

**Parameters:**

* `fields_container` (*object*)
* `time_freq` (*object*)
* `step` (*object*)
* `time_freq_support` (*object*)
* `config` (*OperatorConfig*)

#### Constructor

```python theme={null}
centroid_fc(config)
```

**Parameters:**

* `config` (*OperatorConfig*)

## Methods

## Properties

#### inputs

**Type:** *InputSpec*

```python theme={null}
# Get or set the property
value = obj.inputs
obj.inputs = new_value
```

#### outputs

**Type:** *OutputSpec*

```python theme={null}
# Get or set the property
value = obj.outputs
obj.outputs = new_value
```

#### defaultConfig

**Type:** *Config*

```python theme={null}
# Get the property (read-only)
value = obj.defaultConfig
```
