Skip to content

Commit

Permalink
Merge pull request #50 from flatironinstitute/reparametrize_raisedcosine
Browse files Browse the repository at this point in the history
Reparametrize raisedcosine
  • Loading branch information
BalzaniEdoardo authored Dec 19, 2023
2 parents 2dcf1b2 + 14055b6 commit 6f210b4
Show file tree
Hide file tree
Showing 5 changed files with 384 additions and 165 deletions.
4 changes: 1 addition & 3 deletions docs/developers_notes/01-basis_module.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ Abstract Class Basis
│ │
│ └─ Concrete Subclass CyclicBSplineBasis
├─ Abstract Subclass RaisedCosineBasis
│ │
│ ├─ Concrete Subclass RaisedCosineBasisLinear
├─ Concrete Subclass RaisedCosineBasisLinear
│ │
│ └─ Concrete Subclass RaisedCosineBasisLog
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/plot_1D_basis_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@
# evaluate a log-spaced cosine raised function basis.

# Instantiate the basis noting that the `RaisedCosineBasisLog` does not require an `order` parameter
raised_cosine_log = nmo.basis.RaisedCosineBasisLog(n_basis_funcs=10)
raised_cosine_log = nmo.basis.RaisedCosineBasisLog(n_basis_funcs=10, width=1.5, time_scaling=50)

# Evaluate the raised cosine basis at the equi-spaced sample points
# (same method in all Basis elements)
samples, eval_basis = raised_cosine_log.evaluate_on_grid(1000)
samples, eval_basis = raised_cosine_log.evaluate_on_grid(100)

# Plot the evaluated log-spaced raised cosine basis
plt.figure()
Expand Down
10 changes: 1 addition & 9 deletions src/nemos/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
#!/usr/bin/env python3

from . import (
basis,
exceptions,
glm,
observation_models,
regularizer,
simulation,
utils,
)
from . import basis, exceptions, glm, observation_models, regularizer, simulation, utils
Loading

0 comments on commit 6f210b4

Please sign in to comment.