Skip to main content

SQUID Advanced Background Subtraction

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sabs-0.0.2.tar.gz (26.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sabs-0.0.2-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

Details for the file sabs-0.0.2.tar.gz.

File metadata

  • Download URL: sabs-0.0.2.tar.gz
  • Upload date:
  • Size: 26.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for sabs-0.0.2.tar.gz
Algorithm Hash digest
SHA256 b23c93cbb920e5ccd3c10e83354c8ea7e69ecc0daf788f15de72798e586cddba
MD5 20fe929829eea6c4b47867e5c790e9fc
BLAKE2b-256 1e20c5f8d23456e1a33ecfa302f3bccf8dc8094a8067a52eef40769867d496ca

See more details on using hashes here.

File details

Details for the file sabs-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: sabs-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 25.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for sabs-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8170de6f6f9b2180e891d717df954e0c5436534c19935f6405660216ce19e528
MD5 0e6a5aa1d04172bde05e7b4b419c1b0f
BLAKE2b-256 a3c4f3f606111d6a461b535422ed17913c6ab04f8ab32dbcbdda932b656119e8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page