Rapid and flexible acquisition, analysis, fitting, and plotting in Python. Designed for scientific laboratories.

Spinmob, updated 🕥 2023-02-27 00:40:46

Overview

Build Status

Spinmob is a scientific data analysis and plotting package we wrote to escape expensive, buggy, poorly-documented programs like Origin, expensive "licensey" programs like Matlab or Labview, and weaker programs like Excel. It turns out python is just better than everything else, and it behaves the same on all computers for free. Ultimately, this, the packages it relies on, and Inkscape are all we needed to take, analyze, visualize, and publish our data.

The main features are

  • forgiving and user-friendly data class for handling ASCII data files
  • high-level automated plotting based on matplotlib
  • interactive nonlinear least-squares multi-curve fitting object
  • a simplified GUI library with high-level objects based on pyqtgraph
  • a bunch of random functions I found useful in dealing with strings and data.

See the spinmob wiki for more info.

Issues

patched matplotlib backend use, compatability for jupyter notebook

opened on 2023-01-30 23:03:06 by dcxSt

I copied this issue (which I opened) below.

Jupyter notebook crashes upon importing spinmob because I don't have the correct backed qtagg. I suspect this is because I'm using an ARM machine and this particular mpl backend hasn't yet been ported.

Screen Shot 2023-01-30 at 5 18 27 PM

I got around this by cloning the repo and importing it locally, and patching it with a try statement. Here is the piece of code causing the error, in the package's __init__

```python import os as _os import sys as _sys import matplotlib as _mpl; _mpl.use('qtagg')

import pylab ```

Here is a suggested patch:

```python import os as _os import sys as _sys import matplotlib as _mpl

try: _mpl.use('qtagg') except Exception as e: print("WARNING: not using qtagg. This might be because you don't have the latest version either Spinmob or other dependencies. Try updating your libraries. This issue has also been known to occur in Jupyter Notebooks and possibly on ARM silicon architecture. Proceeding without a backend.") print(f"\nThe error that would have been raised is:\n{e}\n") pass

import pylab ```

I put the statement in question it into a try-catch block and issued a warning. Would you like me to submit a PR? Now the statement reads

Screen Shot 2023-01-30 at 5 26 40 PM

Extra info: Before cloning and modifying the source, I first pip-installed the latest version of spinmob and have tried to install all the mpl's backends.

importing spinmob crashes because of mpl backends in some environments/workstations

opened on 2023-01-30 22:29:15 by dcxSt

Jupyter notebook crashes upon importing spinmob because I don't have the correct backed qtagg. I suspect this is because I'm using an ARM machine and this particular mpl backend hasn't yet been ported.

Screen Shot 2023-01-30 at 5 18 27 PM

I got around this by cloning the repo and importing it locally, and patching it with a try statement. Here is the piece of code causing the error, in the package's __init__

```python import os as _os import sys as _sys import matplotlib as _mpl; _mpl.use('qtagg')

import pylab ```

Here is a suggested patch:

```python import os as _os import sys as _sys import matplotlib as _mpl

try: _mpl.use('qtagg') except Exception as e: print("WARNING: not using qtagg. This might be because you don't have the latest version either Spinmob or other dependencies. Try updating your libraries. This issue has also been known to occur in Jupyter Notebooks and possibly on ARM silicon architecture. Proceeding without a backend.") print(f"\nThe error that would have been raised is:\n{e}\n") pass

import pylab ```

I put the statement in question it into a try-catch block and issued a warning. Would you like me to submit a PR? Now the statement reads

Screen Shot 2023-01-30 at 5 26 40 PM

Extra info: Before cloning and modifying the source, I first pip-installed the latest version of spinmob and have tried to install all the mpl's backends.

Small text shown in the popup figure when using high resolution screen.

opened on 2023-01-19 20:02:50 by Chujo58

I have had this issue for a while now. This is mostly when I want to read the results of the fit directly on my figure, or even to read the axis title. I just don't want to go through all the source code and remove the fontsize = 10 everywhere in order for spinmob to work normally on my machine. This also doesn't only concern text but also the buttons being really small for the databox plot processor in the egg.gui. I have found a way to work around this in Windows by just rescaling everything so buttons and all by the scale factor of the screen (which is normally in the settings) and even then I'm not super sure how easy this would be to change. The buttons issue is mostly when using mcphysics though.

How should one cite Spinmob when it was used in a paper?

opened on 2018-09-24 18:20:55 by Magalame

Some scientific libraries specify a particular to cite them, is this the case for Spinmob?

DataboxPlotter: nested x and y data sets in the script for multiple curves per axis.

opened on 2015-10-29 17:44:13 by jaxankey None

Add "None" option for ROIs (to skip plots)

opened on 2015-10-17 12:28:32 by jaxankey None

scientific-visualization science-research science teaching-tool education analysis data scientific-computing scientific-workflows gui-components graphical-user-interface