femtoapiwrap-0.5.3
توضیحات
FemtoAPI Python wrapper
| ویژگی | مقدار |
|---|---|
| سیستم عامل | Microsoft :: Windows :: Windows 10 |
| نام فایل | femtoapiwrap-0.5.3 |
| نام | femtoapiwrap |
| نسخه کتابخانه | 0.5.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Femtonics Ltd. |
| ایمیل نویسنده | support@femtonics.eu |
| آدرس صفحه اصلی | https://femtonics.eu |
| آدرس اینترنتی | https://pypi.org/project/femtoapiwrap/ |
| مجوز | GNU General Public License v2 (GPLv2) |
=======================
FemtoAPI Python Wrapper
=======================
Contents
========
This project contains a Python wrapper for calling the `Femto API`_ functions
of MESc software and additional utilities for handling the data obtained from
the API.
These are bundled in the ``femtoapiwrap`` package that gets installed using
basic setup.
For sample implementations for basic use cases, see the scripts in folder
``examples/basic``.
Modules (it's enough to import ``femtoapiwrap`` only):
* ``femtoapiwrap.api``: the low-level API functions
* ``femtoapiwrap.hi``: high-level types and methods
* ``femtoapiwrap.utils``: miscellaneous functions
* ``femtoapiwrap.errors``: custom exceptions
.. _`Femto API`: https://femtonics.atlassian.net/wiki/spaces/API2
Install
=======
Basic Setup
-----------
.. code:: console
$ cd <project-root>
$ pip install -U .
Checking version:
.. code:: python
import femtoapiwrap
print(femtoapiwrap.__version__)
Running Examples
----------------
Examples require additional dependencies, which can be installed like this:
.. code:: console
$ pip install -U .[examples]
Generating Documentation
------------------------
.. code:: console
$ cd <project-root>
$ pip install -U .[doc]
$ cd doc
$ make clean
$ make html
Then you can find the documentation at ``<project-root>/doc/_build/index.html``.
Rebuilding often requires the deletion of ``<project-root>/doc/parts/stubs`` too.
Running Tests
-------------
Run tests with coverage report:
.. code:: console
$ cd <project-root>
$ pip install .[test]
$ cd <project-root>/tests
$ coverage run --source femtoapiwrap -m unittest discover && coverage report
Some test cases need an accessible microscope or a running measurement.
By default, these are skipped and can be activated by setting ``1`` to the
environment variables ``FEMTOAPIWRAP_TEST_MICROSCOPE`` or ``FEMTOAPIWRAP_TEST_ONLINE``
respectively.
Purchase
========
To purchase FemtoAPI please contact `sales@femtonics.eu <sales@femtonics.eu>`_.
Disclaimer
==========
IN NO EVENT SHALL FEMTONICS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL,
INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE
USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF FEMTONICS HAS BEEN ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
FEMTONICS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS
PROVIDED "AS IS". FEMTONICS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
Changelog
=========
0.5.2
``hi.UnitMeta``
New attributes ``t_step_in_ms``, ``t_length_in_ms``,
``t_length_in_ms_actual``, ``file_handle`` and ``fs``.
``hi.Roi.from_tree``
Fixed loading optional fields (e. g. ``viewport_index``).
0.5.1
``hi.HighFemtoApi.read_points``
Fix: no longer raises ``EmptyJsonError`` when there are no points in the file.
``hi.Roi.to_px_coords``
New parameter ``closed``, with plotting example
0.5.0
``hi.Point.from_px_coords``
Support for 3D points as well.
``hi.Roi``
**Breaking change:** removed attributes ``viewport_rot`` and
``viewport_transl`` due to expected removal from FemtoAPI JSON object.
New attributes ``first_z_plane`` and ``last_z_plane`` for planned
support of ROIs in zStack measurements (not yet implemented in MESc).
``hi.Roi.from_px_coords``
**Breaking change:** replaced parameter ``viewport`` with ``viewport_index``.
``hi.Roi.to_tree``
**Breaking change:** removed parameters as the corresponding tree fields
can be filled from the attributes.
``hi.{FileMeta, SessionMeta}.from_tree``
Temporary fix to allow converted old MESc files pass the version validation.
0.4.0
``errors.*``
**Breaking changes:** Exceptions are no longer inherited from ``IOError``
as that was merged with ``OSError`` and ``FemtoApiWrapError`` subclasses
do not strictly related to OS error codes.
PEP-8 compliant and more informative naming:
* ``ConnectionFailed`` -> ``ApiConnectionError``
* ``MicroscopeTimedOut`` -> ``MeasurementTimeoutError``
* ``NodeNotFound`` -> ``NodeNotFoundError``
* ``NoMetaData`` -> ``EmptyJsonError``
* ``InvalidDimension`` -> ``DimensionError``
* ``InvalidPointGroup`` -> ``PointSeriesKeyError``
* ``UnsupportedVersion`` -> ``JsonVersionError``
``errors.ApiCommandError``
New exception to contain error information about FemtoAPI command failures.
``errors.ApiLoginError``
New exception.
``errors.NoMeasurementUnit``
**Removed**, merged with ``NodeNotFoundError``
``errors.InvalidMeasurementType``
**Removed**, it was unused.
0.3.1
``hi.Roi``
Added attribute ``background`` based on the previously unprocessed
JSON-attribute ``"role"``.
``hi.Roi.from_px_coords``
Added parameter ``background``.
0.3.0
``hi.HighFemtoApi.online_frames``
Fixed to take into account the actual number of frames received from MESc.
**Breaking change:** The actual start index is now included in the iterator.
Introduced the parameter ``strict`` to enforce chunks of equal length.
0.2.0.post1
Relaxed dependency version requirements.
0.2.0
Initial public release.
نیازمندی
| مقدار | نام |
|---|---|
| ==1.0.0 | femtoapi |
| - | PySide2 |
| - | numpy |
| >=1.2.0 | scipy |
| ==0.1.8 | upolygon |
| - | sphinx |
| ==0.18.1 | docutils |
| - | sphinx-rtd-theme |
| - | h5py |
| ==9.1.1 | Pillow |
| - | matplotlib |
| - | coverage |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| <=3.8.13,>=3.8 | Python |
نحوه نصب
نصب پکیج whl femtoapiwrap-0.5.3:
pip install femtoapiwrap-0.5.3.whl
نصب پکیج tar.gz femtoapiwrap-0.5.3:
pip install femtoapiwrap-0.5.3.tar.gz