Skip to content

Commit

Permalink
chore: topofileformats > AFMReader for module and update imports
Browse files Browse the repository at this point in the history
+ Forgot the `topofileformats` directory that holds package needs renaming to `AFMReader`.
+ Updates all imports to work with new package name.
  • Loading branch information
ns-rse committed May 7, 2024
1 parent 6732a36 commit c30ed9f
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 9 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions topofileformats/asd.py → AFMReader/asd.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
from matplotlib import animation


from topofileformats.logging import logger
from topofileformats.io import (
from AFMReader.logging import logger
from AFMReader.io import (
read_int32,
read_int16,
read_float,
Expand Down
4 changes: 2 additions & 2 deletions topofileformats/ibw.py → AFMReader/ibw.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import numpy as np
from igor2 import binarywave

from topofileformats.logging import logger
from AFMReader.logging import logger

logger.enable(__package__)

Expand Down Expand Up @@ -66,7 +66,7 @@ def load_ibw(file_path: Path | str, channel: str) -> tuple[np.ndarray, float]:
Load the image and pixel to nanometre scaling factor - 'HeightTracee' is the default channel name (the extra 'e' is
not a typo!).
>>> from topofileformats.ibw import load_ibw
>>> from AFMReader.ibw import load_ibw
>>> image, pixel_to_nanometre_scaling_factor = load_ibw(file_path="./my_ibw_file.ibw", channel="HeightTracee")
"""
logger.info(f"Loading image from : {file_path}")
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions topofileformats/jpk.py → AFMReader/jpk.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import numpy as np
import tifffile

from topofileformats.logging import logger
from AFMReader.logging import logger

logger.enable(__package__)

Expand Down Expand Up @@ -63,7 +63,7 @@ def load_jpk(file_path: Path | str, channel: str) -> tuple[np.ndarray, float]:
--------
Load height trace channel from the .jpk file. 'height_trace' is the default channel name.
>>> from topofileformats.jpk import load_jpk
>>> from AFMReader.jpk import load_jpk
>>> image, pixel_to_nanometre_scaling_factor = load_jpk(file_path="./my_jpk_file.jpk", channel="height_trace")
"""
logger.info(f"Loading image from : {file_path}")
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions topofileformats/spm.py → AFMReader/spm.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import pySPM
import numpy as np

from topofileformats.logging import logger
from AFMReader.logging import logger

logger.enable(__package__)

Expand Down Expand Up @@ -72,7 +72,7 @@ def load_spm(file_path: Path | str, channel: str) -> tuple:
Load the image and pixel to nanometre scaling factor, available channels are 'Height', 'ZSensor' and 'Height
Sensor'.
>>> from topofileformats.spm import load_spm
>>> from AFMReader.spm import load_spm
>>> image, pixel_to_nm = load_spm(file_path="path/to/file.spm", channel="Height")
```
"""
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ dev = [
"pytest",
"pytest-cov",
"pylint",
"ruff"
"ruff",
"setuptools_scm[toml]",
]

[project.urls]
Expand Down

0 comments on commit c30ed9f

Please sign in to comment.