Skip to content

def_geo1 Validation Error in SingleSetup for MAC Calculation (AttributeError on input types) #41

@romero-patrick

Description

@romero-patrick

Hello,

I am configuring a PyOMA2 SingleSetup instance for rotating machinery analysis. My primary goal is to define geometry and sensor directions, which is crucial for accurately using combined 2D mode shapes ($\Phi_X$ and $\Phi_Y$) for MAC calculation.

I am encountering recurring validation errors when calling X_dir.def_geo1(...) on a SingleSetup instance, suggesting a conflict in expected input types within the internal check_on_geo1 function.

Context

  1. Instance: X_dir = SingleSetup(data_time_x, fs = fs)
  2. Objective: Define sensor directions for accurate mode shape comparison (MAC).
  3. Setup Logic: To bypass the "Multi-setup" error, I manually set the reference indices (required for SingleSetup):
    # N_sensors = 7
    X_dir.ref_ind = np.array([np.arange(N_sensors)])

Validation Issue Summary

The system demands conflicting types for the mandatory arguments. For example:

  • sens_coord validation requires the DataFrame to be indexed by sensor names (ValueError fixed by indexing).
  • sens_names as list[str] raises AttributeError: 'list' object has no attribute 'empty', suggesting a DataFrame is needed internally.
  • sens_dir often causes AttributeError when converted from DataFrame to numpy.ndarray internally (e.g., trying to call .empty on the resulting array).

Request

What is the exact, successful data format (e.g., List of Strings, NumPy Array, or Pandas DataFrame with indexed names) required for all three mandatory arguments (sens_names, sens_coord, and sens_dir) when using def_geo1 on a SingleSetup instance?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions