Metadata-Version: 2.4
Name: dascorepy
Version: 0.1.0
Summary: A DASCore patch bridge to DASPy.
License: MIT License
        
        Copyright (c) 2026 DASDAE
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: dascore>=0.1.15
Requires-Dist: daspy-toolbox>=1.2.3
Requires-Dist: unidas>=0.1.0
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: ruff; extra == "test"
Requires-Dist: ty; extra == "test"
Provides-Extra: docs
Requires-Dist: great-docs; extra == "docs"
Requires-Dist: matplotlib; extra == "docs"
Dynamic: license-file

# dascorepy

A DASCore bridge to DASPy.

`dascorepy` exposes selected DASPy functionality on DASCore patches through the `patch.daspy` namespace. It focuses on DASPy operations that DASCore does not already provide, while preserving DASCore semantics.

## Installation

```bash
uv pip install dascorepy
```

## Usage

```python
import dascore as dc

patch = dc.get_example_patch("example_event_1")

denoised = patch.daspy.common_mode_noise_removal()
velocity = patch.daspy.fk_rescaling()
```

## Namespace Methods

| Method | What it adds |
| --- | --- |
| [`to_section`](`~DaspyPatchNamespace.to_section`) | Convert a DASCore patch to a DASPy `Section`. |
| [`common_mode_noise_removal`](`~DaspyPatchNamespace.common_mode_noise_removal`) | Remove common-mode noise with DASPy. |
| [`curvelet_denoising`](`~DaspyPatchNamespace.curvelet_denoising`) | Reduce stochastic noise with curvelet denoising. |
| [`channel_checking`](`~DaspyPatchNamespace.channel_checking`) | Detect bad channels from per-channel energy, or keep only good channels. |
| [`turning_points`](`~DaspyPatchNamespace.turning_points`) | Add a boolean `turning_point` coordinate along distance. |
| [`curvelet_windowing`](`~DaspyPatchNamespace.curvelet_windowing`) | Retain, remove, or decompose energy by apparent velocity. |
| [`fk_rescaling`](`~DaspyPatchNamespace.fk_rescaling`) | Convert strain or strain rate with FK-domain rescaling. |
| [`curvelet_conversion`](`~DaspyPatchNamespace.curvelet_conversion`) | Convert strain or strain rate with DASPy curvelets. |
| [`slant_stacking`](`~DaspyPatchNamespace.slant_stacking`) | Convert strain or strain rate with local slant stacking. |

## DASPy Reference

This package wraps algorithms from DASPy. If you use this package in research, please cite DASPy:

```
Hu, M., & Li, Z. (2024). DASPy: A Python toolbox for DAS seismology. Seismological Research Letters, 95(5), 3055-3066.
doi: 10.1785/0220240124
```

See also the DASPy [Publication page](https://hmz-03.github.io/publications/2024-07-26-DASPy) and [DASPy tutorial](https://daspy-tutorial.readthedocs.io/en/latest/).
