pyobs-fli 1.4.2__tar.gz → 2.0.0.dev2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. pyobs_fli-2.0.0.dev2/.github/workflows/pypi.yml +26 -0
  2. pyobs_fli-2.0.0.dev2/.github/workflows/ruff.yml +26 -0
  3. pyobs_fli-2.0.0.dev2/.pre-commit-config.yaml +15 -0
  4. pyobs_fli-2.0.0.dev2/.readthedocs.yml +15 -0
  5. pyobs_fli-2.0.0.dev2/CHANGELOG.rst +2 -0
  6. pyobs_fli-2.0.0.dev2/CMakeLists.txt +86 -0
  7. pyobs_fli-2.0.0.dev2/PKG-INFO +11 -0
  8. pyobs_fli-2.0.0.dev2/README.md +45 -0
  9. pyobs_fli-2.0.0.dev2/docs/Makefile +31 -0
  10. pyobs_fli-2.0.0.dev2/docs/make.bat +36 -0
  11. pyobs_fli-2.0.0.dev2/docs/requirements.txt +1 -0
  12. pyobs_fli-2.0.0.dev2/docs/source/_static/pyobs.gif +0 -0
  13. pyobs_fli-2.0.0.dev2/docs/source/conf.py +119 -0
  14. pyobs_fli-2.0.0.dev2/docs/source/index.rst +64 -0
  15. pyobs_fli-2.0.0.dev2/lib/Makefile +67 -0
  16. pyobs_fli-2.0.0.dev2/lib/docxx.sty +1104 -0
  17. pyobs_fli-2.0.0.dev2/lib/libfli-camera-parport.c +821 -0
  18. pyobs_fli-2.0.0.dev2/lib/libfli-camera-parport.h +102 -0
  19. pyobs_fli-2.0.0.dev2/lib/libfli-camera-usb.c +3148 -0
  20. pyobs_fli-2.0.0.dev2/lib/libfli-camera-usb.h +148 -0
  21. pyobs_fli-2.0.0.dev2/lib/libfli-camera.c +1304 -0
  22. pyobs_fli-2.0.0.dev2/lib/libfli-camera.h +171 -0
  23. pyobs_fli-2.0.0.dev2/lib/libfli-debug.h +60 -0
  24. pyobs_fli-2.0.0.dev2/lib/libfli-filter-focuser.c +1741 -0
  25. pyobs_fli-2.0.0.dev2/lib/libfli-filter-focuser.h +85 -0
  26. pyobs_fli-2.0.0.dev2/lib/libfli-libfli.h +275 -0
  27. pyobs_fli-2.0.0.dev2/lib/libfli-mem.c +332 -0
  28. pyobs_fli-2.0.0.dev2/lib/libfli-mem.h +59 -0
  29. pyobs_fli-2.0.0.dev2/lib/libfli-raw.c +84 -0
  30. pyobs_fli-2.0.0.dev2/lib/libfli-raw.h +51 -0
  31. pyobs_fli-2.0.0.dev2/lib/libfli.c +1905 -0
  32. pyobs_fli-2.0.0.dev2/lib/libfli.dxx +56 -0
  33. pyobs_fli-2.0.0.dev2/lib/libfli.h +339 -0
  34. pyobs_fli-2.0.0.dev2/lib/unix/bsd/libfli-usb-sys.c +208 -0
  35. pyobs_fli-2.0.0.dev2/lib/unix/libfli-debug.c +139 -0
  36. pyobs_fli-2.0.0.dev2/lib/unix/libfli-parport.h +61 -0
  37. pyobs_fli-2.0.0.dev2/lib/unix/libfli-serial.c +189 -0
  38. pyobs_fli-2.0.0.dev2/lib/unix/libfli-serial.h +51 -0
  39. pyobs_fli-2.0.0.dev2/lib/unix/libfli-sys.c +477 -0
  40. pyobs_fli-2.0.0.dev2/lib/unix/libfli-sys.h +121 -0
  41. pyobs_fli-2.0.0.dev2/lib/unix/libfli-usb.c +97 -0
  42. pyobs_fli-2.0.0.dev2/lib/unix/libfli-usb.h +87 -0
  43. pyobs_fli-2.0.0.dev2/lib/unix/linux/fli_ioctl.h +119 -0
  44. pyobs_fli-2.0.0.dev2/lib/unix/linux/fliusb_ioctl.h +87 -0
  45. pyobs_fli-2.0.0.dev2/lib/unix/linux/libfli-parport.c +133 -0
  46. pyobs_fli-2.0.0.dev2/lib/unix/linux/libfli-usb-sys.c +256 -0
  47. pyobs_fli-2.0.0.dev2/lib/unix/osx/libfli-usb-sys.c +917 -0
  48. pyobs_fli-2.0.0.dev2/lib/unix/osx/libfli-usb-sys.h +179 -0
  49. pyobs_fli-2.0.0.dev2/lib/windows/libfli-debug.c +241 -0
  50. pyobs_fli-2.0.0.dev2/lib/windows/libfli-parport.h +51 -0
  51. pyobs_fli-2.0.0.dev2/lib/windows/libfli-serial.c +129 -0
  52. pyobs_fli-2.0.0.dev2/lib/windows/libfli-serial.h +49 -0
  53. pyobs_fli-2.0.0.dev2/lib/windows/libfli-sys.h +88 -0
  54. pyobs_fli-2.0.0.dev2/lib/windows/libfli-usb.c +361 -0
  55. pyobs_fli-2.0.0.dev2/lib/windows/libfli-usb.h +195 -0
  56. pyobs_fli-2.0.0.dev2/lib/windows/libfli-windows-parport.c +548 -0
  57. pyobs_fli-2.0.0.dev2/lib/windows/libfli-windows.c +1371 -0
  58. pyobs_fli-2.0.0.dev2/lib/windows/libfli.def +75 -0
  59. pyobs_fli-2.0.0.dev2/lib/windows/libfli.rc +102 -0
  60. pyobs_fli-2.0.0.dev2/lib/windows/libfli.sln +38 -0
  61. pyobs_fli-2.0.0.dev2/lib/windows/libfli.vcproj +729 -0
  62. pyobs_fli-2.0.0.dev2/lib/windows/libfli64.def +74 -0
  63. pyobs_fli-2.0.0.dev2/lib/windows/resource.h +14 -0
  64. pyobs_fli-2.0.0.dev2/poetry.lock +2257 -0
  65. pyobs_fli-2.0.0.dev2/pyobs_fli/__init__.py +2 -0
  66. {pyobs_fli-1.4.2 → pyobs_fli-2.0.0.dev2}/pyobs_fli/flibase.py +7 -7
  67. {pyobs_fli-1.4.2 → pyobs_fli-2.0.0.dev2}/pyobs_fli/flicamera.py +81 -168
  68. {pyobs_fli-1.4.2 → pyobs_fli-2.0.0.dev2}/pyobs_fli/flifilterwheel.py +43 -83
  69. pyobs_fli-2.0.0.dev2/pyproject.toml +42 -0
  70. pyobs_fli-2.0.0.dev2/uv.lock +2022 -0
  71. pyobs_fli-1.4.2/PKG-INFO +0 -16
  72. pyobs_fli-1.4.2/build.py +0 -50
  73. pyobs_fli-1.4.2/pyobs_fli/__init__.py +0 -10
  74. pyobs_fli-1.4.2/pyproject.toml +0 -30
  75. {pyobs_fli-1.4.2 → pyobs_fli-2.0.0.dev2}/LICENSE +0 -0
  76. {pyobs_fli-1.4.2 → pyobs_fli-2.0.0.dev2}/pyobs_fli/flidriver.pyx +0 -0
  77. {pyobs_fli-1.4.2 → pyobs_fli-2.0.0.dev2}/pyobs_fli/libfli.pxd +0 -0
