Skip to content

Commit

Permalink
update generated code (#1479)
Browse files Browse the repository at this point in the history
Co-authored-by: rlagha <[email protected]>
  • Loading branch information
pyansys-ci-bot and rlagha authored Mar 25, 2024
1 parent e4675cc commit 3f07e6c
Show file tree
Hide file tree
Showing 23 changed files with 1,365 additions and 1,366 deletions.
16 changes: 8 additions & 8 deletions doc/source/_static/dpf_operators.html

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions src/ansys/dpf/core/operators/math/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
from .qr_solve import qr_solve
from .real_part import real_part
from .relative_error import relative_error
from .sampler import sampler
from .scale import scale
from .scale_by_field import scale_by_field
from .scale_by_field_fc import scale_by_field_fc
Expand All @@ -79,8 +78,6 @@
from .sqr_fc import sqr_fc
from .sqrt import sqrt
from .sqrt_fc import sqrt_fc
from .stft import stft
from .stft_fc import stft_fc
from .svd import svd
from .sweeping_phase import sweeping_phase
from .sweeping_phase_fc import sweeping_phase_fc
Expand Down
43 changes: 33 additions & 10 deletions src/ansys/dpf/core/operators/math/correlation.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,20 @@

class correlation(Operator):
"""Takes two fields and a weighting and computes their correlation:
aMb/(||aMa||.||bMb||).
aMb/(||aMa||.||bMb||). If several b fields are provided (via a
fields container), correlation is computed for each of them.

Parameters
----------
fieldA : Field or float
Field a. the reference field.
fieldB : Field or FieldsContainer
ponderation : Field
Field b. if a fields container is provided,
correlation is computed for each
field.
ponderation : Field or FieldsContainer
Field m, optional weighting for correclation
computation.


Examples
Expand Down Expand Up @@ -65,41 +72,48 @@ def __init__(
@staticmethod
def _spec():
description = """Takes two fields and a weighting and computes their correlation:
aMb/(||aMa||.||bMb||)."""
aMb/(||aMa||.||bMb||). If several b fields are provided
(via a fields container), correlation is computed for each
of them."""
spec = Specification(
description=description,
map_input_pin_spec={
0: PinSpecification(
name="fieldA",
type_names=["field", "double", "vector<double>"],
optional=False,
document="""""",
document="""Field a. the reference field.""",
),
1: PinSpecification(
name="fieldB",
type_names=["field", "fields_container"],
optional=False,
document="""""",
document="""Field b. if a fields container is provided,
correlation is computed for each
field.""",
),
2: PinSpecification(
name="ponderation",
type_names=["field"],
type_names=["field", "fields_container"],
optional=False,
document="""""",
document="""Field m, optional weighting for correclation
computation.""",
),
},
map_output_pin_spec={
0: PinSpecification(
name="field",
type_names=["field"],
optional=False,
document="""""",
document="""Correlation factor for each input field b.""",
),
1: PinSpecification(
name="index",
type_names=["int32"],
optional=False,
document="""""",
document="""If several b are provided, this output
contains the index of the highest
correlation factor.""",
),
},
)
Expand Down Expand Up @@ -171,6 +185,8 @@ def __init__(self, op: Operator):
def fieldA(self):
"""Allows to connect fieldA input to the operator.

Field a. the reference field.

Parameters
----------
my_fieldA : Field or float
Expand All @@ -189,6 +205,10 @@ def fieldA(self):
def fieldB(self):
"""Allows to connect fieldB input to the operator.

Field b. if a fields container is provided,
correlation is computed for each
field.

Parameters
----------
my_fieldB : Field or FieldsContainer
Expand All @@ -207,9 +227,12 @@ def fieldB(self):
def ponderation(self):
"""Allows to connect ponderation input to the operator.

Field m, optional weighting for correclation
computation.

Parameters
----------
my_ponderation : Field
my_ponderation : Field or FieldsContainer

Examples
--------
Expand Down
245 changes: 0 additions & 245 deletions src/ansys/dpf/core/operators/math/sampler.py

This file was deleted.

Loading

0 comments on commit 3f07e6c

Please sign in to comment.