Example i23: SQUID calibration using coil - Calculations

Computes the analytic magnetic field and/or magnetic field gradient due to a circular current flowing in a coil placed on the surface of the body. This is used to validate squid measurements by comparing them with those generated by a non-magnetic field. As the magnetic field is symmetric about the coil axes, by assuming that the coils are at the centre of the SQUID dewar we calculate the magnetic field at a distance specified by the radius between the dewar centre and the coil. The coil positions must therefore be entered as data points along with the squid sensor positions.


The comfile run by this example is as follows:

# Example i23
# -----------

# This command file calculates the analytic magnetic field created by a one 
# loop coil with a specified current running through it in order to validate 
# magnetic field measurements made by the SQUID.

# Set the test number
$TEST=1;

# Define offsets for the first magnetic field, second magnetic field and 
# magnetic field gradients respectively
$SQUIDOFFSET_1=10000;    
$SQUIDOFFSET_2=15000;
$SQUIDOFFSET_3=20000;

# Define the output directory
if(!defined $example) 
    {  
        $example='.' ;
        $OUT="output";
    } else{
        $OUT=".";
    }

# Define the parameters, coordinates and basis functions
fem def para;r;$example/coil;
fem def coor 3,1
fem def base;r;$example/bicubic_bilinear;

# Read in the squid channel and coil positions. The coil positions are the last
# 3 data points in the .ipdata file, thus there are 19 SQUID points plus 3 coil
# positions
# Note that this data has already been rotated and translated in order to
# "line up" with the actual position of the squid
fem def data;r;$example/cmiss_squid_19 field num_field 3;

# Define the filename extension for the .exdata files
$FILENAME=sprintf("%05d",$TEST);

# Compute the magnetic field gradient at the coil positions
# This is done by placing a "virtual" coil at the centre of the squid
# and calculating the magnetic field at distances prescribed by the actual
# coil positions

# 1. Compute the magnetic field at a given height from the torso

fem eval solu mag from MFI nss 1 coil rad_coil 3.0 current -968e-6 height_coil 7.0;

# Update the data field and export the data  
fem up data field from MFI nss 1;
fem export data;$OUT/mfi_1_$FILENAME as mfi_1 field_num 1..3 field_name magnetic_1 offset $SQUIDOFFSET_1;

# 2. Compute the magnetic field at 50mm from this given height

fem eval solu mag from MFI nss 1 coil rad_coil 3.0 current -968e-6 height_coil 57.0;

# Update the data field and export this data
fem up data field from MFI nss 1;
fem export data;$OUT/mfi_2_$FILENAME as mfi_2 field_num 1..3 field_name magnetic_2 offset $SQUIDOFFSET_2;

# 3. Compute the magnetic field gradient between the two fields

fem eval solu mag from MFI nss 1 coil baseline 50.0 rad_coil 3.0 current -968e-6 height_coil 7.0;

# Update the data field and export this data
fem up data field from MFI nss 1;
fem export data;$OUT/grad_$FILENAME as mfi_grad field_num 1..3 field_name grad offset $SQUIDOFFSET_3;



Additional testing commands:

#Testing example i23

fem li data

Files used by this example are:

Name                     Modified     Size

example_i23.com 18-Jan-2005 2.4k bicubic_bilinear.ipbase 18-Jan-2005 7.8k cmiss_squid_19.ipdata 18-Jan-2005 2.4k coil.ippara 18-Jan-2005 5.9k test_output.com 18-Jan-2005 34

Download the entire example:

Name                      Modified     Size

examples_i_i2_i23.tar.gz 27-Aug-2010 5.9k

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmSuccessSun Mar 6 00:02:51 20160
cm-debugSuccessSat Mar 5 00:04:50 20160
mips-irix
cmSuccessSun Aug 19 01:23:26 20073
cm-debugSuccessWed Aug 15 01:22:05 20077
cm-debug-clear-mallocSuccessSat Aug 18 02:17:18 200786
cm-debug-clear-malloc7SuccessMon Aug 20 02:05:54 2007123
cm64SuccessSun Aug 19 01:28:13 20073
cm64-debugSuccessTue Aug 21 01:22:02 20076
rs6000-aix
cmSuccessWed Mar 4 01:08:32 20090
cm-debugSuccessMon Mar 2 01:06:12 20091
cm64SuccessWed Mar 4 01:08:32 20090
cm64-debugSuccessTue Mar 3 01:11:48 20091
x86_64-linux
cmSuccessSun Mar 6 00:01:08 20160
cm-debugSuccessSat Mar 5 00:01:38 20160

Testing status by file:


Html last generated: Sun Mar 6 05:51:38 2016

Input last modified: Thu Aug 26 14:57:17 2010


CMISS Help / Examples / i / i2 / i23