Skip to content

Commit

Permalink
Merge pull request #11 from AFM-SPM/ns-rse/5-pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ns-rse authored Nov 17, 2023
2 parents 2d1f7bc + 4cce8de commit 3be2f3d
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 83 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md → COPYING
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ notice like this when it starts in an interactive mode:
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
The hypothetical commands `show w' and`show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".

Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@ A library for loading various AFM file formats.

File format support: `.asd`

## Usage:
## Usage

## .asd

You can open `.asd` files using the `load_asd` function. Just pass in the path to the file and the channel name that you want to use. (If in doubt use the `"TP"` topography channel).
You can open `.asd` files using the `load_asd` function. Just pass in the path to the file and the channel name that you
want to use. (If in doubt use the `"TP"` topography channel).

Note: For `.asd` files, there seem to only ever be two channels in one file. `"TP"` (topography) is the main one you
will want to use unless you know you specifically want something else.

Note: For `.asd` files, there seem to only ever be two channels in one file. `"TP"` (topography) is the main one you will want to use unless you know you specifically want something else.
Other channels: `"ER"` - Error, `"PH"` - Phase

```python
from topofileformats import load_asd

Expand Down
38 changes: 6 additions & 32 deletions examples/example_01.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -11,44 +11,19 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"file version: 0\n",
"{'channel1': 'TP', 'channel2': 'PH', 'header_length': 131, 'frame_header_length': 32, 'user_name_size': 14, 'comment_offset_size': 88, 'comment_size': 8, 'x_pixels': 256, 'y_pixels': 256, 'x_nm': 200, 'y_nm': 200, 'frame_time': 412.6285705566406, 'z_piezo_extension': 45.0, 'z_piezo_gain': 2.0, 'analogue_digital_range': '0x40000', 'analogue_digital_data_bits_size': 12, 'analogue_digital_resolution': 14, 'is_averaged': True, 'averaging_window': 1, 'year': 2022, 'month': 7, 'day': 15, 'hour': 16, 'minute': 44, 'second': 10, 'rounding_degree': 15, 'max_x_scan_range': 9900.0, 'max_y_scan_range': 4500.0, 'initial_frames': 142, 'num_frames': 142, 'afm_id': 0, 'file_id': 1110, 'user_name': 'biophys', 'scanner_sensitivity': 0.0, 'phase_sensitivity': 0.0, 'scan_direction': 10, 'comment_without_null': 'mica'}\n",
"Requested channel TP matches first channel in file: TP\n",
"Scaling factor: Type: TP -> TP | piezo extension 2.0 * piezo gain 45.0 = scaling factor 90.0\n",
"created voltage converter. ad_range: 0x40000 -> 262144, max voltage: 5.0, scaling factor: 90.0, resolution: 4096\n",
"Analogue to digital mapping | Range: 0x40000 -> (-5.0, 5.0)\n",
"Converter: <topofileformats.asd.BipolarConverter object at 0x104cbb5b0>\n"
]
}
],
"outputs": [],
"source": [
"FILE = \"../tests/resources/sample_0.asd\"\n",
"frames, pixel_to_nm_scaling, metadata = load_asd(file_path=FILE, channel=\"TP\")"
]
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAa4AAAGiCAYAAAC/NyLhAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAeoUlEQVR4nO3df2yV5f3/8VdL2yO/zulKaU+rgAWVH/JDBlgblbHR0AJjICwR7BwYApG1ZlBEVqMgblkdW7ZFhyNLFuoSQCURiWS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EmNOnTysvL09er1eJiYlauHChzp49ewPPoutcaX0WLFjwtZ+p3NzciDE36/oUFxdrwoQJ6tu3r1JSUjRr1izV1NREjLma36m6ujpNnz5dvXr1UkpKilasWKHW1tYbeSpd5mrWaNKkSV/7GXr88ccjxlzvGpkL12uvvabCwkKtXr1aH374ocaMGaOcnJyIf5iyO7n77rtVX18f3nbv3h0+tmzZMr311lvasmWLKioqdOLECc2ePTuKs+16TU1NGjNmjNatW9fu8bVr1+rFF1/U+vXrVVVVpd69eysnJ0fnz58Pj8nLy9PBgwdVWlqq7du3a9euXVq8ePGNOoUudaX1kaTc3NyIn6nNmzdHHL9Z16eiokL5+fnas2ePSktL1dLSoilTpqipqSk85kq/UxcvXtT06dN14cIFvffee3rllVdUUlKiVatWReOUOt3VrJEkLVq0KOJnaO3ateFjnbJGzph7773X5efnh29fvHjRpaenu+Li4ijOKjpWr17txowZ0+6xxsZGFx8f77Zs2RLe98knnzhJrrKy8gbNMLokua1bt4Zvt7W1Ob/f737729+G9zU2NjqPx+M2b97snHPu0KFDTpL74IMPwmPefvttFxMT4/7zn//csLnfCF9dH+ecmz9/vps5c+Y33qc7rc/JkyedJFdRUeGcu7rfqb///e8uNjbWBQKB8Jg///nPzuv1uubm5ht7AjfAV9fIOee+973vuZ///OffeJ/OWCNTz7guXLig6upqZWdnh/fFxsYqOztblZWVUZxZ9Bw+fFjp6ekaPHiw8vLyVFdXJ0mqrq5WS0tLxFoNGzZMAwcO7LZrdfToUQUCgYg18fl8yszMDK9JZWWlEhMTNX78+PCY7OxsxcbGqqqq6obPORrKy8uVkpKioUOHasmSJTp16lT4WHdan2AwKElKSkqSdHW/U5WVlRo1apRSU1PDY3JychQKhXTw4MEbOPsb46trdMnGjRuVnJyskSNHqqioSOfOnQsf64w1MvVHdr/44gtdvHgx4oQlKTU1VZ9++mmUZhU9mZmZKikp0dChQ1VfX681a9bowQcf1IEDBxQIBJSQkKDExMSI+6SmpioQCERnwlF26bzb+/m5dCwQCCglJSXieFxcnJKSkrrFuuXm5mr27NnKyMjQkSNH9PTTT2vq1KmqrKxUjx49us36tLW1aenSpbr//vs1cuRISbqq36lAINDuz9elYzeT9tZIkh555BENGjRI6enp2r9/v1auXKmamhq98cYbkjpnjUyFC5GmTp0a/nr06NHKzMzUoEGD9Prrr6tnz55RnBmsmjt3bvjrUaNGafTo0RoyZIjKy8s1efLkKM7sxsrPz9eBAwci3jNGpG9ao/99v3PUqFFKS0vT5MmTdeTIEQ0ZMqRTvreplwqTk5PVo0ePr13F09DQIL/fH6VZfXskJibqrrvuUm1trfx+vy5cuKDGxsaIMd15rS6d9+V+fvx+/9cu9GltbdXp06e75boNHjxYycnJqq2tldQ91qegoEDbt2/Xu+++q9tuuy28/2p+p/x+f7s/X5eO3Sy+aY3ak5mZKUkRP0PXu0amwpWQkKBx48aprKwsvK+trU1lZWXKysqK4sy+Hc6ePasjR44oLS1N48aNU3x8fMRa1dTUqK6urtuuVUZGhvx+f8SahEIhVVVVhdckKytLjY2Nqq6uDo/ZuXOn2trawr+A3cnx48d16tQppaWlSbq518c5p4KCAm3dulU7d+5URkZGxPGr+Z3KysrSxx9/HBH30tJSeb1ejRgx4sacSBe60hq1Z9++fZIU8TN03Wt0jReTRM2rr77qPB6PKykpcYcOHXKLFy92iYmJEVeodBfLly935eXl7ujRo+5f//qXy87OdsnJye7kyZPOOecef/xxN3DgQLdz5063d+9el5WV5bKysqI866515swZ99FHH7mPPvrISXK///3v3UcffeQ+++wz55xzL7zwgktMTHTbtm1z+/fvdzNnznQZGRnuyy+/DD9Gbm6uGzt2rKuqqnK7d+92d955p5s3b160TqlTXW59zpw545588klXWVnpjh496t555x333e9+1915553u/Pnz4ce4WddnyZIlzufzufLycldfXx/ezp07Fx5zpd+p1tZWN3LkSDdlyhS3b98+t2PHDte/f39XVFQUjVPqdFdao9raWvf888+7vXv3uqNHj7pt27a5wYMHu4kTJ4YfozPWyFy4nHPupZdecgMHDnQJCQnu3nvvdXv27In2lKLi4YcfdmlpaS4hIcHdeuut7uGHH3a1tbXh419++aX72c9+5r7zne+4Xr16uYceesjV19dHccZd791333WSvrbNnz/fOfffS+KfffZZl5qa6jwej5s8ebKrqamJeIxTp065efPmuT59+jiv1+see+wxd+bMmSicTee73PqcO3fOTZkyxfXv39/Fx8e7QYMGuUWLFn3tfwpv1vVpb10kuQ0bNoTHXM3v1L///W83depU17NnT5ecnOyWL1/uWlpabvDZdI0rrVFdXZ2bOHGiS0pKch6Px91xxx1uxYoVLhgMRjzO9a4R/6wJAMAUU+9xAQBAuAAAphAuAIAphAsAYArhAgCYQrgAAKYQLgCAKYQLAGAK4QIAmEK4AACmEC4AgCmECwBgyv8BeuOo1mVX2gkAAAAASUVORK5CYII=",
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"create_animation(file_name=\"sample_0\", frames=frames)"
]
Expand All @@ -71,8 +46,7 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.9"
},
"orig_nbformat": 4
}
},
"nbformat": 4,
"nbformat_minor": 2
Expand Down
12 changes: 3 additions & 9 deletions tests/test_asd.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
"""Test the functioning of loading .asd files."""

from topofileformats.asd import load_asd

from pathlib import Path
import pytest

import numpy as np
from topofileformats.asd import load_asd

BASE_DIR = Path.cwd()
RESOURCES = BASE_DIR / "tests" / "resources"


@pytest.mark.parametrize(
"file_name, channel, number_of_frames, pixel_to_nm_scaling",
("file_name", "channel", "number_of_frames", "pixel_to_nm_scaling"),
[
# File type 0
(
Expand All @@ -30,11 +27,8 @@
),
],
)
def test_load_asd(
file_name: str, channel: str, number_of_frames: int, pixel_to_nm_scaling: float
) -> None:
def test_load_asd(file_name: str, channel: str, number_of_frames: int, pixel_to_nm_scaling: float) -> None:
"""Test the normal operation of loading a .asd file."""

result_frames = list
result_pixel_to_nm_scaling = float
result_metadata = dict
Expand Down
1 change: 1 addition & 0 deletions topofileformats/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""topofileformats."""
Loading

0 comments on commit 3be2f3d

Please sign in to comment.