Skip to content

Commit 3aa8155

Browse files
committed
fixed init and added source install instructions
1 parent f1f4e32 commit 3aa8155

File tree

6 files changed

+130
-66
lines changed

6 files changed

+130
-66
lines changed

README.md

+26-11
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Included in this package is a set of Jupyter Notebooks, which give examples on h
3333
These notebooks can be installed (in a local folder `Notebooks`) from the package by running:
3434

3535
```python
36-
import telewavesim.doc as doc
36+
from telewavesim import doc
3737
doc.install_doc(path='Notebooks')
3838
```
3939

@@ -86,10 +86,10 @@ where `telewavesim` can be installed along with its dependencies.
8686
conda create -n tws python=3.7 obspy pyfftw -c conda-forge
8787
```
8888

89-
- or create it from the `tws_env.yml` file by first cloning the repository:
89+
- or create it from the `tws_env.yml` file by first checking out the repository:
9090

9191
```bash
92-
git clone https://github.com/paudetseis/Telewavesim.git
92+
git checkout https://github.com/paudetseis/Telewavesim.git
9393
cd Telewavesim
9494
conda env create -f tws_env.yml
9595
```
@@ -106,23 +106,25 @@ Install `telewavesim` with `pip`:
106106
pip install telewavesim
107107
```
108108

109-
## Usage
110-
111-
Telewavesim consists of Python wrappers around Fortran routines that return the Fourier transform of displacement seismograms in three components (see `Jupyter` notebooks for details). The Python modules can be used to define new elastic stiffness matrices or change the input parameters for the Fortran subroutines. Python modules are available for post-processing as well (e.g., calculation of receiver functions).
112-
113-
A series of tests are located in the ``tests`` subdirectory. In order to perform these tests, clone the reposotiry and run `pytest` (`conda install pytest` if needed):
109+
### Installing from source
114110

111+
First clone the repository:
115112
```bash
116-
git checkout https://github.com/paudetseis/Telewavesim.git
113+
git clone https://github.com/paudetseis/Telewavesim.git
117114
cd Telewavesim
118-
pytest -v
119115
```
120116

117+
Next we recommend following the steps for creating a `conda` environment (see above). Then install using `pip`:
118+
119+
```bash
120+
pip install .
121+
```
122+
121123
---
122124
**NOTE**
123125

124126
If you are actively working on the code, or making frequent edits, it is advisable to perform
125-
installation from source using ``pip`` with the `-e` flag:
127+
installation from source with the `-e` flag:
126128

