turn .py files into wrpll_simulation package

py files & notebook: update import
docs: update install instructions
This commit is contained in:
morgan 2023-12-13 15:51:46 +08:00
parent 8be1abe80b
commit 6e562732e5
8 changed files with 9 additions and 8 deletions

View File

@ -6,13 +6,13 @@ A time domain simulation for WRPLL
### Poetry:
```bash
poetry install --no-root
poetry install
poetry run jupyter lab
```
### Poetry shell:
```bash
poetry install --no-root
poetry install
poetry shell
```

View File

@ -39,7 +39,7 @@
"from plotly.subplots import make_subplots\n",
"import plotly.graph_objects as go\n",
"import numpy as np\n",
"from wrpll import WRPLL_simulator"
"from wrpll_simulation.wrpll import WRPLL_simulator"
]
},
{

View File

@ -39,7 +39,7 @@
"from plotly.subplots import make_subplots\n",
"import plotly.graph_objects as go\n",
"import numpy as np\n",
"from wrpll import WRPLL_simulator"
"from wrpll_simulation.wrpll import WRPLL_simulator"
]
},
{
@ -103,6 +103,7 @@
"fig.add_trace(go.Scattergl(name='main'), hf_x=wrpll_sim.time, hf_y=wrpll_sim.main, row=2, col=1)\n",
"fig.add_trace(go.Scattergl(name='helper'), hf_x=wrpll_sim.time, hf_y=wrpll_sim.helper-1, row=2, col=1)\n",
"\n",
"\n",
"fig.update_layout(\n",
" xaxis2=dict(title=\"time (sec)\"),\n",
"\n",

View File

@ -42,7 +42,7 @@
"from plotly.subplots import make_subplots\n",
"import plotly.graph_objects as go\n",
"import numpy as np\n",
"from wrpll import WRPLL_simulator"
"from wrpll_simulation.wrpll import WRPLL_simulator"
]
},
{

View File

View File

@ -1,6 +1,6 @@
import numpy as np
from numba import njit
from wave_gen import square
from wrpll_simulation.wave_gen import square
@njit

View File

@ -1,6 +1,6 @@
import numpy as np
from wave_gen import white_noise
from sim import simulation_jit
from wrpll_simulation.sim import simulation_jit
from wrpll_simulation.wave_gen import white_noise
class WRPLL_simulator():