Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
dbfe255
Remove typesystem decorator from Table class
lang-m Feb 14, 2023
24b75c5
Re-write reading tabular data
lang-m Feb 16, 2023
2e2edeb
Explain problem in test
lang-m Feb 16, 2023
a565db7
Detect and remove duplication in the data.
lang-m Feb 17, 2023
fcd5dc7
Remove left-over print
lang-m Feb 17, 2023
32c12c2
Update _OOMMF_DICT (add prefix)
lang-m Feb 20, 2023
9864dbb
Re-write renaming functionality
lang-m Feb 20, 2023
f53eb6f
Re-order _OOMMF_DICT
lang-m Feb 20, 2023
a754952
Move tests for columns and units to Table class
lang-m Feb 20, 2023
db65079
Change variable names in _rename_column
lang-m Feb 20, 2023
5208279
Remove all functionality to read table data from file
lang-m Nov 29, 2023
4767a40
[WIP] update tests for generalised table
lang-m Oct 16, 2024
50984b8
Review unit tests and delete duplicated fixtures
lang-m Jun 9, 2026
e355c26
Provide sample data and update all doctests
lang-m Jun 10, 2026
fb8a826
Add conftest.py
lang-m Jun 10, 2026
1d688ff
Skip broken irfftn test
lang-m Jun 10, 2026
077e565
Drop code for deduplicating tables
lang-m Jun 10, 2026
38fb1f7
Update test
lang-m Jun 10, 2026
5fb4adc
Update notebook code (text outdated)
lang-m Jun 10, 2026
5b0e2d9
Update fft notebook
lang-m Jun 10, 2026
5af74b3
Table example: periodic data
lang-m Jun 12, 2026
778078e
Update ubermagtable/table.py
lang-m Jun 15, 2026
e4dd54e
Run table ifft doctest
lang-m Jun 15, 2026
5d8e397
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 15, 2026
8c74057
Adapt tests and fixtures to better mimic adapter behaviour
lang-m Jun 15, 2026
e3a82e2
Restructure tests; move reusable tests to 'testing' subpackage
lang-m Jun 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
963 changes: 57 additions & 906 deletions docs/table-basics.ipynb

Large diffs are not rendered by default.

399 changes: 135 additions & 264 deletions docs/table-fft.ipynb

Large diffs are not rendered by default.

77 changes: 29 additions & 48 deletions docs/table-interactive-plot.ipynb

Large diffs are not rendered by default.