127129
```bash
128130
pip install -e .
@@ -134,6 +136,19 @@ package available on the system.
134136

135137
---
136138

139+
## Usage
140+
141+
Telewavesim consists of Python wrappers around Fortran routines that return the Fourier transform of displacement seismograms in three components (see `Jupyter` notebooks for details). The Python modules can be used to define new elastic stiffness matrices or change the input parameters for the Fortran subroutines. Python modules are available for post-processing as well (e.g., calculation of receiver functions).
142+
143+
A series of tests are located in the ``tests`` subdirectory. In order to perform these tests, clone the reposotiry and run `pytest` (`conda install pytest` if needed):
144+
145+
```bash
146+
git checkout https://github.com/paudetseis/Telewavesim.git
147+
cd Telewavesim
148+
pytest -v
149+
```
150+
151+
137152
## References
138153
1. Audet, P. (2016). Receiver functions using OBS data: promises and limitations from numerical modelling and examples from the Cascadia Initiative. Geophysical Journal International, 205, 1740-1755. https://doi.org/10.1093/gji/ggw111
139154
2. Kennett, B.L.N. (1983). Seismic wave propagation in stratified media. Cambridge University Press, 342pp.

examples/.ipynb_checkpoints/0-Start-Here-checkpoint.ipynb

+26-11
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"These notebooks can be installed (in a local folder `Notebooks`) from the package by running:\n",
4040
"\n",
4141
"```python\n",
42-
"import telewavesim.doc as doc\n",
42+
"from telewavesim import doc\n",
4343
"doc.install_doc(path='Notebooks')\n",
4444
"```\n",
4545
"\n",
@@ -92,10 +92,10 @@
9292
"conda create -n tws python=3.7 obspy pyfftw -c conda-forge\n",
9393
"```\n",
9494
"\n",
95-
"- or create it from the `tws_env.yml` file by first cloning the repository:\n",
95+
"- or create it from the `tws_env.yml` file by first checking out the repository:\n",
9696
"\n",
9797
"```bash\n",
98-
"git clone https://github.com/paudetseis/Telewavesim.git\n",
98+
"git checkout https://github.com/paudetseis/Telewavesim.git\n",
9999
"cd Telewavesim\n",
100100
"conda env create -f tws_env.yml\n",
101101
"```\n",
@@ -112,23 +112,25 @@
112112
"pip install telewavesim\n",
113113
"```\n",
114114
"\n",
115-
"## Usage\n",
116-
"\n",
117-
"Telewavesim consists of Python wrappers around Fortran routines that return the Fourier transform of displacement seismograms in three components (see `Jupyter` notebooks for details). The Python modules can be used to define new elastic stiffness matrices or change the input parameters for the Fortran subroutines. Python modules are available for post-processing as well (e.g., calculation of receiver functions).\n",
118-
"\n",
119-
"A series of tests are located in the ``tests`` subdirectory. In order to perform these tests, clone the reposotiry and run `pytest` (`conda install pytest` if needed):\n",
115+
"### Installing from source\n",
120116
"\n",
117+
"First clone the repository:\n",
121118
"```bash\n",
122-
"git checkout https://github.com/paudetseis/Telewavesim.git\n",
119+
"git clone https://github.com/paudetseis/Telewavesim.git\n",
123120
"cd Telewavesim\n",
124-
"pytest -v\n",
125121
"```\n",
126122
"\n",
123+
"Next we recommend following the steps for creating a `conda` environment (see above). Then install using `pip`:\n",
124+
"\n",
125+
"```bash\n",
126+
"pip install .\n",
127+
"``` \n",
128+
"\n",
127129
"---\n",
128130
"**NOTE**\n",
129131
"\n",
130132
"If you are actively working on the code, or making frequent edits, it is advisable to perform \n",
131-
"installation from source using ``pip`` with the `-e` flag: \n",
133+
"installation from source with the `-e` flag: \n",
132134
"\n",
133135
"```bash\n",
134136
"pip install -e .\n",
@@ -140,6 +142,19 @@
140142
"\n",
141143
"---\n",
142144
"\n",
145+
"## Usage\n",
146+
"\n",
147+
"Telewavesim consists of Python wrappers around Fortran routines that return the Fourier transform of displacement seismograms in three components (see `Jupyter` notebooks for details). The Python modules can be used to define new elastic stiffness matrices or change the input parameters for the Fortran subroutines. Python modules are available for post-processing as well (e.g., calculation of receiver functions).\n",
148+
"\n",
149+
"A series of tests are located in the ``tests`` subdirectory. In order to perform these tests, clone the reposotiry and run `pytest` (`conda install pytest` if needed):\n",
150+
"\n",
151+
"```bash\n",
152+
"git checkout https://github.com/paudetseis/Telewavesim.git\n",
153+
"cd Telewavesim\n",
154+
"pytest -v\n",
155+
"```\n",
156+
"\n",
157+
"\n",
143158
"## References\n",
144159
"1. Audet, P. (2016). Receiver functions using OBS data: promises and limitations from numerical modelling and examples from the Cascadia Initiative. Geophysical Journal International, 205, 1740-1755. https://doi.org/10.1093/gji/ggw111\n",
145160
"2. Kennett, B.L.N. (1983). Seismic wave propagation in stratified media. Cambridge University Press, 342pp.\n",

examples/0-Start-Here.ipynb

