diff --git a/.gitignore b/.gitignore index e8f15ec..3dff1b6 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ examples/ dlls/ tests/devices/devlists +local_python_cmd.bat local_python_interp_cmd.bat docs/_build diff --git a/.pylintdict b/.pylintdict index 28d0973..ac8d669 100644 --- a/.pylintdict +++ b/.pylintdict @@ -337,4 +337,17 @@ pftypes wlm subfolder prepend -bitness \ No newline at end of file +bitness +fft +df +dataframes +fft +nt +subtuple +netrefs +cav +cyclemode +readonly +enums +devio +unpacker \ No newline at end of file diff --git a/docs/changelog.rst b/docs/changelog.rst index 6a96b4d..1bb540a 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -39,7 +39,7 @@ There have been too many alterations to list here comprehensively. Below is the - Devices - * Some legacy devices have been removes, since without access to the hardware it is hard to maintain and expand them. These include most of Agilent devices (33502A amplifier, N9310A microwave generator, HP 8712B and HP 8722D network analyzers, HP 8168F laser), Rigol DSA1030A spectrum analyzer, Tektronix MDO3000 oscilloscope, Vaunix LabBrick generators, Zurich Instruments HF2 and UHF, Andor Shamrock spectrographs (should be restored in future releases), NuPhoton NP2000 EDFA, PurePhotonics PPCL200 laser, Sirah Matisse laser (should be restored in future releases), Thorlabs PM100 power meter (should be restored in future releases), Lakeshore 370 resistance bridge (should be restored in future releases), MKS 900-series pressure gauges, ans some custom devices (Arduino and Olimex AVR boards and Janis-related hardware). + * Some legacy devices have been removed, since without access to the hardware it is hard to maintain and expand them. These include most of Agilent devices (33502A amplifier, N9310A microwave generator, HP 8712B and HP 8722D network analyzers, HP 8168F laser), Rigol DSA1030A spectrum analyzer, Tektronix MDO3000 oscilloscope, Vaunix LabBrick generators, Zurich Instruments HF2 and UHF, Andor Shamrock spectrographs (should be restored in future releases), NuPhoton NP2000 EDFA, PurePhotonics PPCL200 laser, Sirah Matisse laser (should be restored in future releases), Thorlabs PM100 power meter (should be restored in future releases), Lakeshore 370 resistance bridge (should be restored in future releases), MKS 900-series pressure gauges, and some custom devices (Arduino and Olimex AVR boards and Janis-related hardware). * The main devices package has been moved from ``pylablib.aux_libs.devices`` (which now refers to the legacy code) to ``pylablib.devices``. Module organization has also changed slightly. To find the required modules and device class names, see the :ref:`devices list `. * Lots of devices' interface has varied slightly, to make the interface more uniform and compatible between different kinds of devices. The changes are usually fairly straightforward (e.g., ``move_to`` instead of ``move``). In many cases the interface was also expanded to include additional available methods. * Several devices have been added, generalized, or restructured: diff --git a/docs/install.rst b/docs/install.rst index c0787ee..7be2d52 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -13,11 +13,17 @@ You can install the library from PyPi: pip install pylablib +If you already, have it install, you need to upgrade it: + +.. code-block:: none + + pip install -U pylablib + This will install the full set of dependencies: basic dependencies and computing packages (``numpy``, ``scipy``, ``pandas``, ``numba``, ``rpyc``), basic device communication packages (``pyft232``, ``pyvisa``, ``pyserial``, ``pyusb``), and PyQt5-based GUI (``pyqt5``, ``sip`` and ``pyqtgraph``). You can also install additional device library dependencies (``nidaqmx`` and ``websocket-client``) using the extra requirements feature of pip: .. code-block:: none - pip install pylablib[devio-full] + pip install -U pylablib[devio-full] Minimal install ------------------------- diff --git a/local_python_cmd.bat b/local_python_cmd.bat deleted file mode 100644 index b750414..0000000 --- a/local_python_cmd.bat +++ /dev/null @@ -1,3 +0,0 @@ -set PYTHONPATH=%CD%;%PYTHONPATH% -REM set PATH=%CD%\python-3.7.4.amd64;%CD%\python-3.7.4.amd64\Scripts;%PATH% -cmd /k \ No newline at end of file diff --git a/pylablib/core/fileio/savefile.py b/pylablib/core/fileio/savefile.py index be7f0fe..5b451eb 100644 --- a/pylablib/core/fileio/savefile.py +++ b/pylablib/core/fileio/savefile.py @@ -435,7 +435,7 @@ def save_generic(data, path="", output_format=None, loc="file", **kwargs): The default format names are: - ``'csv'``: CSV file, corresponds to :class:`CSVTableOutputFileFormat` and :func:`save_csv`; - - ``'csv'``: CSV filewith an additional dictionary containing format description, corresponds to :class:`DictionaryOutputFileFormat` and :func:`save_csv_desc`; + - ``'csv'``: CSV file with an additional dictionary containing format description, corresponds to :class:`DictionaryOutputFileFormat` and :func:`save_csv_desc`; - ``'bin'``: Binary file, corresponds to :class:`TableBinaryOutputFileFormat` and :func:`save_bin`; - ``'bin_desc'``: Binary file with an additional dictionary containing format description, corresponds to :class:`DictionaryOutputFileFormat` and :func:`save_bin_desc`; - ``'dict'``: Dictionary file, corresponds to :class:`DictionaryOutputFileFormat` and :func:`save_dict` diff --git a/pylablib/core/utils/general.py b/pylablib/core/utils/general.py index c7f9631..8013f9e 100644 --- a/pylablib/core/utils/general.py +++ b/pylablib/core/utils/general.py @@ -122,12 +122,12 @@ def recursive_map(value, func): return func(value) def make_flat_namedtuple(nt, fields=None, name=None, subfield_fmt="{field:}_{subfield:}"): """ - Turn a nested structure of named tuples into a single flat nameduple. + Turn a nested structure of named tuples into a single flat namedtuple. Args: nt: toplevel namedtuple class to be flattened fields: a dictionary ``{name: desc}`` of the fields, where ``name`` is the named tuple name, - and ``desc`` is either a nested nameduple class, or a list of arguments which are passed to the + and ``desc`` is either a nested namedtuple class, or a list of arguments which are passed to the recursive call to this function (e.g., ``[TTuple, {"field": TNestedTuple}]``). Any tuple field which is present in this dictionary gets recursively flattened, and the field names of the corresponding returned tuple are added to the full list of fields diff --git a/pylablib/devices/Andor/AndorSDK3.py b/pylablib/devices/Andor/AndorSDK3.py index c9618ec..cf91ac1 100644 --- a/pylablib/devices/Andor/AndorSDK3.py +++ b/pylablib/devices/Andor/AndorSDK3.py @@ -328,7 +328,7 @@ def set_all_attribute_values(self, settings, update_properties=True): def _get_feature(self, name, writable=False): """ - Check if the feature is available and return the corrensponding attribute. + Check if the feature is available and return the corresponding attribute. If ``writable==True``, also check if it's writable. """ @@ -740,7 +740,7 @@ def get_roi_limits(self, hbin=1, vbin=1): ``(min, max, pstep, sstep, maxbin)`` with, correspondingly, minimal and maximal size, position and size step, and the maximal binning. - Note that the minimal ROI size depends on the current (not just suppled) binning settings. + Note that the minimal ROI size depends on the current (not just supplied) binning settings. For more accurate results, is it only after setting up the binning. """ hdet,wdet=self.get_detector_size() diff --git a/pylablib/devices/interface/camera.py b/pylablib/devices/interface/camera.py index 895f518..f35cc03 100644 --- a/pylablib/devices/interface/camera.py +++ b/pylablib/devices/interface/camera.py @@ -267,7 +267,7 @@ def get_frame_info_format(self): Can be ``"namedtuple"`` (potentially nested named tuples; convenient to get particular values), ``"list"`` (flat list of values, with field names are given by :meth:`get_frame_info_fields`; convenient for building a table), - or ``"dict"`` (flat dictionary made out of the list and info fields; convenient for ) + or ``"dict"`` (flat dictionary with the same fields as the ``"list"`` format; more resilient to future format changes) """ return self._frameinfo_format _p_frameinfo_format=interface.EnumParameterClass("frame_info_format",["namedtuple","list","dict"]) @@ -278,7 +278,7 @@ def set_frame_info_format(self, fmt): Can be ``"namedtuple"`` (potentially nested named tuples; convenient to get particular values), ``"list"`` (flat list of values, with field names are given by :meth:`get_frame_info_fields`; convenient for building a table), - or ``"dict"`` (flat dictionary made out of the list and info fields; convenient for ) + or ``"dict"`` (flat dictionary with the same fields as the ``"list"`` format; more resilient to future format changes) """ self._frameinfo_format=fmt return self._frameinfo_format