Skip to content

Commit

Permalink
docs in patch tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadtourei committed Mar 27, 2024
1 parent 42ea362 commit 3584d10
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion docs/tutorial/patch.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ Specific data formats may also add attributes (e.g. "gauge_length", "pulse_width

## String representation

DASCore Patches have as useful string representation:
DASCore Patches have a useful string representation:

```{python}
import dascore as dc
Expand All @@ -189,6 +189,19 @@ patch = dc.get_example_patch()
print(patch)
```

## Shortcuts

DASCore Patches offer useful shortcuts for quickly accessing information:

```{python}
import dascore as dc
patch = dc.get_example_patch()
print(patch.seconds) # to get the number of seconds in the patch.
print(patch.channel_count) # to get the number of channels in the patch.
```


# Selecting (trimming)

Patches are trimmed using the [`select`](`dascore.Patch.select`) method. Most commonly, `select` takes the coordinate name and a tuple of (lower_limit, upper_limit) as the values. Either limit can be `...` indicating an open interval.
Expand Down

0 comments on commit 3584d10

Please sign in to comment.