Coder Social home page Coder Social logo

hmtk's People

Contributors

daniviga avatar g-weatherill avatar julgp avatar klunk386 avatar luisera avatar matley avatar micheles avatar mmpagani avatar nackerley avatar nastasi-oq avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hmtk's Issues

plotting.seismicity.catalogue_plots.plot_observed_recurrence error using numpy 1.8.1

When using Numpy v 1.8.1 the plot_observed_recurrence gives the following error

/home/gw/Documents/hmtk/hmtk/hmtk/plotting/seismicity/catalogue_plots.py in plot_observed_recurrence(catalogue, completeness, dmag, end_year, filename, filetype, dpi)
319 completeness,
320 dmag,
--> 321 end_year)
322 plt.figure(figsize=DEFAULT_SIZE)
323 plt.semilogy(recurrence[:, 0], recurrence[:, 1], 'bo')

/home/gw/Documents/hmtk/hmtk/hmtk/plotting/seismicity/catalogue_plots.py in get_completeness_adjusted_table(catalogue, completeness, dmag, end_year)
288 if iloc == n_comp - 1:
289 print temp_rates, obs_idx
--> 290 obs_rates[obs_idx] = temp_rates
291 else:
292 obs_rates[obs_idx[:-1]] = temp_rates
ValueError: NumPy boolean array indexing assignment cannot assign 25 input values to the 26 output values where the mask is true

Missing setup.py

A setup.py must be added to allow easy installation of the toolkit without the need to change the PYTHONPATH, like:

pip install -e hmtk/

numpy.arange is half-open --> you exclude the last bin

By chance I stumbled on this:
In several functions you use the numpy.arange method.
The way you use it affects e.g.
the plot_depth_histogram method in
hmtk/plotting/seismicity/catalogue_plots.py
where you exclude the largest depth in the catalogue from the plot.

Instead of
numpy.arange(0.,max_depth,bin_width)
I'd do something like:
numpy.arange(0.,max_depth+bin_width,bin_width)

I saw several other lines where this might cause problems

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.