65 changes: 12 additions & 53 deletions docs/table-merge.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,10 @@
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"\n",
"import ubermagtable as ut\n",
"\n",
"# Sample .odt file\n",
"dirname = os.path.join(\"..\", \"ubermagtable\", \"tests\", \"test_sample\")\n",
"odtfile1 = os.path.join(dirname, \"oommf-old-file1.odt\")\n",
"odtfile2 = os.path.join(dirname, \"oommf-old-file2.odt\")\n",
"\n",
"table1 = ut.Table.fromfile(odtfile1, x=\"t\")\n",
"table2 = ut.Table.fromfile(odtfile2, x=\"t\")"
"table1 = ut.sample_data()\n",
"table2 = ut.sample_data()"
]
},
{
Expand All @@ -47,7 +40,7 @@
{
"data": {
"text/plain": [
"2.4999999999999994e-11"
"3e-09"
]
},
"execution_count": 2,
Expand All @@ -74,7 +67,7 @@
{
"data": {
"text/plain": [
"1.5e-11"
"3e-09"
]
},
"execution_count": 3,
Expand Down Expand Up @@ -117,7 +110,7 @@
{
"data": {
"text/plain": [
"3.999999999999999e-11"
"6e-09"
]
},
"execution_count": 5,
Expand All @@ -144,46 +137,12 @@
{
"data": {
"text/plain": [
"0 1.000000e-12\n",
"1 2.000000e-12\n",
"2 3.000000e-12\n",
"3 4.000000e-12\n",
"4 5.000000e-12\n",
"5 6.000000e-12\n",
"6 7.000000e-12\n",
"7 8.000000e-12\n",
"8 9.000000e-12\n",
"9 1.000000e-11\n",
"10 1.100000e-11\n",
"11 1.200000e-11\n",
"12 1.300000e-11\n",
"13 1.400000e-11\n",
"14 1.500000e-11\n",
"15 1.600000e-11\n",
"16 1.700000e-11\n",
"17 1.800000e-11\n",
"18 1.900000e-11\n",
"19 2.000000e-11\n",
"20 2.100000e-11\n",
"21 2.200000e-11\n",
"22 2.300000e-11\n",
"23 2.400000e-11\n",
"24 2.500000e-11\n",
"25 2.600000e-11\n",
"26 2.700000e-11\n",
"27 2.800000e-11\n",
"28 2.900000e-11\n",
"29 3.000000e-11\n",
"30 3.100000e-11\n",
"31 3.200000e-11\n",
"32 3.300000e-11\n",
"33 3.400000e-11\n",
"34 3.500000e-11\n",
"35 3.600000e-11\n",
"36 3.700000e-11\n",
"37 3.800000e-11\n",
"38 3.900000e-11\n",
"39 4.000000e-11\n",
"0 1.000000e-09\n",
"1 2.000000e-09\n",
"2 3.000000e-09\n",
"3 4.000000e-09\n",
"4 5.000000e-09\n",
"5 6.000000e-09\n",
"Name: t, dtype: float64"
]
},
Expand Down Expand Up @@ -213,7 +172,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
"version": "3.13.2"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down
42 changes: 18 additions & 24 deletions docs/table-visualisation.ipynb

Large diffs are not rendered by default.

60 changes: 30 additions & 30 deletions docs/table-widgets.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,9 @@
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"\n",
"import ubermagtable as ut\n",
"\n",
"# Sample OOMMF .odt file\n",
"dirname = os.path.join(\"..\", \"ubermagtable\", \"tests\", \"test_sample\")\n",
"odtfile = os.path.join(dirname, \"oommf-new-file2.odt\")\n",
"\n",
"table = ut.Table.fromfile(odtfile, x=\"t\")"
"table = ut.sample_data()"
]
},
{
Expand All @@ -45,16 +39,17 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "348c4ac778bd4279af25ca083e0d34a0",
"model_id": "ce11de1a64ab4c6882ff2b3a0cdee488",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"SelectionRangeSlider(description='t (ps):', index=(0, 199), options=((1.0, 1e-12), (2.0, 2e-12), (3.0, 3e-12),…"
"SelectionRangeSlider(description='t (ns):', index=(0, 2), options=((1.0, 1e-09), (2.0, 2e-09), (3.0, 3e-09)), …"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "display_data"
"output_type": "execute_result"
}
],
"source": [
Expand All @@ -78,16 +73,17 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "0a902569d29145febb0e8580b488900a",
"model_id": "8e73256ba4f1490ab338c9684aa249db",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"SelectionRangeSlider(description='my slider', index=(0, 199), options=((1.0, 1e-12), (2.0, 2e-12), (3.0, 3e-12…"
"SelectionRangeSlider(description='my slider', index=(0, 2), options=((1.0, 1e-09), (2.0, 2e-09), (3.0, 3e-09))…"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "display_data"
"output_type": "execute_result"
}
],
"source": [
Expand All @@ -103,22 +99,23 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "435594b3eb794ddfb4e243cf0e24a328",
"model_id": "3ccd702fb7c34d25a8743c89c9e6ca4c",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"SelectionRangeSlider(description='t (ps):', index=(0, 199), options=((1.0, 1e-12), (2.0, 2e-12), (3.0, 3e-12),…"
"SelectionRangeSlider(description='t (ps):', index=(0, 2), options=((1000.0, 1e-09), (2000.0, 2e-09), (3000.0, …"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "display_data"
"output_type": "execute_result"
}
],
"source": [
Expand All @@ -136,22 +133,23 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "2465e3154649491c9a276190b62dc15a",
"model_id": "944b49e0875646499efc160ba47b6f18",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"SelectionRangeSlider(description='t (ps):', index=(0, 199), options=((1.0, 1e-12), (2.0, 2e-12), (3.0, 3e-12),…"
"SelectionRangeSlider(description='t (ns):', index=(0, 2), options=((1.0, 1e-09), (2.0, 2e-09), (3.0, 3e-09)), …"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "display_data"
"output_type": "execute_result"
}
],
"source": [
Expand All @@ -167,22 +165,23 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "34f5424734b04199a60046f707618ae0",
"model_id": "8efd830e7d3a4460a526de67891beb48",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"SelectionRangeSlider(description='mx:', index=(0, 199), options=((1.0, 1e-12), (2.0, 2e-12), (3.0, 3e-12), (4.…"
"SelectionRangeSlider(description='mx:', index=(0, 2), options=((1.0, 1e-09), (2.0, 2e-09), (3.0, 3e-09)), valu…"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "display_data"
"output_type": "execute_result"
}
],
"source": [
Expand All @@ -200,22 +199,23 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "55f5c0fdd22e466c9ade31ed1288d282",
"model_id": "4fe0be13b9374e33946002681270a4b1",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"SelectMultiple(description='y-axis:', index=(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)…"
"SelectMultiple(description='y-axis:', index=(0, 1, 2), options=('mx', 'my', 'mz'), value=('mx', 'my', 'mz'))"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "display_data"
"output_type": "execute_result"
}
],
"source": [
Expand Down Expand Up @@ -246,7 +246,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
"version": "3.13.2"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down
1 change: 1 addition & 0 deletions ubermagtable/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from .interact import interact as interact
from .table import Table as Table
from .table import sample_data as sample_data

# Enable default plotting style.
dirname = os.path.abspath(os.path.dirname(__file__))
Expand Down
8 changes: 1 addition & 7 deletions ubermagtable/interact.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,8 @@ def interact(**kwargs):
-------
1. Interactive plotting.

>>> import os
>>> import ubermagtable as ut
...
>>> dirname = os.path.join(os.path.dirname(__file__),
... 'tests', 'test_sample')
>>> odtfile = os.path.join(dirname, 'oommf-old-file1.odt')
...
>>> table = ut.Table.fromfile(odtfile, x='t')
>>> table = ut.sample_data()
>>> @ut.interact(xlim=table.slider()) # doctest: +SKIP
... def myplot(xlim):
... field.mpl(xlim=xlim)
Expand Down
Loading
Loading