Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
HASHpy
------

This fork contains two minor bug fixes that are necessary to get hashpy up and running smoothly in 2021:
* in hashpy/hashpype.py, change 'class HashError(StandardError):' to 'class HashError(Exception):'
* in hashpy/__init__.py, add a dot before 'hashpype' and 'doublecouple'

That's it. Thank you Luca Scarabello for figuring this out. Now let's go compute some FMs (\\__/)
- - - -






#### Original README: ####

[![DOI](https://zenodo.org/badge/3723/markcwill/hashpy.png)](http://dx.doi.org/10.5281/zenodo.9808)

This is a fork of HASH v1.2, the first motion focal mechanism program by Hardebeck and Shearer. The subroutines (in Fortran 77, which I did not write) are compiled into a python module, 'libhashpy.so', which will import all the subs and common blocks into the python namespace. There is a base class, HashPype, that contains attributes which hold data for a HASH calculation, and methods which can be called to do the HASH calculation. This class facilitates easily writing a 'hash driver' script in python. See below for details.
Expand Down
4 changes: 2 additions & 2 deletions hashpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

"""

from hashpype import HashPype, HashError
from doublecouple import DoubleCouple
from .hashpype import HashPype, HashError
from .doublecouple import DoubleCouple

__version__ = "0.5.6"

3 changes: 2 additions & 1 deletion hashpy/hashpype.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,8 @@ def driver3(self, check_for_minimum_picks=True, check_for_maximum_gap_size=True)
self.calculate_quality(use_amplitudes=True)


class HashError(StandardError):
#class HashError(StandardError):
class HashError(Exception):
"""Throw this if something happens while running"""
pass