Skip to content

v2-rebase-main #84

@krisvanneste

Description

@krisvanneste

Claudio,

I tested the v2-rebase-main branch, and I encountered one issue and some minor ones:

  • The main issue concerns the free_surface_amplification configuration parameter. If not set specifically, it defaults to ['2.0']. However, the _get_free_surface_amplification in ssp_build_spectra.py expects a scalar or a tuple of tuples. It thus raises an error, causing all spectra to be skipped. I think this is why you had to create an empty source_spec.conf in your notebook (marked as #FIXME)
  • A minor issue is that an error occurs when trying to plot the stacked spectrum to screen, when config.options.outdir is set to None. This can be solved easily by replacing the last line in the plot_stacked_spectra function:
    _savefig(fig)

by

    if config.plot_show:
        plt.show()
    if config.plot_save:
        _savefig(fig)

similar to the other plotting functions

  • Finally, I ran in some problems with my default python environment, which is still on python 3.7.10. This version does not support the := operator (used in config.py and config_helpers.py), nor the use of the |= operator with dictionaries (used in configobj.helpers.py. I realize I will have to update my environment eventually, but on the other hand I'm wondering if it is worth making sourcespec incompatible with all python versions before 3.9? Of course, this is your decision.

I also tested the feature to calculate travel times from a 1D velocity model, ported from v1, and it appears to work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions