Skip to main content

SQUID Advanced Background Substraction

This python script takes raw data from SQUID magnetometers (for now only the MPMS3 is supported) and subtracts a raw background.

Features

  • Almost complete error propagation thanks to the great uncertainties package
  • Fitting using Orthogonl Distance Regression (ODRPACK 77)
  • Easy per scan inspection of the fit quality.
  • Rudimenrtary support for the rotator option.

Dependencies

Special Notes for Windows users

See the Windows Guide.

Usage

Measurement

When thinking about using SABS there are a few things to consider before you start measuring. First of all you should know that SABS is only for the DC mesuring mode. In most situations where you can use the VSM mode, you should do so. For VSM mode the background can be subtracted more easily by just subtracting the resulting data directly. If your measurement needs DC mode you can use SABS.

You will need two separate measurements one for background and one with the sample. You should use the same sequence for both measurements. Make sure to enable RAW file recording. To get the most accurate results make sure to change as little as possible between measurements. The sampleposition is determined by touching down (As far as we know). So make sure the sampleholder has the same length between measurements. If you are using a protective straw. Use the same straw at the same possition.

Further take care to output each measurement into its own file. If you are for example sweeping temperature at different fields, use one file for each field.

Software

Type python sabs.py -h to show the help message. Use -s [sampledata] and -b [background] to point to the sampledata or background raw file (*.rw.dat) respectively. Since there is no information about the rotation angle stored in the *.rw.dat file, it is necessary to also read the *.dat file. Make sure the *.dat file is present in the same folder and has the same name before the file extension.
Specify your outputfile with -o [outfile]. With -p plotting can be turned on. This is recommended to check the validity of the fit. There are two modes for subtraction:

  • dirty mode -m dirty
    • Even when using the same sequence there is no guarantee, that all points in your measurement are recorded. This leads to a different number of scans between background and sampledata. Using dirty mode the arrays of scans are cut to fit in length.
  • nearest mode -m nearest (default)
    • dirty mode can lead to problems, when a scan or multiple scans in the middle of your sequence were not recorded. Look out for larger errorbars in your variable.
    • nearest mode looks for the nearest scan in background to each scan in sampledata. Only the distance in your variable is regarded. Which observable was your variable is determined automatically.

Example

python sabs.py -p \
-s sampledata/2021-11-08_Fe5Ge2Te5_SE5749_grease-quartz-brass_MvT_1000Oe.rw.dat \
-b sampledata/2021-11-04_Test_background_grease-quartz-brass_MvT_1000Oe.rw.dat \
-o sampledata/2021-12-17_Fe5Ge2Te5_SE5749_grease-quartz-brass_MvT_1000Oe.sabs.dat 

In case of problems or if you need help, please write me an E-Mail: b.mehlhorn at ifw-dresden.de and open an issue in the issue tracker.

Metadata

Release files for sabs 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sabs 0.0.3
File Size Uploaded
sabs-0.0.3.tar.gz 26.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sabs 0.0.3
File Interpreter ABI Platform
sabs-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 51.0 kB

Release files / sabs-0.0.3.tar.gz

Download URL sabs-0.0.3.tar.gz
Size 26.0 kB
Tags Source
SHA-256 checksum
How to use checksums
83d8f89ee576cecf25aa66c231cd5b75ef6bc426d34dca334ce12e7be6abfd45
BLAKE2b-256 checksum
How to use checksums
cc9251dacbe1c1bf87881b278ef7012b883d47c199791addb275bedcd45f5ed0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / sabs-0.0.3-py3-none-any.whl

Download URL sabs-0.0.3-py3-none-any.whl
Size 24.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d0296db2de87db48c61161ab6be7eec1f4be274fdb794f6554bc55ceeb39fc3
BLAKE2b-256 checksum
How to use checksums
5d06d3020414150241439c1d86ea02426f09f28c172be2ed77a03d5c26ff0cfe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page