Skip to content

Commit 907cd8a

Browse files
bch0wxumi1993
andauthored
PyAdjoint v0.2.3 (#17)
* simplify code + polish documentation (#10) * fixed typos and grammar inconsistencies throughout docs pages, identified by NG * removed redundant disclaimers and notes from individual misfit functions and placed them in the usage introduction page * declaring adjoint source types officially in the config class to be used as a check explicitely create config objects for each adjsrc type start process to remove 'choice' from calculate adjoint source function * removed choice from adjoint source types and instead rely on config object to determine whether DD measurements are being used. added a check statement in each of the adjoint source types to make sure that 2nd set waveforms are input if using DD * bump v number 0.2.1 * tests all passing after moving adjsrc_type logic for DD or other misfit functions into config and out of individual functions * updated docs to match new call structure * removing autoapi which got caught in the last commit * added new doc page for adding new adjoint sources * linking Config objects to each of the individual adjsrc pages * fix indent missing in docstring configs * updating simpson namespace for latest scipy * updating numpy ptp call for numpy>2.0.0 * updating simps namespace import for latest scipy all tests passing * bumps patch version for namespace updates * bugfix cc and multitaper (#16) * bump version number --------- Co-authored-by: Mijian Xu <[email protected]>
1 parent a892d3a commit 907cd8a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

pyadjoint/adjoint_source_types/multitaper_misfit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ def calculate_multitaper(self, d, s, tapers, wvec, nfreq_min, nfreq_max,
896896
# Create transfer function
897897
trans_func = np.zeros(self.nlen_f, dtype=complex)
898898
for i in range(nfreq_min, nfreq_max):
899-
if abs(bot_tf[i]) < wtr_use:
899+
if abs(bot_tf[i]) >= wtr_use:
900900
trans_func[i] = top_tf[i] / bot_tf[i]
901901
else:
902902
trans_func[i] = top_tf[i] / (bot_tf[i] + wtr_use)

pyadjoint/utils/cctm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def calculate_cc_shift(d, s, dt, use_cc_error=True, dt_sigma_min=1.0,
4545
# Uncertainty estimate based on cross-correlations to be used for norm.
4646
if use_cc_error:
4747
sigma_dt, sigma_dlna = calculate_cc_error(d=d, s=s, dt=dt,
48-
cc_shift=tshift, dlna=dlna,
48+
cc_shift=ishift, dlna=dlna,
4949
dt_sigma_min=dt_sigma_min,
5050
dlna_sigma_min=dlna_sigma_min
5151
)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "pyadjoint"
7-
version = "0.2.2"
7+
version = "0.2.3"
88
description = "Misfit measurement and adjoint source calculation"
99
readme = "README.md"
1010
requires-python = ">=3.7"

0 commit comments

Comments
 (0)