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.3.tar.gz (26.0 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.3-py3-none-any.whl (24.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sabs-0.0.3.tar.gz
  • Upload date:
  • Size: 26.0 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.3.tar.gz
Algorithm Hash digest
SHA256 83d8f89ee576cecf25aa66c231cd5b75ef6bc426d34dca334ce12e7be6abfd45
MD5 645f2fecd0bdd8ca21c0748cc149006b
BLAKE2b-256 cc9251dacbe1c1bf87881b278ef7012b883d47c199791addb275bedcd45f5ed0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sabs-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 24.9 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2d0296db2de87db48c61161ab6be7eec1f4be274fdb794f6554bc55ceeb39fc3
MD5 23913af3150b2b5ae0e943f0611e44bc
BLAKE2b-256 5d06d3020414150241439c1d86ea02426f09f28c172be2ed77a03d5c26ff0cfe

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