Mees Ambiguity resolution - Annealing code Barry LaBonte August 17, 2000 ivm_current_anneal.pro This is a slight modification of the procedure current2.pro written by Tom Metcalf for the Haleakala Stokes Polarimeter data. The physical basis of the code is described in Metcalf, T. R.: Solar Phys., 155, 235, 1994. Resolving the 180-degree ambiguity in vector magnetic field measurements: The 'minimum' energy solution. A description of the use of the code follows. A program, called ivm_current_anneal.pro, resolves the 180 degree ambiguity in Stokes and IVM data. It uses simulated annealing (see Numerical Recipes) to simultaneously minimize the divergence of the field and the vertical current. The program's big advantage is that it does a very good job of resolving the ambiguity in a physically meaningful way. The program's big disadvantage is that it is slow. Example: IDL> @ivm_current_anneal_compile IDL> bint = bfits('IMGM990618.1839 ; Get magnetic field IDL> j = ivm_current_anneal(b) ; Resolve ambiguity IDL> wbfits,j,'J911005.1702',head=head ; Save result There are a number of options you can specify in the call to ivm_current_anneal ... use doc_library to see what they are. Please let me know of any successes/failures.