You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/pull_request_template.md
+3-5Lines changed: 3 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,7 @@ Thanks for contributing to DASCore, community contributions are most welcomed!
3
3
4
4
Before contributing, please read through the [contributors doc](https://dascore.org/contributing/contributing.html)
5
5
6
-
Before making big changes to the code or adding large complex features, it is a good idea to
7
-
[open a discussion](https://github.com/DASDAE/dascore/discussions). Don't hesitate to ask a question or for
6
+
Before making big changes to the code or adding large complex features, it is a good idea to [open a discussion](https://github.com/DASDAE/dascore/discussions). Don't hesitate to ask a question or for
8
7
help if something isn't clear.
9
8
-->
10
9
@@ -22,7 +21,6 @@ pound sign, e.g. `#12` without the backticks)
22
21
I have (if applicable):
23
22
24
23
-[ ] referenced the GitHub issue this PR closes.
25
-
-[ ] documented the new feature with docstrings or appropriate doc page.
26
-
-[ ] included a test. See [testing guidelines](https://dascore.org/contributing/testing.html).
27
-
-[ ] your name has been added to the contributors page (docs/contributors.md).
24
+
-[ ] documented the new feature with docstrings and/or appropriate doc page.
25
+
-[ ] included tests. See [testing guidelines](https://dascore.org/contributing/testing.html).
28
26
-[ ] added the "ready_for_review" tag once the PR is ready to be reviewed.
Copy file name to clipboardExpand all lines: docs/contributing/contributing.qmd
+7-33Lines changed: 7 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ please be aware of our [code of conduct](code_of_conduct.qmd).
10
10
To start, clone DASCore and [install it in development mode](dev_install.qmd). If you are new to contributing to open-source projects, this [recipe](../recipes/how_to_contribute.qmd) provides step-by-step instructions.
11
11
12
12
Review how [DASCore's testing](testing.qmd) works, [how DASCore is documented](documentation.qmd),
13
-
[DAScore style and linting](style_and_linting.qmd), and the [general guidelines](general_guidelines.qmd).
13
+
[DASCore style and linting](style_and_linting.qmd), and the [general guidelines](general_guidelines.qmd).
14
14
15
15
16
16
@@ -20,38 +20,12 @@ Development planning and prioritization takes place [here](https://github.com/or
20
20
21
21
# DASCore or other DASDAE packages
22
22
23
-
You may wonder whether a new feature you'd like to add belongs in DASCore, or if it should be
24
-
part of another [DASDAE](https://github.com/DASDAE) package. The guiding principle is that
25
-
if it does not require additional dependencies and is not particularly specialized to
26
-
one sub-area of applied seismology, then it can be part of DASCore. What if the feature
27
-
you're interested in adding is generally applicable for many kinds of DAS data analysis, but
28
-
requires some additional package dependency? If this is the case, open a discussion describing
29
-
the feature, the additional dependency, and (optional but encouraged) other future
30
-
features that may also share this dependency. Typically we'll try to come to a clear consensus, then you can
31
-
move ahead with development. If the proposed DASCore dependency addition appears to be controversial, then you will
32
-
deliver a short presentation at one of the bi-weekly DASDAE developer team check-ins that should
33
-
describe the feature, the additional dependency (including the approximate size of the additional
34
-
software to be installed), and ideas for other features this dependency could enable.
35
-
Then the developer community in attendance will discuss the proposed change and take a vote (majority
36
-
approval required).
37
-
38
-
If you are interested in creating a new [DASDAE](https://github.com/DASDAE) package which uses
39
-
DASCore as a dependency, you are not required to hold it to the same style and testing guidelines
40
-
as DASCore, but you are encouraged to do so, and can use DASCore's setup as an example. Following
41
-
a common set of style and contributor workflows will make it easier for us to develop a
42
-
community of DASDAE developers who can easily move between using and developing any of the
43
-
DASDAE packages.
23
+
You may wonder whether a new feature you'd like to add belongs in DASCore, or if it should be part of another [DASDAE](https://github.com/DASDAE) package. The guiding principle is that if it does not require additional dependencies and is not particularly specialized to one sub-area of applied seismology, then it can be part of DASCore. What if the feature you're interested in adding is generally applicable for many kinds of DAS data analysis, but requires some additional package dependency? If this is the case, open a discussion describing the feature, the additional dependency, and (optional but encouraged) other future features that may also share this dependency. Typically we'll try to come to a clear consensus, then you can move ahead with development. If the proposed DASCore dependency addition appears to be controversial, then you will deliver a short presentation at one of the bi-weekly DASDAE developer team check-ins that should describe the feature, the additional dependency (including the approximate size of the additional software to be installed), and ideas for other features this dependency could enable. Then the developer community in attendance will discuss the proposed change and take a vote (majority approval required).
24
+
25
+
If you are interested in creating a new [DASDAE](https://github.com/DASDAE) package which uses DASCore as a dependency, you are not required to hold it to the same style and testing guidelines as DASCore, but you are encouraged to do so, and can use DASCore's setup as an example. Following a common set of style and contributor workflows will make it easier for us to develop a community of DASDAE developers who can easily move between using and developing any of the DASDAE packages.
44
26
45
27
# Leadership
46
28
47
-
Currently DASCore operates in BDFL mode during its initial construction phase,
48
-
with Derrick Chambers leading the oversight of the master branch, but this is
49
-
not intended to be the mode of operation in the future. At a DASDAE developer team check-in (currently biweekly), the team reviews contributions and nominates a leadership team for the next cycle based on contribution history.
50
-
51
-
Currently Eileen Martin and Ge Jin lead organizational activities (e.g. organize
52
-
team meetings, coordinate logistics of training and tutorial activities, enforcement
53
-
of community standards, approving travel and research assistantships for some contributors
54
-
at Colorado School of Mines) as PI and co-PI of the NSF Geoinformatics grant that is
55
-
supporting initial development of DASDAE packages. However, as the contributor
56
-
community grows beyond Colorado School of Mines, after the life of the grant, these
57
-
roles are intended to be rotating among community members.
29
+
Currently DASCore operates in BDFL mode during its initial construction phase, with Derrick Chambers leading the oversight of the master branch, but this is not intended to be the mode of operation in the future. At a DASDAE developer team check-in (currently biweekly), the team reviews contributions and nominates a leadership team for the next cycle based on contribution history.
30
+
31
+
Currently Eileen Martin and Ge Jin lead organizational activities (e.g. organize team meetings, coordinate logistics of training and tutorial activities, enforcement of community standards, approving travel and research assistantships for some contributors at Colorado School of Mines) as PI and co-PI of the NSF Geoinformatics grant that is supporting initial development of DASDAE packages. However, as the contributor community grows beyond Colorado School of Mines, after the life of the grant, these roles are intended to be rotating among community members.
Copy file name to clipboardExpand all lines: docs/contributing/new_format.qmd
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ To demonstrate this process, imagine adding support for a format called `jingle`
18
18
19
19
## Adding a New IO Module
20
20
21
-
First, we create a new io module called 'jingle' in DASCore's io module (dascore/io/jingle). Make sure there is a \__init__.py file in this module whose docstring describes basic use of the format and lists any non-obvious implementation details that might debug/improve the parser.
21
+
First, we create a new io module called 'jingle' in DASCore's io module (dascore/io/jingle). Make sure there is a \__init__.py file in this module whose docstring describes basic use of the format and lists any non-obvious implementation details that might help debug/improve the parser.
Next, create a `core.py` file in the new module (dascore/io/jingle/core.py). Start by creating a class called `JingleIOV1` which subclasses (`dascore.io.core.FiberIO`)[`dascore.io.core.FiberIO`]. Now, on your subclass, you need to implement the supported methods.
40
+
Next, create a `core.py` file in the new module (dascore/io/jingle/core.py). Start by creating a class called `JingleIOV1` which subclasses [`dascore.io.core.FiberIO`](`dascore.io.core.FiberIO`). Now, on your subclass, you need to implement the supported methods.
Copy file name to clipboardExpand all lines: docs/contributing/profiling_benchmarks.qmd
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ If you find a significant issue, you can profile the problematic benchmark(s) to
21
21
For example, suppose you notice a large increase in runtime for the pass_filter benchmark in the patch_benchmarks' TestProcessingBenchmarks class. Run the benchmark again under profiling:
This will create a new `prof` folder with `test_pass_filter_performance.prof` as one of the files. You can view these with a variety of tools, such as [snakeviz](https://jiffyclub.github.io/snakeviz/) (assuming you installed snakeviz with `pip install snakeviz`).
Copy file name to clipboardExpand all lines: docs/contributing/publish_a_new_release.qmd
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,11 @@
2
2
title: "Publish a new release"
3
3
---
4
4
5
-
On this page, we provide a step-by-step guidance on how to publish a new release for DASCore.
5
+
On this page, we provide step-by-step guidance on how to publish a new release for DASCore.
6
6
7
7
## Step 1: Draft a new release and publish
8
8
9
-
On DASCore GitHub page, you should go to [Releases](https://github.com/DASDAE/dascore/releases), draft a new release. On the draft, choose a new tag a release title (e.g. 0.0.14). Finally, generate release notes and publish the relase.
9
+
On DASCore GitHub page, you should go to [Releases](https://github.com/DASDAE/dascore/releases), draft a new release. On the draft, choose a new tag and a release title (e.g. 0.0.14). Finally, generate release notes and publish the release.
Copy file name to clipboardExpand all lines: docs/contributing/style_and_linting.qmd
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ title: "Style and Linting"
5
5
# Linting
6
6
7
7
DASCore uses [Black](https://github.com/ambv/black) and [flake8](http://flake8.pycqa.org/en/latest/) for code linting.
8
-
If you have [properly installed DASCore' pre-commit hooks](dev_install.qmd#setup-pre-commit-hooks) they will be
8
+
If you have [properly installed DASCore's pre-commit hooks](dev_install.qmd#setup-pre-commit-hooks) they will be
9
9
invoked automatically when you make a git commit. If any complaints are raised simply address them and try again.
10
10
11
11
Alternatively, before making a commit, you can run all the hooks on all the code like so:
@@ -20,5 +20,5 @@ will automatically fix the issue they raise on the first run.
20
20
# Type Hints
21
21
22
22
DASCore makes extensive use of Python 3's [type hints](https://docs.python.org/3/library/typing.html).
23
-
Use them to annotate any public functions/methods. See the docstring section of the [documentation page](documentation.qml)
23
+
Use them to annotate any public functions/methods. See the docstring section of the [documentation page](documentation.qmd)
Copy file name to clipboardExpand all lines: docs/notes/dft_notes.qmd
+17-17Lines changed: 17 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ These notes provide the reasoning for DASCore's [fourier](`dascore.transform.fou
4
4
5
5
## Summary {#sec-summary}
6
6
7
-
- When performing discrete fourier transforms, DACore multiplies numpy's fft output by the coordinate spacing in order to:
7
+
- When performing discrete fourier transforms, DASCore multiplies numpy's fft output by the coordinate spacing in order to:
8
8
9
9
- Produce the same units as the continuous fourier transform
10
10
- Preserve energy between the initial and transformed signals
@@ -55,7 +55,7 @@ Before defining the Discrete Fourier Transform (DFT), let's first consider how w
55
55
56
56
2. Energy Preservation: From @eq-3, integrating the square of the untransformed data should yield the same value as integrating the square of the amplitude spectra.
57
57
58
-
3. The amplitude of the zero frequency should be equal to the integral of the time series.
58
+
3. The amplitude of the zero frequency should be equal to the integral of the signal.
59
59
60
60
Now, let's look at Numpy's DFT, which is defined as:
61
61
@@ -65,11 +65,11 @@ $${#eq-4}
65
65
66
66
where $a$ is the untransformed series of length $n$, $A$ is the transformed discrete series with elements corresponding to frequency bins ($k$, $k=0, ..., n-1$)
67
67
68
-
Right away you might notice some reasons @eq-4 can't meet our expectations. First, nowhere are the units of $a$'s axis multiplied by the summation. Since the exponential term must be unit-less, $a$ must have the same units as $A$. Next, the energy can't be preserved since the number of elements in the summation increases as $n$ increases. Lastly, $A(0) = \sum_{m=0}^{n-1} a_m$ which is not the integral, but the sum, of $a$ (it doesn't consider sample spacing).
68
+
Right away you might notice some reasons @eq-4 can't meet our expectations. First, nowhere are the units of $a$'s axis multiplied in the summation. Since the exponential term must be unit-less, $a$ must have the same units as $A$. Next, the energy can't be preserved since the number of elements in the summation increases as $n$ increases. Lastly, $A(0) = \sum_{m=0}^{n-1} a_m$ which is not the integral, but the sum, of $a$ (it doesn't consider sample spacing).
69
69
70
70
## Two Sine Waves
71
71
72
-
To illustrate some of these issues, consider a sine waves with amplitude of $\pm$ $b_0$ and dominant frequency of $f_0$ Hz.
72
+
To illustrate some of these issues, consider a sine wave with amplitude of $\pm$ $b_0$ and dominant frequency of $f_0$ Hz.
73
73
74
74
$$
75
75
f(x) = b_0 sin(2 \pi\ f_0 x)
@@ -83,11 +83,11 @@ $${#eq-6}
83
83
84
84
Where $\delta$ is the Dirac delta distribution.
85
85
86
-
To discretize @eq-5, let $f_0 = 2$, the total signal duration ($T$) = 5 seconds, and $b_0$ = 1. We create two sine waves, one with 500 samples and one with 1000 samples. When we naively perform the dft, [shift the zero frequency to the center](https://numpy.org/doc/stable/reference/generated/numpy.fft.fftshift.html), and plot the amplitude spectra get the following:
86
+
To discretize @eq-5, let $f_0 = 2$, the total signal duration ($T$) = 5 seconds, and $b_0$ = 1. We create two sine waves, one with 500 samples and one with 1000 samples. When we naively perform the dft, [shift the zero frequency to the center](https://numpy.org/doc/stable/reference/generated/numpy.fft.fftshift.html), and plot the amplitude spectra we get the following:
As expected, both outputs have spikes at $\pm f_0$ (5Hz), but the amplitude of the 1000 sample function 2X larger than the 500 sample function. This isn't entirely surprising; from @eq-6 we expect the amplitude to tend toward infinity as the signal moves from discrete to continuous ($n \rightarrow \infty$). However, this scaling is typically not useful. Certainly, it won't meet our expectations stated above.
140
+
As expected, both outputs have spikes at $\pm f_0$ (2Hz), but the amplitude of the 1000 sample function is 2X larger than the 500 sample function. This isn't entirely surprising; from @eq-6 we expect the amplitude to tend toward infinity as the signal moves from discrete to continuous ($n \rightarrow \infty$). However, this scaling is typically not useful. Certainly, it won't meet our expectations stated above.
141
141
142
142
## Scaling
143
143
144
144
One approach to fix scaling discrepancy is to divide each amplitude spectrum by the number of samples. After which, they have nearly identical spectral amplitudes.
@@ -182,7 +182,7 @@ print(f"fft n-scaled (n={len(t2)}) energy {fft2_energy:.02f}")
182
182
183
183
It doesn't. And what about the units? As we saw above, $A$ in @eq-4 would have the same units as $a$.
184
184
185
-
What if, drawing inspiration from @eq-1, we simply scale the output units by the function's sample spacing ($dx$)? After all, the spacing and the number of samples is directly related by
185
+
What if, drawing inspiration from @eq-1, we simply scale the output by the function's sample spacing ($dx$)? After all, the spacing and the number of samples is directly related by
186
186
187
187
$$
188
188
\frac{T}{n} = dx
@@ -191,16 +191,16 @@ $${#eq-7}
191
191
192
192
```{python}
193
193
#| code-fold: true
194
-
#| label: fig-dt-scalled-plot
195
-
#| fig-cap: "Sine amplitude spectrum scalled by dx"
194
+
#| label: fig-dt-scaled-plot
195
+
#| fig-cap: "Sine amplitude spectrum scaled by dx"
Copy file name to clipboardExpand all lines: docs/notes/velocity_to_strain_rate.qmd
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -77,7 +77,7 @@ plt.tight_layout()
77
77
78
78
Notice how the noisy channels around distance 2600m and 3400m have lower amplitude but occur along more channels when the `step_multiple` is increased.
79
79
80
-
Using the first function, the smallest `step_multiple` is 2. Despite treating the edges differently, the outputs of function 2 are nearly tha same as function 1 and no significant edge effects are observable.
80
+
Using the first function, the smallest `step_multiple` is 2. Despite treating the edges differently, the outputs of function 2 are nearly the same as function 1 and no significant edge effects are observable.
0 commit comments