Skip to content

User-provided parameters not properly set in ProcessData #334

@seismo-savi

Description

@seismo-savi

I am using MTUQ to produce ProcessData surface wave windows using the group_velocity window_type.
I have noticed that the window_alignment parameter is not set properly:
in line 298:
self.window_alignment = getattr(parameters, 'window_alignment', 0.5).

parameters is a dictionary, so it does not have attributes.

I have tried fixing this using:
self.window_alignment = parameters['window_alignment'] if 'window_alignment' in parameters.keys() else 0.5

and it seems to work in setting window_alignment properly to the user provided value

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions