Skip to content

Commit

Permalink
chore: topofileformats > AFMReader (notebooks, __init__.py, README.md)
Browse files Browse the repository at this point in the history
Expunging the last references to `topofileformats` and converting to `AFMReader`

+ `README.md`
+ `.gitignore`
+ `examples/example_01.ipynb`
+ `AFMReader/__init__.py`
  • Loading branch information
ns-rse committed May 7, 2024
1 parent 64bd391 commit 4c229a3
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@ _version.py
\#*

# Ignore topostats/_version.py as per setuptools_scm
topofileformats/_version.py
AFMReader/_version.py
2 changes: 1 addition & 1 deletion AFMReader/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

from importlib.metadata import version

release = version("topofileformats")
release = version("AFMReader")
__version__ = ".".join(release.split("."[:2]))
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# topofileformats
# AFMReader

<div align="center">

[![PyPI version](https://badge.fury.io/py/topofileformats.svg)](https://badge.fury.io/py/topofileformats)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/topofileformats)
[![PyPI version](https://badge.fury.io/py/AFMReader.svg)](https://badge.fury.io/py/AFMReader)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/AFMReader)
[![Code style: Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Code style: flake8](https://img.shields.io/badge/code%20style-flake8-456789.svg)](https://github.com/psf/flake8)
<!-- [![codecov](https://codecov.io/gh/AFM-SPM/topofileformats/branch/dev/graph/badge.svg)]
(https://codecov.io/gh/AFM-SPM/topofileformats) -->
<!-- [![codecov](https://codecov.io/gh/AFM-SPM/AFMReader/branch/dev/graph/badge.svg)]
(https://codecov.io/gh/AFM-SPM/AFMReader) -->
[![pre-commit.ci
status](https://results.pre-commit.ci/badge/github/AFM-SPM/topofileformats/main.svg)](https://results.pre-commit.ci/latest/github/AFM-SPM/topofileformats/main)
status](https://results.pre-commit.ci/badge/github/AFM-SPM/AFMReader/main.svg)](https://results.pre-commit.ci/latest/github/AFM-SPM/AFMReader/main)

</div>

Expand All @@ -27,7 +27,7 @@ Supported file formats
| `.jpk` | [Bruker](https://www.bruker.com/) |

Support for the following additional formats is planned. Some of these are already supported in TopoStats and are
awaiting refactoring to move their functionality into topofileformats these are denoted in bold below.
awaiting refactoring to move their functionality into AFMReader these are denoted in bold below.

| File format | Description | Status |
|-------------|---------------------------------------------------------|--------------------------------------------|
Expand All @@ -38,7 +38,7 @@ awaiting refactoring to move their functionality into topofileformats these are

## Usage

If you wish to process AFM images supported by `topofileformats` it is recommend you use
If you wish to process AFM images supported by `AFMReader` it is recommend you use
[TopoStats](https://github.com/AFM-SPM/TopoStats) to do so, however the library can be used on its own.

### .spm
Expand All @@ -48,7 +48,7 @@ channel name that you want to use. (If in doubt use one of the following: "Heigh
"Height Sensor").

```python
from topofileformats.spm import load_spm
from AFMReader.spm import load_spm

image, pixel_to_nanometre_scaling_factor = load_spm(file_path="./my_spm_file.spm", channel="Height")
```
Expand All @@ -64,7 +64,7 @@ will want to use unless you know you specifically want something else.
Other channels: `"ER"` - Error, `"PH"` - Phase

```python
from topofileformats.asd import load_asd
from AFMReader.asd import load_asd

frames, pixel_to_nanometre_scaling_factor, metadata = load_asd(file_path="./my_asd_file.asd", channel="TP")
```
Expand All @@ -76,7 +76,7 @@ and the channel name that you want to use. (If in doubt, use `HeightTracee` (yes
extra 'e'), `ZSensorTrace`, or `ZSensor`).

```python
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")
```
Expand All @@ -87,19 +87,19 @@ You can open `.jpk` files using the `load_jpk` function. Just pass in the path
to the file and the channel name you want to use. (If in doubt, use `height_trace` or `measuredHeight_trace`).

```python
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")
```

## Contributing

Bug reports and feature requests are welcome. Please search for existing issues, if none relating to your bug/feature
are found then feel free to create a new [issue](https://github.com/AFM-SPM/topofileformats/issues/new) detailing what
are found then feel free to create a new [issue](https://github.com/AFM-SPM/AFMReader/issues/new) detailing what
went wrong or the feature you would like to see implemented.

Pull requests are also welcome, please note that we have a [Code of
Conduct](https://github.com/AFM-SPM/topofileformats/blob/main/CODE_OF_CONDUCT.md).
Conduct](https://github.com/AFM-SPM/AFMReader/blob/main/CODE_OF_CONDUCT.md).

### Setup

Expand All @@ -112,9 +112,9 @@ dependencies and `pre-commit` as shown below.
``` bash
# Activate your virtual environment, this will depend on which system you use e.g. conda or virtualenvwrapper
# Clone the repository
git clone git@github.com:AFM-SPM/topofileformats.git
git clone git@github.com:AFM-SPM/AFMReader.git
# Change directories into the newly cloned directory
cd topofileformats
cd AFMReader
# Install the package along with the optional development (dev) dependencies
pip install -e .[dev]
# Install pre-commit
Expand Down
22 changes: 11 additions & 11 deletions examples/example_01.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"source": [
"from pathlib import Path\n",
"\n",
"# Import the load_spm from topofileformats\n",
"from topofileformats.spm import load_spm\n",
"from topofileformats.logging import logger\n",
"# Import the load_spm from AFMReader\n",
"from AFMReader.spm import load_spm\n",
"from AFMReader.logging import logger\n",
"\n",
"logger.enable(__package__)"
]
Expand Down Expand Up @@ -60,8 +60,8 @@
"metadata": {},
"outputs": [],
"source": [
"# Import the load_asd from topofileformats\n",
"from topofileformats.asd import load_asd, create_animation"
"# Import the load_asd from AFMReader\n",
"from AFMReader.asd import load_asd, create_animation"
]
},
{
Expand Down Expand Up @@ -114,8 +114,8 @@
"metadata": {},
"outputs": [],
"source": [
"# Import the load_jpk function from topofileformats\n",
"from topofileformats.jpk import load_jpk"
"# Import the load_jpk function from AFMReader\n",
"from AFMReader.jpk import load_jpk"
]
},
{
Expand Down Expand Up @@ -155,8 +155,8 @@
"metadata": {},
"outputs": [],
"source": [
"# Import the load_ibw function from topofileformats\n",
"from topofileformats.ibw import load_ibw"
"# Import the load_ibw function from AFMReader\n",
"from AFMReader.ibw import load_ibw"
]
},
{
Expand Down Expand Up @@ -196,8 +196,8 @@
"metadata": {},
"outputs": [],
"source": [
"# Import the load_ibw function from topofileformats\n",
"from topofileformats.ibw import load_ibw"
"# Import the load_ibw function from AFMReader\n",
"from AFMReader.ibw import load_ibw"
]
},
{
Expand Down

0 comments on commit 4c229a3

Please sign in to comment.