added .py licenses

This commit is contained in:
maliakal_d 2021-10-15 15:54:58 +02:00
parent b913c0059a
commit fada085f0e
43 changed files with 86 additions and 2 deletions

View File

@ -1,2 +1,2 @@
// SPDX-License-Identifier: LGPL-3.0-or-other
// Copyright (C) 2021 Contributors to the SLS Detector Package
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
"""
Example showing how to set and get exposure times
"""

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
from slsdet import Detector, patternParameters

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
import time
from multiprocessing import Process
from slsdet import Detector, runStatus

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
import time
from slsdet import Detector, runStatus

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
from slsdet import Detector, Eiger, dacIndex

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
from slsdet import Detector, Eiger, dacIndex

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
from slsdet import Eiger
d = Eiger()

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
from slsdet import Detector, currentSrcParameters
s = currentSrcParameters()

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
# Most settings are represented as enums that can be
# explicitly imported

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
from slsdet import Mythen3, scanParameters, dacIndex

2
python/scripts/basic.py Executable file → Normal file
View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
import os
import sys
import numpy as np

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
import subprocess
import locale
out = subprocess.run(['g', 'list'], stdout = subprocess.PIPE, encoding=locale.getpreferredencoding())

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
import subprocess
import os
import sys

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
"""
Code generator for enum bindings in the Python extension.
Reads the sls_detector_defs.h and enums_in.cpp then outputs

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
"""
This file is used to auto generate Python bindings for the
sls::Detector class. The tool needs the libclang bindings

2
python/scripts/list_tested_cmd.py Executable file → Normal file
View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
"""
Utility to find and list which command line functions have tests and
where the tests are located

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
import re
import subprocess
from subprocess import PIPE

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
import pytest
import subprocess
import os

2
python/setup.py Executable file → Normal file
View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
"""
Setup file for slsdet
Build upon the pybind11 example found here: https://github.com/pybind/python_example

2
python/slsdet/__init__.py Executable file → Normal file
View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
# from .detector import Detector, DetectorError, free_shared_memory
from .eiger import Eiger
from .ctb import Ctb

2
python/slsdet/adcs.py Executable file → Normal file
View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
from functools import partial
class Adc:
def __init__(self, name, enum, detector):

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
from .detector import Detector
from .utils import element_if_equal
from .dacs import DetectorDacs

2
python/slsdet/dacs.py Executable file → Normal file
View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
from .detector_property import DetectorProperty
from functools import partial
import numpy as np

2
python/slsdet/decorators.py Executable file → Normal file
View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""

2
python/slsdet/detector.py Executable file → Normal file
View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
from _slsdet import CppDetectorApi
from _slsdet import slsDetectorDefs
from _slsdet import IpAddr, MacAddr

2
python/slsdet/detector_property.py Executable file → Normal file
View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
from collections.abc import Iterable
import numpy as np

2
python/slsdet/eiger.py Executable file → Normal file
View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
"""
Automatically improt all enums from slsDetectorDefs and give an
alias with their name in the enum module. All names from the enum

2
python/slsdet/errors.py Executable file → Normal file
View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
from .detector import Detector
def view(name, det = Detector):

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
import _slsdet
from _slsdet import Pattern

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
from .utils import element_if_equal
from .enums import dacIndex

2
python/slsdet/registers.py Executable file → Normal file
View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
class Register:
def __init__(self, detector):
self._detector = detector

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
from functools import partial
from collections.abc import Iterable
import numpy as np

2
python/slsdet/utils.py Executable file → Normal file
View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
"""
Utility functions that are useful for testing and troubleshooting
but not directly used in controlling the detector

2
python/tests/test_utils.py Executable file → Normal file
View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""

View File

@ -1,3 +1,5 @@
# SPDX-License-Identifier: LGPL-3.0-or-other
# Copyright (C) 2021 Contributors to the SLS Detector Package
import numpy as np
import math