+26-11
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"These notebooks can be installed (in a local folder `Notebooks`) from the package by running:\n",
4040
"\n",
4141
"```python\n",
42-
"import telewavesim.doc as doc\n",
42+
"from telewavesim import doc\n",
4343
"doc.install_doc(path='Notebooks')\n",
4444
"```\n",
4545
"\n",
@@ -92,10 +92,10 @@
9292
"conda create -n tws python=3.7 obspy pyfftw -c conda-forge\n",
9393
"```\n",
9494
"\n",
95-
"- or create it from the `tws_env.yml` file by first cloning the repository:\n",
95+
"- or create it from the `tws_env.yml` file by first checking out the repository:\n",
9696
"\n",
9797
"```bash\n",
98-
"git clone https://github.com/paudetseis/Telewavesim.git\n",
98+
"git checkout https://github.com/paudetseis/Telewavesim.git\n",
9999
"cd Telewavesim\n",
100100
"conda env create -f tws_env.yml\n",
101101
"```\n",
@@ -112,23 +112,25 @@
112112
"pip install telewavesim\n",
113113
"```\n",
114114
"\n",
115-
"## Usage\n",
116-
"\n",
117-
"Telewavesim consists of Python wrappers around Fortran routines that return the Fourier transform of displacement seismograms in three components (see `Jupyter` notebooks for details). The Python modules can be used to define new elastic stiffness matrices or change the input parameters for the Fortran subroutines. Python modules are available for post-processing as well (e.g., calculation of receiver functions).\n",
118-
"\n",
119-
"A series of tests are located in the ``tests`` subdirectory. In order to perform these tests, clone the reposotiry and run `pytest` (`conda install pytest` if needed):\n",
115+
"### Installing from source\n",
120116
"\n",
117+
"First clone the repository:\n",
121118
"```bash\n",
122-
"git checkout https://github.com/paudetseis/Telewavesim.git\n",
119+
"git clone https://github.com/paudetseis/Telewavesim.git\n",
123120
"cd Telewavesim\n",
124-
"pytest -v\n",
125121
"```\n",
126122
"\n",
123+
"Next we recommend following the steps for creating a `conda` environment (see above). Then install using `pip`:\n",
124+
"\n",
125+
"```bash\n",
126+
"pip install .\n",
127+
"``` \n",
128+
"\n",
127129
"---\n",
128130
"**NOTE**\n",
129131
"\n",
130132
"If you are actively working on the code, or making frequent edits, it is advisable to perform \n",
131-
"installation from source using ``pip`` with the `-e` flag: \n",
133+
"installation from source with the `-e` flag: \n",
132134
"\n",
133135
"```bash\n",
134136
"pip install -e .\n",
@@ -140,6 +142,19 @@
140142
"\n",
141143
"---\n",
142144
"\n",
145+
"## Usage\n",
146+
"\n",
147+
"Telewavesim consists of Python wrappers around Fortran routines that return the Fourier transform of displacement seismograms in three components (see `Jupyter` notebooks for details). The Python modules can be used to define new elastic stiffness matrices or change the input parameters for the Fortran subroutines. Python modules are available for post-processing as well (e.g., calculation of receiver functions).\n",
148+
"\n",
149+
"A series of tests are located in the ``tests`` subdirectory. In order to perform these tests, clone the reposotiry and run `pytest` (`conda install pytest` if needed):\n",
150+
"\n",
151+
"```bash\n",
152+
"git checkout https://github.com/paudetseis/Telewavesim.git\n",
153+
"cd Telewavesim\n",
154+
"pytest -v\n",
155+
"```\n",
156+
"\n",
157+
"\n",
143158
"## References\n",
144159
"1. Audet, P. (2016). Receiver functions using OBS data: promises and limitations from numerical modelling and examples from the Cascadia Initiative. Geophysical Journal International, 205, 1740-1755. https://doi.org/10.1093/gji/ggw111\n",
145160
"2. Kennett, B.L.N. (1983). Seismic wave propagation in stratified media. Cambridge University Press, 342pp.\n",

examples/Notebooks/sim_obs_Audet2016.ipynb

+44-24
Large diffs are not rendered by default.

setup.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66

77
setup(
88
name = 'telewavesim',
9-
version = '0.0.6',
9+
version = '0.0.7',
1010
description = 'Python package for teleseismic body-wave modeling',
1111
author = 'Pascal Audet, Colin J. Thomson, Michael G. Bostock',
1212
maintainer = 'Pascal Audet',
1313
author_email = '[email protected]',
1414
url = 'https://github.com/paudetseis/Telewavesim',
15-
download_url = 'https://github.com/paudetseis/Telewavesim/archive/0.0.6.tar.gz',
15+
download_url = 'https://github.com/paudetseis/Telewavesim/archive/0.0.7.tar.gz',
1616
classifiers = [
1717
'Development Status :: 3 - Alpha',
1818
'License :: OSI Approved :: MIT License',
@@ -28,7 +28,6 @@
2828
'telewavesim': [
2929
'examples/*.ipynb',
3030
'examples/models/*.txt',
31-
'examples/Notebooks/*.ipynb',
3231
'examples/Notebooks/*.ipynb']
3332
}
3433
)

telewavesim/__init__.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@
116116
117117
"""
118118
# -*- coding: utf-8 -*-
119-
from .doc import install_doc
120-
from . import elast
121-
from . import conf
122-
from . import utils
123-
from . import wiggle
124-
from .rmat_f import *
119+
# from .doc import install_doc
120+
# from . import elast
121+
# from . import conf
122+
# from . import utils
123+
# from . import wiggle
124+
# from .rmat_f import *

0 commit comments

Comments
 (0)