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 # SPDX-License-Identifier: LGPL-3.0-or-other
// Copyright (C) 2021 Contributors to the SLS Detector Package # 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 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 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 import time
from multiprocessing import Process from multiprocessing import Process
from slsdet import Detector, runStatus 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 import time
from slsdet import Detector, runStatus 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 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 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 from slsdet import Eiger
d = 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 from slsdet import Detector, currentSrcParameters
s = 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 # Most settings are represented as enums that can be
# explicitly imported # 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 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 os
import sys import sys
import numpy as np 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 subprocess
import locale import locale
out = subprocess.run(['g', 'list'], stdout = subprocess.PIPE, encoding=locale.getpreferredencoding()) 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 subprocess
import os import os
import sys 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. Code generator for enum bindings in the Python extension.
Reads the sls_detector_defs.h and enums_in.cpp then outputs 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 This file is used to auto generate Python bindings for the
sls::Detector class. The tool needs the libclang bindings 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 Utility to find and list which command line functions have tests and
where the tests are located 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 re
import subprocess import subprocess
from subprocess import PIPE 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 pytest
import subprocess import subprocess
import os 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 Setup file for slsdet
Build upon the pybind11 example found here: https://github.com/pybind/python_example 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 .detector import Detector, DetectorError, free_shared_memory
from .eiger import Eiger from .eiger import Eiger
from .ctb import Ctb 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 from functools import partial
class Adc: class Adc:
def __init__(self, name, enum, detector): 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 .detector import Detector
from .utils import element_if_equal from .utils import element_if_equal
from .dacs import DetectorDacs 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 .detector_property import DetectorProperty
from functools import partial from functools import partial
import numpy as np 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 #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- 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 CppDetectorApi
from _slsdet import slsDetectorDefs from _slsdet import slsDetectorDefs
from _slsdet import IpAddr, MacAddr 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 from collections.abc import Iterable
import numpy as np 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 #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- 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 Automatically improt all enums from slsDetectorDefs and give an
alias with their name in the enum module. All names from the enum 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 #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- 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 #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- 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 #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- 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 #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- 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 from .detector import Detector
def view(name, det = 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 #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- 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 #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- 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 import _slsdet
from _slsdet import Pattern 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 .utils import element_if_equal
from .enums import dacIndex 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: class Register:
def __init__(self, detector): def __init__(self, detector):
self._detector = 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 functools import partial
from collections.abc import Iterable from collections.abc import Iterable
import numpy as np 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 Utility functions that are useful for testing and troubleshooting
but not directly used in controlling the detector 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 #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- 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 numpy as np
import math import math