Skip to content

Commit 3f07e6c

Browse files
update generated code (#1479)
Co-authored-by: rlagha <[email protected]>
1 parent e4675cc commit 3f07e6c

23 files changed

+1365
-1366
lines changed

doc/source/_static/dpf_operators.html

Lines changed: 8 additions & 8 deletions
Large diffs are not rendered by default.

src/ansys/dpf/core/operators/math/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@
6868
from .qr_solve import qr_solve
6969
from .real_part import real_part
7070
from .relative_error import relative_error
71-
from .sampler import sampler
7271
from .scale import scale
7372
from .scale_by_field import scale_by_field
7473
from .scale_by_field_fc import scale_by_field_fc
@@ -79,8 +78,6 @@
7978
from .sqr_fc import sqr_fc
8079
from .sqrt import sqrt
8180
from .sqrt_fc import sqrt_fc
82-
from .stft import stft
83-
from .stft_fc import stft_fc
8481
from .svd import svd
8582
from .sweeping_phase import sweeping_phase
8683
from .sweeping_phase_fc import sweeping_phase_fc

src/ansys/dpf/core/operators/math/correlation.py

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,20 @@
1313

1414
class correlation(Operator):
1515
"""Takes two fields and a weighting and computes their correlation:
16-
aMb/(||aMa||.||bMb||).
16+
aMb/(||aMa||.||bMb||). If several b fields are provided (via a
17+
fields container), correlation is computed for each of them.
1718
1819
Parameters
1920
----------
2021
fieldA : Field or float
22+
Field a. the reference field.
2123
fieldB : Field or FieldsContainer
22-
ponderation : Field
24+
Field b. if a fields container is provided,
25+
correlation is computed for each
26+
field.
27+
ponderation : Field or FieldsContainer
28+
Field m, optional weighting for correclation
29+
computation.
2330
2431
2532
Examples
@@ -65,41 +72,48 @@ def __init__(
6572
@staticmethod
6673
def _spec():
6774
description = """Takes two fields and a weighting and computes their correlation:
68-
aMb/(||aMa||.||bMb||)."""
75+
aMb/(||aMa||.||bMb||). If several b fields are provided
76+
(via a fields container), correlation is computed for each
77+
of them."""
6978
spec = Specification(
7079
description=description,
7180
map_input_pin_spec={
7281
0: PinSpecification(
7382
name="fieldA",
7483
type_names=["field", "double", "vector<double>"],
7584
optional=False,
76-
document="""""",
85+
document="""Field a. the reference field.""",
7786
),
7887
1: PinSpecification(
7988
name="fieldB",
8089
type_names=["field", "fields_container"],
8190
optional=False,
82-
document="""""",
91+
document="""Field b. if a fields container is provided,
92+
correlation is computed for each
93+
field.""",
8394
),
8495
2: PinSpecification(
8596
name="ponderation",
86-
type_names=["field"],
97+
type_names=["field", "fields_container"],
8798
optional=False,
88-
document="""""",
99+
document="""Field m, optional weighting for correclation
100+
computation.""",
89101
),
90102
},
91103
map_output_pin_spec={
92104
0: PinSpecification(
93105
name="field",
94106
type_names=["field"],
95107
optional=False,
96-
document="""""",
108+
document="""Correlation factor for each input field b.""",
97109
),
98110
1: PinSpecification(
99111
name="index",
100112
type_names=["int32"],
101113
optional=False,
102-
document="""""",
114+
document="""If several b are provided, this output
115+
contains the index of the highest
116+
correlation factor.""",
103117
),
104118
},
105119
)
@@ -171,6 +185,8 @@ def __init__(self, op: Operator):
171185
def fieldA(self):
172186
"""Allows to connect fieldA input to the operator.
173187
188+
Field a. the reference field.
189+
174190
Parameters
175191
----------
176192
my_fieldA : Field or float
@@ -189,6 +205,10 @@ def fieldA(self):
189205
def fieldB(self):
190206
"""Allows to connect fieldB input to the operator.
191207
208+
Field b. if a fields container is provided,
209+
correlation is computed for each
210+
field.
211+
192212
Parameters
193213
----------
194214
my_fieldB : Field or FieldsContainer
@@ -207,9 +227,12 @@ def fieldB(self):
207227
def ponderation(self):
208228
"""Allows to connect ponderation input to the operator.
209229
230+
Field m, optional weighting for correclation
231+
computation.
232+
210233
Parameters
211234
----------
212-
my_ponderation : Field
235+
my_ponderation : Field or FieldsContainer
213236
214237
Examples
215238
--------

src/ansys/dpf/core/operators/math/sampler.py

Lines changed: 0 additions & 245 deletions
This file was deleted.

0 commit comments

Comments
 (0)