Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analysis of the shock #48

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Analysis of the shock #48

wants to merge 2 commits into from

Conversation

GabrieleDello
Copy link
Contributor

Shock test analysis: time history plot (without vdv and rms for shock events), calculation of the max peak value of the event

Shock test analysis: time history plot (without vdv and rms for shock events), calculation of the max peak value of the event
@moorepants
Copy link
Contributor

This PR fails with:

Traceback (most recent call last):
  File "/home/moorepants/Manuscripts/baby-vibration/src/website.py", line 475, in <module>
    p = sns.lmplot(
        data=stats_df[stats_df['Vehicle Type'] == 'bicycle'],
    ...<6 lines>...
        facet_kws={'sharey': False},
    )
  File "/home/moorepants/miniconda/envs/baby-vibration/lib/python3.13/site-packages/seaborn/regression.py", line 651, in lmplot
    facets.map_dataframe(regplot, x=x, y=y, **regplot_kws)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/moorepants/miniconda/envs/baby-vibration/lib/python3.13/site-packages/seaborn/axisgrid.py", line 825, in map_dataframe
    self._facet_plot(func, ax, args, kwargs)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/moorepants/miniconda/envs/baby-vibration/lib/python3.13/site-packages/seaborn/axisgrid.py", line 854, in _facet_plot
    func(*plot_args, **plot_kwargs)
    ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/moorepants/miniconda/envs/baby-vibration/lib/python3.13/site-packages/seaborn/regression.py", line 763, in regplot
    plotter = _RegressionPlotter(x, y, data, x_estimator, x_bins, x_ci,
                                 scatter, fit_reg, ci, n_boot, units, seed,
                                 order, logistic, lowess, robust, logx,
                                 x_partial, y_partial, truncate, dropna,
                                 x_jitter, y_jitter, color, label)
  File "/home/moorepants/miniconda/envs/baby-vibration/lib/python3.13/site-packages/seaborn/regression.py", line 123, in __init__
    x_discrete, x_bins = self.bin_predictor(x_bins)
                         ~~~~~~~~~~~~~~~~~~^^^^^^^^
  File "/home/moorepants/miniconda/envs/baby-vibration/lib/python3.13/site-packages/seaborn/regression.py", line 338, in bin_predictor
    bins = np.percentile(x, percentiles)
  File "/home/moorepants/miniconda/envs/baby-vibration/lib/python3.13/site-packages/numpy/lib/_function_base_impl.py", line 4273, in percentile
    return _quantile_unchecked(
        a, q, axis, out, overwrite_input, method, keepdims, weights)
  File "/home/moorepants/miniconda/envs/baby-vibration/lib/python3.13/site-packages/numpy/lib/_function_base_impl.py", line 4550, in _quantile_unchecked
    return _ureduce(a,
                    func=_quantile_ureduce_func,
    ...<5 lines>...
                    overwrite_input=overwrite_input,
                    method=method)
  File "/home/moorepants/miniconda/envs/baby-vibration/lib/python3.13/site-packages/numpy/lib/_function_base_impl.py", line 3894, in _ureduce
    r = func(a, **kwargs)
  File "/home/moorepants/miniconda/envs/baby-vibration/lib/python3.13/site-packages/numpy/lib/_function_base_impl.py", line 4727, in _quantile_ureduce_func
    result = _quantile(arr,
                       quantiles=q,
    ...<2 lines>...
                       out=out,
                       weights=wgt)
  File "/home/moorepants/miniconda/envs/baby-vibration/lib/python3.13/site-packages/numpy/lib/_function_base_impl.py", line 4849, in _quantile
    slices_having_nans = np.isnan(arr[-1, ...])
                                  ~~~^^^^^^^^^
IndexError: index -1 is out of bounds for axis 0 with size 0

@moorepants
Copy link
Contributor

This figure is also changed and not correct:
image

Many of the figures are not adapted to shock. That also needs to be addressed before merging.

@moorepants
Copy link
Contributor

moorepants commented Jan 18, 2025

No time history plots are produced for the shock in the website.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants