Module mifcraft :: Class MIF
[hide private]
[frames] | no frames]

Class MIF

source code

object --+
         |
        MIF

An object that manages a writable MIF file and accepts commands to add to that file. It also tracks used labels to catch typos and forgotten labels early.

Method Details [hide private]

__init__(self, **kwargs)
(Constructor)

source code 

Create a MIF object to take contents commands. Create the associated file object, write the header, and ensure that all paths given are valid. Create non-existent paths.

Mandatory: filename <path>, basename <string>

BoxAtlas(self, *args, **kwargs)

source code 

Implements: Oxs_BoxAtlas
 Mandatory: xrange <(min, max)>, yrange <(min, max)>, zrange <(min, max)>
  Optional: None

ImageAtlas(self, *args, **kwargs)

source code 

Implements: Oxs_ImageAtlas
 Mandatory: xrange <(min, max)>, yrange <(min, max)>, zrange <(min, max)>
            viewplane <str>, image <filename> 
            colormap <[(color, name), (color, name) ... ]>
  Optional: matcherror <float=3>

MultiAtlas(self, *args, **kwargs)

source code 

Implements: Oxs_MultiAtlas
 Mandatory: atlases <[name, name, name...]>
  Optional: xrange <(min, max)>, yrange <(min, max)>, zrange <(min, max)>*
  * See user manual for explanation of optional arguments

EllipsoidAtlas(self, *args, **kwargs)

source code 

Implements: Oxs_EllipsoidAtlas 
 Mandatory: xrange <(min, max)>, yrange <(min, max)>, zrange <(min, max)>
  Optional: None

RectangularMesh(self, *args, **kwargs)

source code 

Implements: Oxs_RectangularMesh
 Mandatory: cellsize <(xstep, ystep, zstep)>, atlas <name>
  Optional: None

UniaxialAnisotropy(self, *args, **kwargs)

source code 

Implements: Oxs_UniaxialAnisotropy 
 Mandatory: K1 <scalarfield>, axis <vectorfield>
  Optional: None

CubicAnisotropy(self, *args, **kwargs)

source code 

Implements: Oxs_CubicAnisotropy 
 Mandatory: K1 <scalarfield>, axis1 <vectorfield>, axis2 <vectorfield>
  Optional: None

Exchange6Ngbr(self, *args, **kwargs)

source code 

Implements: Oxs_Exchange6Ngbr
 Mandatory: default_A <float> OR default_lex <float>, atlas <atlas>
            A <[(region, region, value), (region, region, value) ...]> OR lex <...>
  Optional: 'default' may be used instead of 'default_A' or 'default_lex' for simplicity

UniformExchange(self, *args, **kwargs)

source code 

Implements: Oxs_UniformExchange
 Mandatory: A <float> or lex <float>
  Optional: None

ExchangePtwise(self, *args, **kwargs)

source code 

Implements: Oxs_ExchangePtwise
 Mandatory: A <scalarfield>
  Optional: None

RandomSiteExchange(self, *args, **kwargs)

source code 

Implements: Oxs_RandomSiteExchange
 Mandatory: linkprob <0 to 1>, Amin <float>, Amax <float>
  Optional: None

Demag(self, *args, **kwargs)

source code 

Implements: Oxs_Demag 
 Mandatory: None 
  Optional: None

SimpleDemag(self, *args, **kwargs)

source code 

Implements: Oxs_SimpleDemag 
 Mandatory: None 
  Optional: None

UZeeman(self, *args, **kwargs)

source code 

Implements: Oxs_UZeeman
 Mandatory: Hrange <[(x, y, z, X, Y, Z, steps), (x, y, z, X, Y, Z, steps) ... ]>
  Optional: multiplier <float>

FixedZeeman(self, *args, **kwargs)

source code 

Implements: Oxs_FixedZeeman
 Mandatory: field <float>
  Optional: multiplier <float>

ScriptUZeeman(self, *args, **kwargs)

source code 

Implements: Oxs_ScriptUZeeman 
 Mandatory: script <script>
  Optional: multiplier <float=1>, stage_count <int>
            script_args <["stage" and/or "total_time" and/or "stage_time"]>

TransformZeeman(self, *args, **kwargs)

source code 

Implements: Oxs_TransformZeeman 
 Mandatory: script <script>, field <vectorfield>, type <transformtype>
  Optional: multiplier <float=1>, stage_count <int>
            script_args <["stage" and/or "total_time" and/or "stage_time"]>

StageZeeman(self, *args, **kwargs)

source code 

Implements: Oxs_StageZeeman 
 Mandatory: script <script> OR files <[filename, filename ...]>
  Optional: multiplier <float=1>, stage_count <int>

EulerEvolve(self, *args, **kwargs)

source code 

Implements: Oxs_EulerEvolve
 Mandatory: None
  Optional: gamma_LL <float=2.211E5> OR gamma_G <float>, alpha <float=0.5>, do_precess <bool=1>
            min_timestep <float> AND max_timestep <float>
            fixed_spins <(atlas, [region, region ... ])>
            start_dm <float=0.01>
            error_rate <float=1>, absolute_step_error <float=0.2>, relative_step_error <float=0.2>
            step_headroom <0 to 1 exclusive=0.85>

RungeKuttaEvolve(self, *args, **kwargs)

source code 

Implements: Oxs_RungeKuttaEvolve
 Mandatory: None
  Optional: gamma_LL <float=2.211E5> OR gamma_G <float>, alpha <float=0.5>, do_precess <bool=1>
            min_timestep <float> AND max_timestep <float>
            fixed_spins <(atlas, [region, region ... ])>
            start_dm <float=0.01>, method <str="rkf54">
            error_rate <float=1>, absolute_step_error <float=0.2>, relative_step_error <float=0.01>
            min_step_headroom <0 to 1 exclusive=0.33>, min_step_headroom <0 to 1 exclusive=0.95>
            reject_goal <float=0.05>

SpinXferEvolve(self, *args, **kwargs)

source code 

Implements: Oxs_SpinXferEvolve
 Mandatory: J <float>, mp <(x, y, z)>
  Optional: P <float=0.4>, Lambda <float=2> OR
            P_fixed <float>, P_free <float>, Lambda_fixed <float>, Lambda_free <float>
            J_profile <script>, J_profile_args <["stage" and/or "total_time" and/or "stage_time"]>
            
            eps_prime <undocumented>, energy_slack <undocumented>
            
            gamma_LL <float=2.211E5> OR gamma_G <float>, alpha <float=0.5>, do_precess <bool=1>
            min_timestep <float> AND max_timestep <float>
            fixed_spins <(atlas, [region, region ... ])>
            start_dm <float=0.01>, method <str="rkf54">
            error_rate <float=-1>, absolute_step_error <float=0.2>, relative_step_error <float=0.01>
            min_step_headroom <0 to 1 exclusive=0.33>, min_step_headroom <0 to 1 exclusive=0.95>
            reject_goal <float=0.05>

CGEvolve(self, *args, **kwargs)

source code 

Implements: Oxs_CGEvolve
 Mandatory: None
  Optional: gradient_reset_angle <float=80>, gradient_reset_count <int=50>
            minimum_bracket_step <float=0.05>, maximum_bracket_step <float=10>
            line_minimum_angle_precision <float=UNDOCUMENTED>, line_minimum_relwidth <float=UNDOCUMENTED>
            energy_precision <float=1e-12>, method <str in ["Fletcher-Reeves", "Polak-Ribiere"]="Fletcher-Reeves">
            fixed_spins <(atlas, [region, region ... ])>

SpinTEvolve(self, *args, **kwargs)

source code 

Implements: Anv_SpinTEvolve
 Mandatory: beta <float>, u <float or scalar field>
  Optional: u_profile <script>, u_profile_args <script>
            gamma_LL <float=2.211E5> OR gamma_G <float>, alpha <float=0.5>, do_precess <bool=1>
            min_timestep <float> AND max_timestep <float>
            fixed_spins <(atlas, [region, region ... ])>
            start_dm <float=0.01>, method <str="rkf54">
            error_rate <float=1>, absolute_step_error <float=0.2>, relative_step_error <float=0.01>
            min_step_headroom <0 to 1 exclusive=0.33>, min_step_headroom <0 to 1 exclusive=0.95>
            reject_goal <float=0.05>

TimeDriver(self, *args, **kwargs)

source code 

Implements: Oxs_TimeDriver 
 Mandatory: Ms <scalar field>, m0 <vector field>
  Optional: evolver <evolver=first defined>, mesh <mesh=first defined>
            stage_count <float=0>, stage_count_check <0 or 1=0>
            stopping_dm_dt <float or 0=0>, stopping_time <float or 0=0>, stage_iteration_limit <int or 0=0>
            checkpoint_file <path=OOMMF default>, checkpoint_interval <minutes, -1, or 0=15>
            checkpoint_cleanup <"normal", "done_only", or "never"="normal">
            normalize_aveM_output <0 or 1=1>, scalar_output_format <printf string='%.17g'>
            vector_field_output_format <'text', 'binary 4', or 'binary 8'='binary 8'>
            report_max_spin_angle <0 or 1=1>

MinDriver(self, *args, **kwargs)

source code 

Implements: Oxs_MinDriver 
 Mandatory: Ms <scalar field>, m0 <vector field>
  Optional: evolver <evolver=first defined>, mesh <mesh=first defined>
            stage_count <float=0>, stage_count_check <0 or 1=0>
            stopping_mxHxm <float=0>, stage_iteration_limit <int or 0=0>
            checkpoint_file <path=OOMMF default>, checkpoint_interval <minutes, -1, or 0=15>
            checkpoint_cleanup <"normal", "done_only", or "never"="normal">
            normalize_aveM_output <0 or 1=1>, scalar_output_format <printf string='%.17g'>
            vector_field_output_format <'text', 'binary 4', or 'binary 8'='binary 8'>
            report_max_spin_angle <0 or 1=1>

UniformScalarField(self, *args, **kwargs)

source code 

Implements: Oxs_UniformScalarField
 Mandatory: value <float>
  Optional: None

AtlasScalarField(self, *args, **kwargs)

source code 

Implements: Oxs_AtlasScalarField
 Mandatory: atlas <atlas>, values <[(region, value), (region, value) ... ]>
  Optional: default_value <float>, multiplier <float>

LinearScalarField(self, *args, **kwargs)

source code 

Implements: Oxs_LinearScalarField 
 Mandatory: vector <(x, y, z)>
  Optional: norm <float>, offset <float=0>

RandomScalarField(self, *args, **kwargs)

source code 

Implements: Oxs_RandomScalarField 
 Mandatory: range_min <float>, range_max <float>
  Optional: cache_grid <mesh>

ScriptScalarField(self, *args, **kwargs)

source code 

Implements: Oxs_ScriptScalarField
 Mandatory: script <script>
  Optional: script_args <["relpt" and/or "rawpt" a/o "minpt" a/o "maxpt" a/o "span"
                          a/o "scalar_fields" a/o "vector_fields"], ["relpt"]>
            atlas <atlas> OR xrange <(float, float)>, yrange <(float, float)>, zrange <(float, float)>
            scalar_fields <[field, field, ... ]>, vector_fields <[field, field, ... ]>
            multiplier <float=1>

VecMagScalarField(self, *args, **kwargs)

source code 

Implements: Oxs_VecMagScalarField 
 Mandatory: field <vector field>
  Optional: multiplier <float=1>, offset <float=0>

ScriptOrientScalarField(self, *args, **kwargs)

source code 

Implements: Oxs_ScriptOrientScalarField 
 Mandatory: field <scalar field>, script <script>
            atlas <atlas> OR xrange <(float, float)>, yrange <(float, float)>, zrange <(float, float)>
  Optional: script_args <["relpt" and/or "rawpt" a/o "minpt" a/o "maxpt" a/o "span"], ["relpt"]>

AffineOrientScalarField(self, *args, **kwargs)

source code 

Implements: Oxs_AffineOrientScalarField
 Mandatory: field <scalar field>, M <[] of 1, 3, 6, or 9 floats>
  Optional: offset <(x,y,z)=(0, 0, 0)>, inverse <0 or 1=0>, inverse_slack <int=128>

ImageScalarField(self, *args, **kwargs)

source code 

Implements: Oxs_ImageScalarField 
 Mandatory: image <filename>, viewplane <'xy' or 'zx' or 'yz'>
            atlas <atlas> OR xrange <(float, float)>, yrange <(float, float)>, zrange <(float, float)>
  Optional: multiplier <float=1>, offset <float=0>, invert <0 or 1=0>
            exterior <float, 'boundary', or 'error'='error'>

UniformVectorField(self, *args, **kwargs)

source code 

Implements: Oxs_UniformVectorField 
 Mandatory: vector <(x, y, z)>
  Optional: norm <float>

AtlasVectorField(self, *args, **kwargs)

source code 

Implements: Oxs_AtlasVectorField 
 Mandatory: atlas <atlas>, values <[(atlas, (x, y, z)), (atlas (x, y, z)), ... ]>
  Optional: norm <float>, multiplier <float=1>, default_value <(x, y, z)>

ScriptVectorField(self, *args, **kwargs)

source code 

Implements: Oxs_ScriptVectorField
 Mandatory: script <script>
  Optional: script_args <["relpt" and/or "rawpt" a/o "minpt" a/o "maxpt" a/o "span"
                          a/o "scalar_fields" a/o "vector_fields"], ["relpt"]>
            atlas <atlas> OR xrange <(float, float)>, yrange <(float, float)>, zrange <(float, float)>
            scalar_fields <[field, field, ... ]>, vector_fields <[field, field, ... ]>
            norm <float>, multiplier <float=1>

FileVectorField(self, *args, **kwargs)

source code 

Implements: Oxs_FileVectorField 
 Mandatory: file <filename> 
  Optional: { atlas <atlas> OR xrange <(float, float)>, yrange <(float, float)>, zrange <(float, float)> }
            OR
            { spatial_scaling <(x, y, z)>, spatial_offset <(x, y, z)> }
            norm <float>, multiplier <float=1>, exterior <float, 'boundary', or 'error'='error>

RandomVectorField(self, *args, **kwargs)

source code 

Implements: Oxs_RandomVectorField
 Mandatory: min_norm <float>, max_norm <float>
  Optional: cache_grid <mesh>

PlaneRandomVectorField(self, *args, **kwargs)

source code 

Implements: Oxs_PlaneRandomVectorField
 Mandatory: min_norm <float>, max_norm <float>, plane_normal <(x, y, z)>
  Optional: cache_grid <mesh>

ScriptOrientVectorField(self, *args, **kwargs)

source code 

Implements: Oxs_ScriptOrientVectorField 
 Mandatory: field <vector field>, script <script>
            atlas <atlas> OR xrange <(float, float)>, yrange <(float, float)>, zrange <(float, float)>
  Optional: script_args <["relpt" and/or "rawpt" a/o "minpt" a/o "maxpt" a/o "span"], ["relpt"]>

AffineOrientVectorField(self, *args, **kwargs)

source code 

Implements: Oxs_AffineOrientVectorField
 Mandatory: field <vector field>, M <[] of 1, 3, 6, or 9 floats>
  Optional: offset <(x,y,z)=(0, 0, 0)>, inverse <0 or 1=0>, inverse_slack <int=128>

AffineTransformScalarField(self, *args, **kwargs)

source code 

Implements: Oxs_AffineTransformScalarField 
 Mandatory: field <scalar field>
  Optional: multiplier <float=1>, offset <float=0>, inverse <0 or 1=0>

MaskVectorField(self, *args, **kwargs)

source code 

Implements: Oxs_MaskVectorField 
 Mandatory: mask <scalar field>, field <vector field>
  Optional: None

ImageVectorField(self, *args, **kwargs)

source code 

Implements: Oxs_ImageVectorField
 Mandatory: image <filename>, viewplane <'xy' or 'zx' or 'yz'>
            atlas <atlas> OR xrange <(float, float)>, yrange <(float, float)>, zrange <(float, float)>
  Optional: multiplier <float=1>, offset <float=0>, invert <0 or 1=0>
            exterior <float, 'boundary', or 'error'='error'>

Destination(*args, **kwargs)

source code 

Implements: Destination 
 Mandatory: label <string>, type <'mmDisp' or 'mmGraph' or 'mmArchive' or 'mmDataTable'
  Optional: new <True or False=False>
   WARNING: It is not currently possible to validate the data types being linked in this way.

Schedule(*args, **kwargs)

source code 

Implements: Schedule 
 Mandatory: output <an OOMMF output>, label <destination>
            stage <int> AND/OR step <int>
  Optional: None