Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ongoing development #3

Draft
wants to merge 26 commits into
base: devel
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e729c9d
add close connection
azazellochg Feb 8, 2023
05b1083
large refactoring, mainly to separate objects.py and client/sever logic
azazellochg Feb 12, 2023
151bc8c
continue refactoring, basic get/set/has seem to work remotely/locally
azazellochg Apr 5, 2023
74b9784
add feg regs script
azazellochg Jun 26, 2023
3e2e2e9
remove semccd
azazellochg Jan 13, 2025
73e4f02
big refactoring in progress
azazellochg Jan 22, 2025
19b81e9
refactor requirements for rtd
azazellochg Jan 22, 2025
85940c3
first testing. move base com class
azazellochg Jan 22, 2025
03ab4f8
refactor vectors and stage
azazellochg Jan 23, 2025
a433e35
fix imports
azazellochg Jan 23, 2025
58cecb1
adding mags and button events
azazellochg Jan 23, 2025
43f1c40
add missing file
azazellochg Jan 23, 2025
b5e9b7f
playing with buttons, fix vectors and stage, fix call()
azazellochg Jan 23, 2025
91d979d
1) fix has attr, 2) cache stage limits, 3) fix check_prerequisites, 4…
azazellochg Jan 24, 2025
f38ac99
enable stem for the test acquisition
azazellochg Jan 24, 2025
515fe85
add annotations
azazellochg Jan 24, 2025
e83c307
minor fixes
azazellochg Jan 24, 2025
420aed2
cleaner imports
azazellochg Jan 24, 2025
5f025c3
improve enum docs
azazellochg Jan 24, 2025
c5df360
boilerplate for server
azazellochg Jan 26, 2025
ee5a586
first attempt of a socket client
azazellochg Jan 27, 2025
324988c
basic doc
azazellochg Jan 27, 2025
ed6d8a8
better imports
azazellochg Jan 27, 2025
f0125f1
add a remote connection test
azazellochg Jan 27, 2025
f4c0cc0
fix hostname
azazellochg Jan 27, 2025
52c360d
specify data length
azazellochg Jan 27, 2025
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
Prev Previous commit
Next Next commit
cleaner imports
  • Loading branch information
azazellochg committed Jan 24, 2025
commit 420aed2050c30fa3b315baf1aadb4a7b63aba9ac
2 changes: 0 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
@@ -29,8 +29,6 @@ Requirements:
* comtypes
* mrcfile
* numpy
* sphinx-rtd-theme (optional, only for building documentation)
* matplotlib (optional, only for running tests)

Installation from PyPI on Windows
#################################
2 changes: 1 addition & 1 deletion docs/about.rst
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ The interface is described in detail in the scripting manual of your microscope
``C:\Titan\Scripting\Advanced TEM Scripting User Guide.pdf``.

The manual is your ultimate reference, this documentation will only describe the
python wrapper to the COM interface.
Python wrapper to the COM interface.

Microscope class
----------------
6 changes: 3 additions & 3 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -5,9 +5,9 @@ Version 3.0
^^^^^^^^^^^

* New changes are distributed under GPLv3+
* Interface re-written using comtypes library
* Standard scripting interfaces updated to v1.9
* Added Advanced scripting interfaces v1.2
* Complete re-write using comtypes library
* Standard scripting interface updated to v1.9
* Added Advanced scripting interface v1.2
* Development and testing are performed on:

- Tecnai Spirit (WinXP, Python 3.4)
1 change: 1 addition & 0 deletions pytemscript/clients/com_client.py
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@
import atexit
import comtypes
import comtypes.client

from ..modules.utilities import Vector
from ..utils.misc import rgetattr, rsetattr
from ..utils.constants import *
1 change: 1 addition & 0 deletions pytemscript/modules/acquisition.py
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
import logging
from datetime import datetime
from typing import Union

from ..utils.enums import AcqImageSize, AcqShutterMode, PlateLabelDateFormat, ScreenPosition
from .utilities import Image

1 change: 1 addition & 0 deletions pytemscript/modules/detectors.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging

from ..utils.enums import AcqShutterMode, ScreenPosition


1 change: 0 additions & 1 deletion pytemscript/modules/energyfilter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

class EnergyFilter:
""" Energy filter controls. Requires advanced scripting. """
def __init__(self, client):
1 change: 1 addition & 0 deletions pytemscript/modules/gun.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import logging
import time

from ..utils.enums import FegState, HighTensionState, FegFlashingType
from .utilities import Vector

1 change: 1 addition & 0 deletions pytemscript/modules/illumination.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import math
from typing import Union

from .utilities import Vector
from ..utils.enums import CondenserLensSystem, CondenserMode, DarkFieldMode, IlluminationMode

1 change: 1 addition & 0 deletions pytemscript/modules/optics.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging

from ..utils.enums import ProjectionNormalization, IlluminationNormalization
from .illumination import Illumination
from .projection import Projection
1 change: 1 addition & 0 deletions pytemscript/modules/stage.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import math
import time
import logging

from ..utils.enums import StageAxes, MeasurementUnitType, StageStatus, StageHolderType
from .utilities import StagePosition

1 change: 1 addition & 0 deletions pytemscript/plugins/tecnai_ccd_plugin.py
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@
import time
from pathlib import Path
from typing import Optional

from ..utils.enums import AcqImageSize, AcqMode, AcqSpeed, ImagePixelType
from ..modules.utilities import BaseImage

1 change: 1 addition & 0 deletions tests/parse_typelib.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
import comtypes.client

from pytemscript.utils.constants import SCRIPTING_STD, SCRIPTING_ADV

EXCLUDED_METHODS = [
1 change: 1 addition & 0 deletions tests/test_feg_regs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python3

import comtypes.client

from pytemscript.utils.constants import FEG_REGISTERS


1 change: 1 addition & 0 deletions tests/test_microscope.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import argparse
from typing import Optional
from time import sleep

from pytemscript.microscope import Microscope
from pytemscript.utils.enums import *