@@ -0,0 +1,26 @@
1
+ name: Publish package to PyPI
2
+ on:
3
+ push:
4
+ tags:
5
+ - 'v*'
6
+ jobs:
7
+ build-n-publish:
8
+ name: Build and publish package to PyPI
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - name: Check out repository code
12
+ uses: actions/checkout@v4
13
+
14
+ - name: Set up Python
15
+ uses: astral-sh/setup-uv@v5
16
+ with:
17
+ enable-cache: true
18
+ python-version: "3.11"
19
+
20
+ - name: Build
21
+ run: uv build --sdist
22
+
23
+ - name: Publish
24
+ env:
25
+ PYPI_TOKEN: ${{ secrets.pypi_password }}
26
+ run: uv publish --token $PYPI_TOKEN
@@ -0,0 +1,26 @@
1
+ name: ruff
2
+ on: push
3
+
4
+ jobs:
5
+ ruff:
6
+ runs-on: ubuntu-latest
7
+ timeout-minutes: 10
8
+
9
+ steps:
10
+ - name: Check out repository code
11
+ uses: actions/checkout@v4
12
+
13
+ - name: Set up Python
14
+ uses: astral-sh/setup-uv@v5
15
+ with:
16
+ enable-cache: true
17
+ python-version: "3.13"
18
+
19
+ - name: Install system dependencies
20
+ run: sudo apt-get install -y libcfitsio-dev
21
+
22
+ - name: Install packages
23
+ run: uv sync --all-extras --dev
24
+
25
+ - name: Run ruff
26
+ run: uv run ruff check pyobs_fli/
@@ -0,0 +1,15 @@
1
+ repos:
2
+ # Using this mirror lets us use mypyc-compiled black, which is about 2x faster
3
+ - repo: https://github.com/psf/black-pre-commit-mirror
4
+ rev: 25.1.0
5
+ hooks:
6
+ - id: black
7
+ # It is recommended to specify the latest version of Python
8
+ # supported by your project here, or alternatively use
9
+ # pre-commit's default_language_version, see
10
+ # https://pre-commit.com/#top_level-default_language_version
11
+ language_version: python3.11
12
+ - repo: https://github.com/astral-sh/ruff-pre-commit
13
+ rev: v0.9.0
14
+ hooks:
15
+ - id: ruff
@@ -0,0 +1,15 @@
1
+ version: 2
2
+
3
+ build:
4
+ os: ubuntu-22.04
5
+ tools:
6
+ python: "3.11"
7
+
8
+ sphinx:
9
+ configuration: docs/source/conf.py
10
+
11
+ python:
12
+ install:
13
+ - method: pip
14
+ path: .
15
+ - requirements: docs/requirements.txt
@@ -0,0 +1,2 @@
1
+ v1.0.0 (2022-09-13)
2
+ *******************
@@ -0,0 +1,86 @@
1
+ cmake_minimum_required(VERSION 3.21)
2
+ project(pyobs_fli LANGUAGES C CXX)
3
+
4
+ # --- Ensure we use the build environment Python ---
5
+ set(Python3_FIND_VIRTUALENV ONLY)
6
+ set(Python3_FIND_STRATEGY LOCATION)
7
+ find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module)
8
+
9
+ # --- Paths ---
10
+ set(PYX_FILE "${CMAKE_CURRENT_SOURCE_DIR}/pyobs_fli/flidriver.pyx")
11
+ set(CXX_FILE "${CMAKE_CURRENT_BINARY_DIR}/flidriver.cpp")
12
+
13
+ # --- Get NumPy include dir ---
14
+ execute_process(
15
+ COMMAND "${Python3_EXECUTABLE}" -c "import numpy; print(numpy.get_include())"
16
+ OUTPUT_VARIABLE NUMPY_INCLUDE_DIR
17
+ OUTPUT_STRIP_TRAILING_WHITESPACE
18
+ )
19
+
20
+ # --- Run Cython (C++ mode) ---
21
+ add_custom_command(
22
+ OUTPUT ${CXX_FILE}
23
+ COMMAND "${Python3_EXECUTABLE}" -m cython
24
+ ${PYX_FILE}
25
+ --output-file ${CXX_FILE}
26
+ --cplus
27
+ -I "${CMAKE_CURRENT_SOURCE_DIR}/pyobs_fli"
28
+ DEPENDS ${PYX_FILE} "${CMAKE_CURRENT_SOURCE_DIR}/pyobs_fli/libfli.pxd"
29
+ COMMENT "Running Cython on flidriver.pyx"
30
+ )
31
+
32
+ # --- Build libfli from source ---
33
+ set(LIBFLI_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib")
34
+ add_library(fli_static STATIC
35
+ ${LIBFLI_DIR}/libfli.c
36
+ ${LIBFLI_DIR}/libfli-camera.c
37
+ ${LIBFLI_DIR}/libfli-camera-parport.c
38
+ ${LIBFLI_DIR}/libfli-camera-usb.c
39
+ ${LIBFLI_DIR}/libfli-filter-focuser.c
40
+ ${LIBFLI_DIR}/libfli-mem.c
41
+ ${LIBFLI_DIR}/libfli-raw.c
42
+ ${LIBFLI_DIR}/unix/libfli-debug.c
43
+ ${LIBFLI_DIR}/unix/libfli-serial.c
44
+ ${LIBFLI_DIR}/unix/libfli-sys.c
45
+ ${LIBFLI_DIR}/unix/libfli-usb.c
46
+ ${LIBFLI_DIR}/unix/linux/libfli-parport.c
47
+ ${LIBFLI_DIR}/unix/linux/libfli-usb-sys.c
48
+ )
49
+ target_include_directories(fli_static PUBLIC
50
+ ${LIBFLI_DIR}
51
+ ${LIBFLI_DIR}/unix
52
+ )
53
+ target_compile_options(fli_static PRIVATE -Wall -O2 -fPIC)
54
+
55
+ # --- Build extension module ---
56
+ add_library(flidriver MODULE ${CXX_FILE})
57
+ set_source_files_properties(${CXX_FILE} PROPERTIES LANGUAGE CXX)
58
+ target_include_directories(flidriver PRIVATE
59
+ ${Python3_INCLUDE_DIRS}
60
+ ${NUMPY_INCLUDE_DIR}
61
+ ${LIBFLI_DIR}
62
+ )
63
+
64
+ # --- Correct Python module naming ---
65
+ execute_process(
66
+ COMMAND "${Python3_EXECUTABLE}" -c
67
+ "import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))"
68
+ OUTPUT_VARIABLE PY_EXT_SUFFIX
69
+ OUTPUT_STRIP_TRAILING_WHITESPACE
70
+ )
71
+ set_target_properties(flidriver PROPERTIES
72
+ PREFIX ""
73
+ OUTPUT_NAME "flidriver"
74
+ SUFFIX "${PY_EXT_SUFFIX}"
75
+ POSITION_INDEPENDENT_CODE ON
76
+ )
77
+ message(STATUS "ext: ${PY_EXT_SUFFIX}")
78
+
79
+ # --- Link ---
80
+ find_library(CFITSIO_LIB cfitsio REQUIRED)
81
+ target_link_libraries(flidriver PRIVATE fli_static ${CFITSIO_LIB})
82
+
83
+ # --- Install into package ---
84
+ install(TARGETS flidriver
85
+ LIBRARY DESTINATION ${SKBUILD_PROJECT_NAME}
86
+ )
@@ -0,0 +1,11 @@
1
+ Metadata-Version: 2.4
2
+ Name: pyobs-fli
3
+ Version: 2.0.0.dev2
4
+ Summary: pyobs module for FLI cameras
5
+ Author-Email: Tim-Oliver Husser <thusser@uni-goettingen.de>
6
+ License-Expression: MIT
7
+ Requires-Python: <3.14,>=3.11
8
+ Requires-Dist: astropy<8,>=7.0.1
9
+ Requires-Dist: numpy<3,>=2.2.5
10
+ Requires-Dist: pyobs-core<3,>=2.0.0.dev6
11
+
@@ -0,0 +1,45 @@
1
+ FLI module for *pyobs*
2
+ ======================
3
+
4
+ FLI kernel module
5
+ -----------------
6
+ The FLI kernel module needs to be installed in the system.
7
+
8
+
9
+ Install *pyobs-fli*
10
+ -------------------
11
+ Clone the repository:
12
+
13
+ git clone https://github.com/pyobs/pyobs-fli.git
14
+
15
+
16
+ Install dependencies:
17
+
18
+ cd pyobs-fli
19
+ pip3 install -r requirements
20
+
21
+ And install it:
22
+
23
+ python3 setup.py install
24
+
25
+
26
+ Configuration
27
+ -------------
28
+ The *FliCamera* class is derived from *BaseCamera* (see *pyobs* documentation) and adds a single new parameter:
29
+
30
+ setpoint:
31
+ The initial setpoint in degrees Celsius for the cooling of the camera.
32
+
33
+ The class works fine with its default parameters, so a basic module configuration would look like this:
34
+
35
+ module:
36
+ class: pyobs_fli.FliCamera
37
+ name: FLI camera
38
+
39
+ Dependencies
40
+ ------------
41
+ * **pyobs** for the core funcionality. It is not included in the *requirements.txt*, so needs to be installed
42
+ separately.
43
+ * [Cython](https://cython.org/) for wrapping the SBIG Universal Driver.
44
+ * [Astropy](http://www.astropy.org/) for FITS file handling.
45
+ * [NumPy](http://www.numpy.org/) for array handling.
@@ -0,0 +1,31 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line.
5
+ SPHINXOPTS =
6
+ SPHINXBUILD = sphinx-build
7
+ SPHINXPROJ = pyobs
8
+ SOURCEDIR = source
9
+ BUILDDIR = ../.doc-build
10
+
11
+ #.EXPORT_ALL_VARIABLES:
12
+
13
+ #PYTHONPATH:=../pyobs-core/:../pyobs-sbig/:../pyobs-fli:../pyobs-weather:../pyobs-archive:${PYTHONPATH}
14
+
15
+ # Put it first so that "make" without argument is like "make help".
16
+ help:
17
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
18
+
19
+ .PHONY: help Makefile
20
+
21
+ html:
22
+ @$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)
23
+
24
+ livehtml:
25
+ sphinx-autobuild -b html --watch ../pyobs_sbig $(ALLSPHINXOPTS) "$(SOURCEDIR)/" "$(BUILDDIR)/html/"
26
+
27
+ # Catch-all target: route all unknown targets to Sphinx using the new
28
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
29
+ %: Makefile
30
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
31
+
@@ -0,0 +1,36 @@
1
+ @ECHO OFF
2
+
3
+ pushd %~dp0
4
+
5
+ REM Command file for Sphinx documentation
6
+
7
+ if "%SPHINXBUILD%" == "" (
8
+ set SPHINXBUILD=sphinx-build
9
+ )
10
+ set SOURCEDIR=source
11
+ set BUILDDIR=build
12
+ set SPHINXPROJ=pyobs
13
+
14
+ if "%1" == "" goto help
15
+
16
+ %SPHINXBUILD% >NUL 2>NUL
17
+ if errorlevel 9009 (
18
+ echo.
19
+ echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
20
+ echo.installed, then set the SPHINXBUILD environment variable to point
21
+ echo.to the full path of the 'sphinx-build' executable. Alternatively you
22
+ echo.may add the Sphinx directory to PATH.
23
+ echo.
24
+ echo.If you don't have Sphinx installed, grab it from
25
+ echo.http://sphinx-doc.org/
26
+ exit /b 1
27
+ )
28
+
29
+ %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
30
+ goto end
31
+
32
+ :help
33
+ %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
34
+
35
+ :end
36
+ popd
@@ -0,0 +1 @@
1
+ sphinx-rtd-theme
@@ -0,0 +1,119 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # Configuration file for the Sphinx documentation builder.
4
+ #
5
+ # This file does only contain a selection of the most common options. For a
6
+ # full list see the documentation:
7
+ # http://www.sphinx-doc.org/en/stable/config
8
+
9
+ # -- Path setup --------------------------------------------------------------
10
+
11
+ # If extensions (or modules to document with autodoc) are in another directory,
12
+ # add these directories to sys.path here. If the directory is relative to the
13
+ # documentation root, use os.path.abspath to make it absolute, like shown here.
14
+ #
15
+ import os
16
+ import sys
17
+
18
+ sys.path.insert(0, os.path.abspath("../../"))
19
+
20
+
21
+ # -- Project information -----------------------------------------------------
22
+
23
+ project = "pyobs-fli"
24
+ copyright = "2022, Tim-Oliver Husser"
25
+ author = "Tim-Oliver Husser"
26
+
27
+ # The short X.Y version
28
+ # version = "0.16"
29
+ # The full version, including alpha/beta/rc tags
30
+ # release = "0.16.0"
31
+
32
+
33
+ # -- General configuration ---------------------------------------------------
34
+
35
+ add_module_names = False
36
+
37
+ # If your documentation needs a minimal Sphinx version, state it here.
38
+ #
39
+ # needs_sphinx = '1.0'
40
+
41
+ # Add any Sphinx extension module names here, as strings. They can be
42
+ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
43
+ # ones.
44
+ extensions = [
45
+ "sphinx.ext.autodoc",
46
+ "sphinx.ext.githubpages",
47
+ "sphinx.ext.napoleon",
48
+ "sphinx.ext.viewcode",
49
+ "sphinx.ext.autosectionlabel",
50
+ "sphinx.ext.intersphinx",
51
+ #'sphinx_autodoc_typehints'
52
+ ]
53
+
54
+ intersphinx_mapping = {"http://docs.python.org/3": None}
55
+
56
+ # napoleon settings
57
+ napoleon_google_docstring = True
58
+ napoleon_numpy_docstring = False
59
+ napoleon_use_param = False
60
+ napoleon_use_ivar = True
61
+
62
+ # typehints
63
+ # set_type_checking_flag = True
64
+ # autodoc_typehints = "description"
65
+
66
+ # show c'tor parameters in class only
67
+ autoclass_content = "both"
68
+
69
+ # Add any paths that contain templates here, relative to this directory.
70
+ templates_path = ["_templates"]
71
+
72
+ # The suffix(es) of source filenames.
73
+ # You can specify multiple suffix as a list of string:
74
+ #
75
+ source_suffix = ".rst"
76
+
77
+ # The master toctree document.
78
+ master_doc = "index"
79
+
80
+ # The language for content autogenerated by Sphinx. Refer to documentation
81
+ # for a list of supported languages.
82
+ #
83
+ # This is also used if you do content translation via gettext catalogs.
84
+ # Usually you set "language" from the command line for these cases.
85
+ language = "en"
86
+
87
+ # List of patterns, relative to source directory, that match files and
88
+ # directories to ignore when looking for source files.
89
+ # This pattern also affects html_static_path and html_extra_path .
90
+ exclude_patterns = []
91
+
92
+ # The name of the Pygments (syntax highlighting) style to use.
93
+ pygments_style = "sphinx"
94
+
95
+ # Be a little nitpicky
96
+ nitpicky = True
97
+ nitpick_ignore = []
98
+
99
+ # intersphinx
100
+ intersphinx_mapping = {
101
+ "pyobs": ("https://pyobs-core.readthedocs.io/en/latest/", None),
102
+ }
103
+
104
+ # -- Options for HTML output -------------------------------------------------
105
+
106
+ # The theme to use for HTML and HTML Help pages. See the documentation for
107
+ # a list of builtin themes.
108
+ html_theme = "sphinx_rtd_theme"
109
+ html_theme_options = {
110
+ "collapse_navigation": False,
111
+ "sticky_navigation": True,
112
+ "navigation_depth": 4,
113
+ "display_version": False,
114
+ "logo_only": False,
115
+ "prev_next_buttons_location": "bottom",
116
+ "titles_only": False,
117
+ "style_nav_header_background": "#cccccc",
118
+ }
119
+ html_logo = "_static/pyobs.gif"
@@ -0,0 +1,64 @@
1
+ pyobs-fli
2
+ #########
3
+
4
+ This is a `pyobs <https://www.pyobs.org>`_ (`documentation <https://docs.pyobs.org>`_) module for FLI cameras.
5
+
6
+
7
+ Example configuration
8
+ *********************
9
+
10
+ This is an example configuration, tested on a FLI 230PL::
11
+
12
+ class: pyobs_fli.FliCamera
13
+
14
+ # filename pattern
15
+ filenames: /cache/pyobs-ef01-{DAY-OBS|date:}-{FRAMENUM|string:04d}-{IMAGETYP|type}00.fits
16
+
17
+ # cooling
18
+ setpoint: -20.0
19
+
20
+ # additional fits headers
21
+ fits_headers:
22
+ 'DET-PIXL': [0.015, 'Size of detector pixels (square) [mm]']
23
+ 'DET-NAME': ['E2V 230-42 Bi BBAR', 'Name of detector']
24
+ 'DET-GAIN': [1.83, 'Detector gain [e-/ADU]']
25
+ 'DET-RON': [12.1, 'Detector readout noise [e-]']
26
+ 'DET-SATU': [117767, 'Detector saturation limit [e-]']
27
+
28
+ # opto-mechanical centre
29
+ centre: [1115.5, 1047.5]
30
+
31
+ # rotation (east of north)
32
+ rotation: -2.98
33
+
34
+ # location
35
+ timezone: utc
36
+ location:
37
+ longitude: 9.944333
38
+ latitude: 51.560583
39
+ elevation: 201.
40
+
41
+ # communication
42
+ comm:
43
+ jid: test@example.com
44
+ password: ***
45
+
46
+ # virtual file system
47
+ vfs:
48
+ class: pyobs.vfs.VirtualFileSystem
49
+ roots:
50
+ cache:
51
+ class: pyobs.vfs.HttpFile
52
+ upload: http://localhost:37075/
53
+
54
+
55
+ Available classes
56
+ *****************
57
+
58
+ There is one single class for FLI cameras.
59
+
60
+ AsiCamera
61
+ =========
62
+ .. autoclass:: pyobs_fli.FliCamera
63
+ :members:
64
+ :show-inheritance:
@@ -0,0 +1,67 @@
1
+ UNAME = $(shell uname -s)
2
+ ifeq ($(findstring BSD, $(UNAME)), BSD)
3
+ UNAME = BSD
4
+ endif
5
+
6
+ VPATH = unix
7
+ ifeq ($(UNAME), Linux)
8
+ VPATH += unix/linux
9
+ endif
10
+ ifeq ($(UNAME), BSD)
11
+ VPATH += unix/bsd
12
+ endif
13
+ ifeq ($(UNAME), Darwin)
14
+ VPATH += unix/osx
15
+ endif
16
+
17
+ DIR = $(shell pwd)
18
+ CC = gcc
19
+ INC = $(DIR) $(DIR)/unix
20
+ CFLAGS = -Wall -O2 -g $(patsubst %, -I%, $(INC)) -fPIC
21
+
22
+ ifeq ($(UNAME), Darwin)
23
+ CFLAGS += -arch i386 -arch x86_64
24
+ INC += $(DIR)/unix/osx /Developer/SDKs/MacOSX10.7.sdk/usr/include
25
+ LIBS =IOkit
26
+ LIBPATH = /usr/local/lib /sw/lib /usr/lib/ /System/Library/Frameworks/CoreFoundation.framework
27
+ LDLIBS = $(patsubst %, -l%, $(LIBS))
28
+ LOADLIBES = $(patsubst %, -L%, $(LIBPATH))
29
+ endif
30
+
31
+ AR = ar
32
+ ARFLAGS = -rus
33
+
34
+ SYS = libfli-sys.o
35
+ DEBUG = libfli-debug.o
36
+ MEM = libfli-mem.o
37
+ USB_IO = libfli-usb.o libfli-usb-sys.o
38
+ ifeq ($(UNAME), Linux)
39
+ PPORT_IO = libfli-parport.o
40
+ endif
41
+ SERIAL_IO = libfli-serial.o
42
+ IO = $(USB_IO) $(PPORT_IO) $(SERIAL_IO)
43
+ CAM = libfli-camera.o libfli-camera-parport.o libfli-camera-usb.o
44
+ FILT = libfli-filter-focuser.o
45
+
46
+ ALLOBJ = $(SYS) $(DEBUG) $(MEM) $(IO) $(CAM) $(FILT)
47
+
48
+ libfli.a: libfli.o $(ALLOBJ)
49
+ $(AR) $(ARFLAGS) $@ $^
50
+
51
+ doc: doc-html doc-pdf
52
+
53
+ .PHONY: doc-html
54
+ doc-html: libfli.dxx libfli.h libfli.c
55
+ doc++ -d doc $<
56
+
57
+ .PHONY: doc-pdf
58
+ doc-pdf: libfli.dxx libfli.h libfli.c
59
+ (test -d pdf || mkdir pdf) && cp docxx.sty pdf
60
+ doc++ -t $< | sed 's/
61
+ cd pdf && latex libfli.tex && latex libfli.tex
62
+ cd pdf && dvips -o libfli.ps libfli.dvi && ps2pdf libfli.ps
63
+ mv pdf/libfli.pdf . && rm -rf pdf
64
+
65
+ .PHONY: clean
66
+ clean:
67
+ rm -f $(ALLOBJ) libfli.o libfli.a