Skip to content

Commit

Permalink
Fix precision matters for small time shifts and upgrade basemap libra…
Browse files Browse the repository at this point in the history
…ry that fixes plot bug
  • Loading branch information
nikosT committed Nov 9, 2023
1 parent 43d20e3 commit 59591a6
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 63 deletions.
123 changes: 62 additions & 61 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,68 +4,68 @@ channels:
- conda-forge
- defaults
dependencies:
- _libgcc_mutex=0.1=conda_forge
- _openmp_mutex=4.5=1_gnu
- basemap=1.2.2=py39h523bb60_3
- basemap-data-hires=1.2.2=0
- c-ares=1.17.1=h36c2ea0_0
- ca-certificates=2020.10.14=0
- certifi=2020.12.5=py39hf3d152e_1
- cycler=0.10.0=py_2
- freetype=2.10.4=h0708190_1
- geos=3.8.1=he1b5a44_0
- jinja2=2.11.2=py_0
- jpeg=9d=h36c2ea0_0
- kiwisolver=1.3.1=py39h1a9c180_1
- krb5=1.17.2=h926e7f8_0
- lcms2=2.12=hddcbb42_0
- ld_impl_linux-64=2.35.1=hea4e1c9_2
- libblas=3.9.0=8_openblas
- libcblas=3.9.0=8_openblas
- libcurl=7.71.1=hcdd3856_8
- libedit=3.1.20191231=he28a2e2_2
- libev=4.33=h516909a_1
- libffi=3.3=h58526e2_2
- libgcc-ng=9.3.0=h2828fa1_18
- libgfortran-ng=9.3.0=hff62375_18
- libgfortran5=9.3.0=hff62375_18
- libgomp=9.3.0=h2828fa1_18
- liblapack=3.9.0=8_openblas
- libnghttp2=1.43.0=h812cca2_0
- libopenblas=0.3.12=pthreads_h4812303_1
- libpng=1.6.37=h21135ba_2
- libssh2=1.9.0=hab1572f_5
- libstdcxx-ng=9.3.0=h6de172a_18
- libtiff=4.2.0=hdc55705_0
- libwebp-base=1.2.0=h7f98852_0
- lz4-c=1.9.3=h9c3ff4c_0
- markupsafe=1.1.1=py39h3811e60_3
- matplotlib-base=3.3.4=py39h2fa2bec_0
- ncurses=6.2=h58526e2_4
- numpy=1.20.1=py39hdbf815f_0
- olefile=0.46=pyh9f0ad1d_1
- openssl=1.1.1k=h7f98852_0
- pillow=8.1.0=py39hf95b381_2
- pip=21.0.1=pyhd8ed1ab_0
- proj=7.2.0=h277dcde_2
- pyparsing=2.4.7=pyh9f0ad1d_0
- pyproj=3.0.0.post1=py39hb427721_0
- pyshp=2.1.3=pyh44b312d_0
- python=3.9.2=hffdb5ce_0_cpython
- python-dateutil=2.8.1=py_0
- python_abi=3.9=1_cp39
- readline=8.0=he28a2e2_2
- setuptools=49.6.0=py39hf3d152e_3
- six=1.15.0=pyh9f0ad1d_0
- sqlite=3.34.0=h74cdb3f_0
- tk=8.6.10=h21135ba_1
- tornado=6.1=py39h3811e60_1
- tzdata=2021a=he74cb21_0
- wheel=0.36.2=pyhd3deb0d_0
- xz=5.2.5=h516909a_1
- zlib=1.2.11=h516909a_1010
- zstd=1.4.8=ha95c52a_1
- _libgcc_mutex=0.1
- _openmp_mutex=4.5
- basemap-data=1.3.2
- basemap-data-hires=1.3.2
- c-ares=1.17.1
- ca-certificates=2023.7.22
- certifi=2023.7.22
- cycler=0.10.0
- freetype=2.10.4
- geos=3.8.1
- jinja2=2.11.2
- jpeg=9d
- kiwisolver=1.3.1
- krb5=1.17.2
- lcms2=2.12
- ld_impl_linux-64=2.35.1
- libblas=3.9.0
- libcblas=3.9.0
- libcurl=7.71.1
- libedit=3.1.20191231
- libev=4.33
- libffi=3.3
- libgcc-ng=9.3.0
- libgfortran-ng=9.3.0
- libgfortran5=9.3.0
- libgomp=9.3.0
- liblapack=3.9.0
- libnghttp2=1.43.0
- libopenblas=0.3.12
- libpng=1.6.37
- libssh2=1.9.0
- libstdcxx-ng=9.3.0
- libtiff=4.2.0
- libwebp-base=1.2.0
- lz4-c=1.9.3
- markupsafe=1.1.1
- matplotlib-base=3.3.4
- ncurses=6.2
- olefile=0.46
- openssl=1.1.1k
- pillow=8.1.0
- pip=21.0.1
- proj=7.2.0
- pyparsing=2.4.7
- pyproj=3.0.0.post1
- pyshp=2.1.3
- python=3.9.2
- python-dateutil=2.8.1
- python_abi=3.9
- readline=8.0
- setuptools=49.6.0
- six=1.15.0
- sqlite=3.34.0
- tk=8.6.10
- tornado=6.1
- tzdata=2021a
- wheel=0.36.2
- xz=5.2.5
- zlib=1.2.11
- zstd=1.4.8
- pip:
- basemap==1.3.8
- chardet==4.0.0
- decorator==4.4.2
- future==0.18.2
Expand All @@ -74,6 +74,7 @@ dependencies:
- geoparse==2.0.3
- idna==2.10
- lxml==4.6.2
- numpy==1.25.2
- obspy==1.2.2
- pandas==1.2.2
- pytz==2021.1
Expand Down
4 changes: 2 additions & 2 deletions src/isola.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ def calculateVariance(observed, synthetic, tl):
"""
with np.errstate(divide='raise'):
try:
dt = round((tl/8192.0),2)
dt = round((tl/8192.0),4)
obs = np.array(observed)
syn = np.array(synthetic)

ds = obs-syn
dsn = (np.linalg.norm(ds)**2)*dt
d = (np.linalg.norm(obs)**2)*dt

return round(1-(dsn/float(d)),2)
return round(1-(dsn/float(d)),4)
except FloatingPointError:
return None

Expand Down

0 comments on commit 59591a6

Please sign in to comment.