Zeemanfit: Use and Development of the solis_vms_zeemanfit code
Anna L. H. Hughes, Jack Harvey, Andrew R. Marble, Alexei A. Pevtsov
ZZeemanfit: Use and Development of thesolis vsm zeemanfit code
Anna L. H. Hughes, Jack Harvey, Andrew R. Marble, Alexei A. Pevtsov,& the SOLIS Pipeline Working Group of the NSO Integrated Synoptic ProgramInstitution: National Solar Observatory Integrated Synoptic ProgramSeptember 18, 2018
Technical Report No.
NSO/NISP-2013-02
Abstract
The purpose of the Zeemanfit Code is to provide a straight-forward, easily checked measureof the total magnetic-field strength in the high-strength umbral regions of the solar disk. In thehighest-strength regions, the Zeeman splitting of the 6302˚A Fe line becomes wide enough forthe triplet nature of the line to be visible by eye in non-polarized light. Therefore, a three-linefit to the spectra should, in principle, provide a fairly robust measure of the total magnetic-fieldstrength.The code uses the Level-1.5 spec-cube data of the SOLIS-VSM 6302-vector observations(specifically the Stokes-I and Stokes-V components) to fit the line profiles at each appropriatepixel and calculate the magnetic-field-strength from the line-center separation of the two fit6302.5 σ -components. The 6301.5˚A Fe line is also present and fit in the VSM 6302-vector data,but it is an anomalous-Zeeman line with a weaker response to magnetic fields. Therefore, nomagnetic-field measure is derived from this portion of the spectral fit. a r X i v : . [ a s t r o - ph . S R ] J un ontents The base data ingested by the Zeemanfit code consists of the cleaned, Level-0.5 or Level 1.5 VSM6302v (and 6302l for PROVER2 = 1.2) spectral data (Stokes-I and Stokes-V components only),such as that shown in Figure 1. While the code will function using only Level-0.5 scanline data,optimally it takes in Level-1.5 distortion-corrected spec-cube data, along with Level-2-processedcontinuum data, which is used to aid in sorting pixels to be Zeeman-fit ( § § lines at 6302.0 and 6302.8˚A. While the 6301.5˚A-Fe-line is an anomalous-Zeeman line, the 6302.5˚A-line is not, and the triplet nature of the line can be perceived in Stokes-Iin high-field-strength penumbral and umbral regions. In regions with a strong longitudinal field,the Stokes-V profile shows clear signals corresponding to the σ -components of the triplet lines.The calculation of the magnetic-field strength using the Zeemanfit code is as simple as it can be( § σ -component lines fit to theprofile. Figure 3 depicts the resultant output for one zoomed-in region of one data image, whileFigure 4 shows a continuum-reference map of that region. The computed output in this exampleincludes:1. The total magnetic-field strength calculated from the fit to the Stokes-I profile.2igure 1: Examples of Level-0.5 scan-line data running across an active region. The images’horizontal axes correspond to pixel columns of the disk-image pixels. The vertical axes denotepixels along the spectral-data plane.Figure 2: Examples of Stokes-I (left panel) and Stoke-V (right panel) spectral profiles for threepixels across an active region. Orange corresponds to a quiet-sun pixel, purple to a penumbralpixel, and black to an umbral pixel. 3igure 3: Results of the Zeemanfit computed output zoomed in to one region for data taken onJanuary 11 th , 2013.Figure 4: Continuum image corresponding to Figure 3 and the January 11 th , 2013 data.4. The Stokes-I 1- σ error propagated from the fit-uncertainty in the line-center positions.3. The longitudinal magnetic-field strength calculated from the fit to the Stokes-V profile.4. The Stokes-V 1- σ error propagated from the fit-uncertainty in the line-center positions.Note that not all of the pixels fit in Stokes-I have corresponding measurements from Stokes-V. Thisis primarily because the Stokes-V signal may become too weak to fit in the presence of a stronglytransverse magnetic field. The results of fitting the Stokes-V profiles are not standard-piplelinedata products.For the standard products, one feature of the Zeemanfit Stokes-I calculation is that it is designedaround the greatest ease of fitting the highest-field-strength pixels. Therefore, the uncertainties inthe Stokes-I measurements tend to be higher in the lower-strength outer regions of the penumbrae.Also outside of standard pipeline data production, if the flag /DISPERCALC is set whenthe Zeemanfit routine is called, then the dispersion is calculated on a per-output-pixel basis for all output pixels using the fit positions of the two telluric O lines (see § σ error in % on the dispersion measurement propagated from theuncertainty in the fit line-center positions of the telluric lines. This option does add significantlyto the processing time, as all on-disk pixel-spectra must be fit in order to report the measureddispersion across the entire image. The earliest Zeemanfit results output by the SOLIS pipeline (6302v results only) have header-keyword values PROVER2A = ’1.1’ and PROVER2B = ’1.1’. The following adjustments affect-ing the 6302v-Zeemanfit processing have since been implemented for PROVER2A = ’1.2’ andPROVER2B = ’1.2’:1. The use of the solis vsm zeemanfit FITRANGE() function has replaced the previouslyhard-coded values of fitrange = [15,105]. These boundaries (inclusive) define the range ofspectral-data pixels that are passed to MPFITFUN() to fit the 6302 input profiles. See § The method used to guess the Fe π -component line-center positions for the Stokes-I Zeeman-fit has been modified to better account for possible variations in particularly thesymmetry/asymmetry of the Zeeman-triplet profiles. See § none of the line profiles used in the Stokes-I Zeeman-fit may be defined in emission; now all Stokes-I Zeemanfit line-amplitudes must beless than zero . Previously, the three lines used to fit the 6301.5˚A Zeeman-broadened line-set had no constraints on any of their line parameters. See § π -position guessing), each sunspot group shows a smallcluster of points (above the line for the near-limb spot and below the line for the others) with a5igure 5: Plots comparing the Zeemanfit results of processing a 6302v observation before andafter implementation of the FITRANGE() algorithm. This observation has three main sunspotgroups. The top row of plots overlay the profiles of the two run-fits as a function the intensity-guessed magnetic-field-strength for each sunspot group. The bottom row of plots compares the twoZeemanfit results point-to-point with the old-style along the x-axis and the new-style along they-axis.Figure 6: Plots comparing the Zeemanfit results of processing a 6302v observation before and afterimplementation of centerpools-style guessing of the π -component positions. (Both runs comparedhere had FITRANGE() already implemented.) These plots are for runs using the same observationas in Figure 5, and the top and bottom rows of plots follow the same conventions as in Figure 5.6pread in results along one axis and positioned at ∼ § The following sections detail the specifics of the code used to make the Zeemanfit–Magnetic-field-strength calculations, including: § § § § § § § The code is currently written in idl, using READFITS and WRITEFITS to ingest spectral data andoutput the zeemanfit results. The primary foundation for the choice of idl is the use of MPFITFUNas the routine used for fitting a line-profile to each image pixel of spectral data. Any translationout of idl would need to begin with either a new fit-finder routine chosen in the new language, orsetting up the new-language-code to take MPFITFUN as an external idl routine.The hierarchy of code usage is as follows (functions placed more than once are written in grey): solis vsm ZEEMANFIT()* solis vsm zeemanfit IO() * solis vsm zeemanfit STOKESVPICK() • solis vsm zeemanfit STOKESVPICK WIDE() * solis vsm zeemanfit DARKPIXELS() * solis vsm zeemanfit RECIPE() • solis vsm zeemanfit FITRANGE() • solis vsm zeemanfit VFIT 6302V() ◦ solis vsm zeemanfit MULTVOIGTFIT()- solis vsm zeemanfit INDEXSTRING()- solis vsm zeemanfit MULTVOIGT() • solis vsm zeemanfit IFIT 6302V() ◦ solis vsm zeemanfit FLOODMIN() ◦ solis vsm zeemanfit HANDLER I 6302V()7 solis vsm zeemanfit MULTVOIGT() ◦ solis vsm zeemanfit HANDLER I 6302V AMPCAP()- solis vsm zeemanfit MULTVOIGT() ◦ solis vsm zeemanfit MULTVOIGTFIT()- solis vsm zeemanfit INDEXSTRING()- solis vsm zeemanfit MULTVOIGT() • solis vsm zeemanfit OUTFIT 6302V() ◦ solis vsm zeemanfit FLOODMIN() ◦ solis vsm zeemanfit MULTVOIGTFIT()- solis vsm zeemanfit INDEXSTRING()- solis vsm zeemanfit MULTVOIGT() * solis vsm zeemanfit HEADER() * solis vsm zeemanfit OUTNAME() solis vsm zeemanfit PLOT()* solis vsm zeemanfit MULTVOIGT()The individual function descriptions are given below: SOLIS VSM ZEEMANFIT:
The Zeemanfit code is accessed at the command line through theSOLIS VSM ZEEMANFIT() function. This function:* Calls ZEEMANFIT IO() to read in the input spectra-files and sort the data into a usefulorganization.* Sorts and organizes the input parameters in preparation for calling ZEEMANFIT RECIPE().* Calls ZEEMANFIT STOKESVPICK() and ZEEMANFIT DARKPIXELS() to select whichimage pixels should be Zeemanfit (see § only returning them into ’resultarray’ (below) at the command line./QUIET turns off printed warnings and progress-markers, and several other keyword values allowfor variations on, primarily, the constraints used in fitting the Stokes-I spectra, such as OGAUSS,8hich takes a vector of 1s and/or 0s setting specific lines in the fit to be fit only as gaussian’s (ornot).For standard pipeline computing, at least two input files must be specified: The Stokes-I spec-cube file is taken as the primary input; PFILE specifies the regular Level-2 output file, whichcontains a frame for the Level-2 corrected continuum image; and VFILE specifies the Stokes-Vspec-cube, which must be supplied to run /Vfit and can be used for selecting pixels and guessinginput profiles if PFILE is not specified, though the results will vary measurably from those producedusing PFILE. See § resultarray = SOLIS_VSM_ZEEMANFIT (’Data/k4v9t130207t171846_i.fts.gz’, $PFILE=’Data/k4v92130207t171846.fts.gz’, $OUTPRFX=’ResultsStorageDirectory/’, $/WRITEFILE, /TERSE, /QUIET) solis vsm zeemanfit DARKPIXELS: This function is contained within the source-code filesolis vsm zeemanfit.pro. It is used to select all pixels across the image (using the Level-2 correctedcontinuum-intensity image) that are dark enough (and on-disk enough) to qualify as sunspot pixelsthat should be Zeeman-fit (even if Stokes-V selection and fitting are not viable).It takes in a Level-2 fits file, reading in the continuum-intensity frame as well as the parametersused to model the limb-darkened quiet-sun intensity. It computes the limb-darkened intensity, I LD ,using the equation: I LD = I (cid:88) n =1 µ n × (cid:34) − (cid:18) rR LD (cid:19) (cid:35) n/ , (1)where r is the pixel’s distance from the designated disk center, and I , R LD , and each of the µ n ’s are the limb-darkening fit parameters read in from the PFILE header. It then compares thelimb-darkened-fit to the continuum-intensity data and selects those pixels which are:1. darker than 95% of the limb-darkened-fit intensity2. located within 95% of the distance from the disk center to the limb-darkened-fit radius, R LD .passing back their I/I LD value for use by the Zeemanfit code. solis vsm zeemanfit STOKESVPICK: This function is contained within the source-codefile solis vsm zeemanfit.pro. It is used to select pixels across the image (using the Stokes-V-spectrapeak-pixel values and locations) that show a strong signal in polarized light consistent with a de-cently strong local-magnetic-field (longitudinal). This selection is used to indicate pixels for whichthe Stokes-V spectra may be Zeeman-fit, or to select all pixels for Zeeman-fitting (Stokes-I andStokes-V) in the case where an appropriate Level-2 PFILE is not available to run solis vsm zee-manfit DARKPIXELS(). For further details on the pixel-selection methods, see § solis vsm zeemanfit RECIPE: This function is contained within the source-code file solis -vsm zeemanfit.pro. It takes in the user-flagged choices and spectral-data profiles for a given image9ixel and computes the profile fit(s) and magnetic-field strength for that pixel. It returns a datastructure that by default contains the values for the primary results, as well as the parameters usedto define the fit(s). (See § not Zeemanfit-viable, zeroes are returned for the magnetic-field-strength values and, if the /DISPERCALC keyword is flagged, the Stokes-I profile is fit withonly four lines by calling the SOLIS VSM ZEEMANFIT OUTFIT 6302V() function so that thedispersion for that pixel may be calculated from the separation of the two telluric O lines.If the pixel is flagged as Zeemanfit-viable, the Stokes-V (if /VFIT is flagged) and Stokes-Ispectra are fit separately by calling SOLIS VSM ZEEMANFIT VFIT 6302V() and SOLIS VSM -ZEEMANFIT IFIT 6302V(). If /DISPERCALC is flagged, the dispersion is then calculated fromthe Stokes-I positions of the two telluric O lines, otherwise the dispersion is taken as set for a givencamera (see § σ -component lines (see § > > solis vsm zeemanfit FITRANGE: This function is contained within the source-code filesolis vsm zeemanfit.pro. It is called from solis vsm zeemanfit RECIPE() (if fitrange has not alreadybeen externally set by the user), taking in an individual Stokes-I profile to return a vector of thefirst and last pixel indices defining the range of spectral-data pixels that should be passed toMPFITFUN() for the profile fit(s).The algorithm does rely on a number of hard-coded values related to the input Stokes-I dataprofile. It assumes that:* That the data profile is measured across 128 pixels.* That blue-side transmission has reached roughly continuum levels by pixel 20, while the6301.5 Fe line-set minimum occurs somewhere between pixels 20 and 63.* That no more than about two-thirds of a sometimes encroaching blue-ward telluric line occurswithin 28 pixels from the minimum position of the 6301.5-Fe-line set.* And that a red-side data peak occurs redward of the second telluric O line within the pixelrange 86 to 122.If the above conditions are met, FITRANGE() is able to return bounds defined by the blue-sideand red-side peaks in the continuum of the profile (there-by avoiding transmission drop-off regions),but that on the blue side exclude the presence of an additional (usually present in the 6302l spectra)telluric feature not accounted for in the Zeeman-model fit.Please see § § solis vsm zeemanfit VFIT 6302V: This function returns the fit parameters to a Stokes-V pro-file. It takes in the profile data; sets up guesses for the fit, evaluating the minimum/maximumpositions of the first and last halves of the V-spectra-profile for line-center guesses; and calls SOLIS -VSM ZEEMANFIT MULTVOIGTFIT() to do the actual work of fitting multiple (4) line profilesto the Stokes-V data. See § olis vsm zeemanfit IFIT 6302V: This function returns the fit parameters to a Stokes-I profileunder the assumption that the two 6302˚A Fe lines are split into triplets. It takes in the profile data;sets up guesses for the fit, using ZEEMANFIT FLOODMIN() to initialize guesses for the primaryline-center positions, and guessing the π - σ component separations based on a continuum-intensityfirst-estimate of the magnetic-field strength ( § § solis vsm zeemanfit HANDLER I 6302V: This function is contained within the source-code file solis vsm zeemanfit ifit 6302v.pro. It can be passed to ZEEMANFIT MULTVOIGTFIT()and used as a go-between function between MPFITFUN() and ZEEMANFIT MULTVOIGT(),allowing MPFITFUN() to vary the separation between the 6302.5˚A σ - and π -components, eventhough the solis vsm zeemanfit MULTVOIGT() function requires the line-center positions of eachcomponent. x ,σ R = x ,π + c xR , (2) x ,σ V = x ,π − c xV , (3)where c xR and c xV specify the separation of the π -component to the right and left σ -components.The c xR and c xV parameters are used (rather than setting an inequality statement in the par-info[x0].tied parameter) to constrain the three 6302.5˚A triplet lines to remain in the wavelengthorder specified. It also allows the error in the magnetic-field-strength calculation to depend on onlythe error in the σ - π separation if the two separations are mirrored (see § solis vsm zeemanfit HANDLER I 6302V AMPCAP: This function is contained withinthe source-code file solis vsm zeemanfit ifit 6302v.pro. It can be passed to ZEEMANFIT MULTVOIGT-FIT() and used as a go-between function between MPFITFUN() and ZEEMANFIT MULTVOIGT().This handler function serves the same functionality as ZEEMANFIT HANDLER I 6302V()with the addition of constraining the two 6302.5˚A σ -component amplitudes to be less than or equalto the π -component amplitude (so that MPFITFUN() varies an amplitude-scaling-parameter foreach σ -component within the range of 0.0 to 1.0). A σ R/V = A π ∗ c A , R / V (4) solis vsm zeemanfit OUTFIT 6302V: This function returns the fit parameters to a Stokes-Iprofile under the assumption that the two 6302˚A Fe lines are not split into triplets. It takes in thedata profile; sets up guesses for the fit, using ZEEMANFIT FLOODMIN() to pick a guess for eachof the line-center positions; then calls ZEEMANFIT MULTVOIGTFIT() to do the actual work offitting multiple (4) line profiles to the Stokes-I data. It is used to find the separation of the twotelluric O lines to calculate local dispersion (if requested) in the cases of quiet-sun spectra. See § solis vsm zeemanfit MULTVOIGT: This function takes in a vector of independent values plusa parameter array of Voigt-profile line parameters for multiple lines, and returns the calculatedline profile. The function assumes that the last row of the parameter array contains coefficients11or a polynomial background continuum. It takes in Voigt-profile parameters for each row of theparameter-array in the order: Amplitude, line-center position, Gauss-width σ , Lorentz-width γ . Ifeither of the two width parameters are set to zero, it calculates the profile for that line using a puregaussian or pure Lorentzian profile, as appropriate.The preferred format for the parameter-array is an actual array , however, MPFITFUN() re-quires a vector of parameters, therefore MULTVOIGT() will take a vector of parameters underthe assumption that an additional final element has been added specifying the order of the back-ground polynomial ( n coefficients −
1) and that the number of elements allotted per line componentcorresponds to the maximum of 4-Voigt-parameters vs. n coefficients -of-the-polynomial.Flagging the keyword COMPONENTS=components will return an additional array of line-profile values corresponding to each continuum+spectral-line component of the full profile. solis vsm zeemanfit MULTVOIGTFIT: This function does all of the work of formatting passed-in multiple Voigt-profile–parameter guesses, accounting for everything necessary to implement allof the bells and whistles and requirements of fitting them, and converting them into the formatused by MPFITFUN().Using the PARINFO ADD=parinfo add keyword, it can take in a structure-array of pre-setconstraints for running MPFITFUN(). However, it creates the appropriate parinfo-structure-vectorto be passed to MPFITFUN() that is set up for running a multiple-Voigt-profiles–plus–polynomial-background–fit to the data using the model in the ZEEMANFIT MULTVOIGT() function.* If the OGAUS or OLORN keyword parameters are included in the call, it will fix parinfoconstraints so that the specified lines are fit as gaussians or Lorentzians only.* It also reformats the parameter-(guess)-array into a parameter vector so that MPFITFUN()can handle it properly, then converts it back into an array to return as the results to the usercall. It calls ZEEMANFIT INDEXSTRING() to convert any specific parameter indexesnamed in the PARINFO ADD[].tied values to their corresponding vector specifications.* It does not use any .value specifications passed through the PARINFO ADD keyword, onlythe guesses in the passed param-guess array or their appropriate translations.In order to allow MPFITFUN() to run its fit on alternative parameters to those explicitlyaccepted by the ZEEMANFIT MULTVOIGT() function, using the HANDLER keyword, ZEE-MANFIT MULTVOIGTFIT() can take in the name of a handler function to pass to MPFITFUN()in lieu of ZEEMANFIT MULTVOIGT() if the handler function conforms to the following prop-erties:1. Conforms to the MPFITFUN() function requirements of returning a line-profile vector to acall statement that looks like: lineprofile = H_FUNCTION(x_vector, param_vector) (Assuming that param vector is formatted appropriate to MPFITFUN() but passing alongto ZEEMANFIT MULTVOIGT() the type of param vector that it expects, i.e., ’handling’the passed parameters.)2. Alternatively, returns an MPFITUN()-suitable converted parinfo-structure-vector(e.g., parinfo[ x ,σ R ].value → parinfo[ c xR ].value) to a call statement if the /PARINFO CON-VERT flag is set: 12 arinfo_vector = H_FUNCTION(0, parinfo_vector, /PARINFO_CONVERT)
3. Alternatively, returns a reverse-converted parameter-vector (e.g., x ,σ R ← c xR ) to a callstatement if the /RCONVERT flag is set: param_vector = H_FUNCTION(0, param_vector, /RCONVERT) This function ( ZEEMANFIT MULTVOIGTFIT() ) will also return PERROR, BESTNORM,and DOF as calculated by MPFITFUN() if those keywords are set in the call. solis vsm zeemanfit INDEXSTRING:
This function is contained within the source-codefile solis vsm zeemanfit multvoigtfit.pro. It takes in a string variable potentially containing an ar-ray designation, e.g., ’P[5,2]’, + a vector of array dimensions, and returns a string containing thevector-translated designation, e.g., ’P[17]’. solis vsm zeemanfit FLOODMIN:
This function is used by both solis vsm ZEEMANFIT -IFIT 6302V() and solis vsm ZEEMANFIT OUTFIT 6302V() to locate a specified number of data-profile minimums within a specified data-range (i.e., to find the four primary minima correspondingto the two solar Fe lines and two telluric O lines).This minimum finder works by evaluating the number of data ranges that fall below somespecified floodline value. It begins with a floodline set to the minimum value of the input data,then moves upward in increments (the number of which is optionally adjustable) toward the datamaximum until the number of minima pools matches the number of minima requested. It returns-1 if this criterion is not met. In order to avoid returning local ’minima’ due only to backgroundnoise, a minimum gap value may be set specifying the required pixel distance between minimapools. However, this function is still best used only with relatively smoothly varying data.Note that a search-data-range must be specified in order to avoid returning data-boundary po-sitions where the transmission may drop toward zero. solis vsm zeemanfit IO: This function is used by SOLIS VSM ZEEMANFIT() to take in andsort the input data files. It returns spec-cubes of the the Stokes-I and Stokes-V (if available) spec-tral data, as well as a continuum-intensity frame to write to the output file if an appropriate PFILEhas been specified. There are currently a number of different data-input configuration options. See § solis vsm zeemanfit HEADER(): This function is called by SOLIS VSM ZEEMANFIT() tocreate an appropriate fits header for the fits output file. It consults SOLIS VSM FITSINFO() forframe specifications to describe the appropriate frames output in accordance with the spectrally-derived-quantities data-product file specifications. solis vsm zeemanfit OUTNAME():
This function is called by SOLIS VSM ZEEMANFIT()and uses the primary input filename and header to define an output filename that corresponds tothe current SOLIS file-naming conventions. solis vsm zeemanfit PLOTS:
This function is largely independent of the rest of the solis vsm -zeemanfit code. It takes in a data structure like those returned by SOLIS VSM ZEEMANFIT -RECIPE() (fit-results for a single image pixel), retrieves the spectral-profile used to calculate the13t, calls SOLIS VSM ZEEMANFIT MULTVOIGT() to evaluate the fit parameters, and returnsan array containing: the wavelength axis, the data profile, the fit profile, the fit-continuum profile,and the fit-continuum+line profile for each of the fit lines.
Right now the code is set up to take in either:1. spec-cube files of Level-2 geometric-distortion-corrected Stokes-I and-V (specified with VFILE=)spectra, or2. a Level-0.5 scan-line file or a text-file-list of scan-line files.The code is optimized for using the distortion-corrected spec-cube file(s) along with the PFILE=-designated corresponding Level-2 standard-output file (e.g., a Level-2 Quicklook file). The PFILEis used to supply an image frame of the continuum intensity and, when present, is the preferred(pipeline) method for selecting which pixels should be Zeemanfit. A Level-1 PFILE may be suppliedwhen calculating the Zeemanfit results of assembled scan-line files, but it will not be used to selectpixels, only included as a helpful-reference frame with the output fits file. If the primary inputis a Stokes-I spec-cube file and /Vfit is not flagged then one of either VFILE or an appropriatePFILE must be supplied in order to run image-pixel selection (PFILE is preferred for defaultpipeline operation). To run with /Vfit, VFILE is mandatory, while PFILE remains preferred forpixel selection.Using the keywords XMIN, XMAX, YMIN, YMAX will tell the code to run its calculations onan area-scan-style region of the image. Using XMIN or YMIN by themselves will tell the code torun on a single image row or image column only. Alternatively, if using scan-line files as input,XMIN and XMAX function as described, but YMAX is disabled, and YMIN should be used tospecify the row-designation (in idl 0-indexed coordinates) of the first input scan-line file.An output fits file is only written if the /WRITEFILE keyword is flagged. Using the OUTPRFXkeyword, the call can specify a directory into which the output fits files should be written (and/ora prefix to add to the beginning of the output filename).The names for the output files and their headers are tailored to the standard-pipeline processingand naming scheme; be careful to use the OUTSFX keyword if running multiple calculations(resulting in hopefully multiple output files) on the same data set.If the flag /VFIT is set, then the output file will include frames for the Stokes-V calculated(longitudinal) magnetic-field strength and corresponding 1-sigma errors. If the /DISPERCALCflag is set, then the output file will include frames for the calculated-per-image-pixel dispersion in˚A/pixel and the associated relative
The code allows for two methods to select which image-pixels should be Zeeman-fit to returncalculated magnetic-field strengths and errors. The default selection method (in solis vsm ZEE-MANFIT DARKPIXELS() ) uses the corresponding Level-2-corrected continuum intensity imageto select image pixels that are noticeably darker than the background quiet sun. The secondarymethod (in solis vsm ZEEMANFIT STOKESVPICK() ) examines the Stokes-V spectral profile forevidence of strong magnetic fields. The appropriate pixel-selection method is called from and theresults sorted within the main-level code solis vsm ZEEMANFIT().14igure 7: Presents the continuum-intensity across a row of image-data (blue) as well as the limb-darkened-modeled fit (pink) used by solis vsm zeemanfit DARKPIXELS(). The threshold cutofffor selecting a pixel as dark enough to indicate the presence of a strong magnetic field is set at 95%of the limb-darkened-fit intensity.Using solis vsm ZEEMANFIT DARKPIXELS() to select image pixels that are dark in thecontinuum is the preferred, default selection method because it is both more contained to themost-active regions of interest than the solis vsm ZEEMANFIT STOKESVPICK() selections andindiscriminate to local field orientation. Solis vsm ZEEMANFIT DARKPIXELS() uses the Level-2-corrected continuum-intensity image paired with the 6-term polynomial, limb-darkening-modelfit to the intensity profile to select pixels that are substantially darker than those of the quietsurroundings, as demonstrated in Figure 7.The primary drawback to this selection method is demonstrated in Figure 8. In the case whenan observation is taken under somewhat cloudy conditions, the Level-2 continuum-intensity imagecannot be perfectly normalized, leaving light or dark bands where scan lines were strongly affectedby clouds. In this case, selecting pixels-to-fit purely by their darkness relative to the limb-darkening-fit profile will include a large number of quiet-sun pixels, producing cloud-streak artifacts in thefinal Zeemanfit magnetogram. Therefore, solis vsm ZEEMANFIT DARKPIXELS() also uses theLevel-2 cloud-transparency frame to screen out pixels associated with cloudy scanlines. Pixels arede-selected if the corresponding cloud-transparency is less than 0.9. While this threshold may seemhigh, one should note that:a) A threshold of 0.88 used on the observation displayed in Figure 8 failed to remove allcloud-streak artifacts for that observation.b) Zeemanfit is decidedly sensitive to the initial guess for the local magnetic-field-strength(as discussed in § and maximum values of the Stokes-V profile must be ≥
500 counts ( ≥ ≥ There are three separate line-fit cases considered by this code: Zeeman-triplet-fit to the Stokes-Ispectra, Zeeman-fit to the Stokes-V spectra, and Non-zeeman-fit to the Stokes-I spectra. These fitsare orchestrated by the functions solis vsm zeemanfit IFIT 6302V(), solis vsm zeemanfit VFIT -6302V(), and solis vsm zeemanfit OUTFIT 6302V(), respectively.The default settings for these fit-scenarios were chosen during testing of the code to providethe most robust and efficient fit performance. Those settings and the reasoning behind them aredetailed in the sub-sections that follow. 16igure 9: Stokes-I spectra (left panel) and Stokes-V spectra (right panel) sorted using solis vsm -zeemanfit STOKESVPICK() for pixels in a line across a strong active region near the solar limb.Using a slightly stricter criterion that Stokes-V selection requires a minimum or maximum am-plitude of ≥ blue indicates pixels that were selected for Zeeman-fitting, and red indicates pixels that were not.Figure 10: Zeemanfit results for a 6302l observation where the pixels-to-fit were selected usingSTOKESVPICK() and the initial guesses for the magnetic-field strengths were supplied by theStokes-V spectra as well. 17igure 11: A map showing the blue-side pixel boundaries returned by FITRANGE() for an example6302l observation. Across this map, there is a total range of 13 pixels selected for this boundary,compared to a range of 9 pixels for the red-side bounds. For a same day 6302v observation thereis also a blue-boundary range of 13 pixels, but shifted left by 3 pixels, and a red-bound range of 16pixels (though the vast majority fall into the same-range-shifted pattern as with the blue-boundary).Unless otherwise specified at the command line, the range of data-pixels used in each fit isdetermined on a per-image-pixel basis by a call to solis vsm zeemanfit FITRANGE() using thatpixel’s Stokes-I profile. In an older version of the code (PROVER2A = 1.1), the fit-range washardcoded as [15:105] (out of a total [0:127] spectral data pixels). That range was chosen toconform to currently tested 6302v data, but was later found to be inappropriate for 6302l data.Now, as can be seen in Figure 11, the range of data pixels passed to MPFITFUN() does varyconsiderably across different regions. However, this variation was found to be beneficial for the6302l processing to allow for the best overall stability of the fits. An example of the fit produced by the default settings of the Zeeman-fit to the Stokes-I profile(SOLIS VSM ZEEMANFIT IFIT 6302V() ) is shown in Figure 12. The fit includes:* a polynomial-fit for the background of order 2* 2 Lorentzian profiles defining the telluric O lines* 1 Gaussian profile defining the π -component of the 6302.5˚A Zeeman-triplet* 5 Voigt profiles used to define both the two σ -components of the 6302.5˚A Zeeman-triplet andthe three lines allotted to fitting the 6301.5˚A Zeeman-broadened line-set.Beyond this profile definition, the fit conforms to the following constraints:* The separation parameters between the π and σ -component line-center positions (the ∆ x σ parameters) (for the 6302.5˚A line) are restricted to positive values only, defined such thatthis constraint maintains the wavelength ordering: x ,σ V < x ,π < x ,σ R .* The amplitudes of the 6302.5˚A σ -components are fit as some fraction, c A,R/V , each of the π -component amplitude, and each c A -fit-value is constrained to the limits 0 . ≤ c A ≤ . x : orange dashes) for all of the 6302˚A Fe-triplet lines except for the 1 gaussian ( x : pinkdashes) fit to the 6302.5˚A- π -component, and 2 Lorentzians ( x : blue dashes) for the telluric O lines. The black dash-dot lines plot the fit components. The green dashes denote the range-boundsof the fit data; note that this example fit was run while the code was in development, when thedata range was hardcoded to [15:110].so that neither σ -component amplitude will be fit larger than the π -component amplitude.This amplitude restriction is used when reasonable, and is lifted in any cases where the initialguess for the π -amplitude is less than either or both of the guessed σ -amplitudes.* All fit line-amplitudes are required to be less than zero (absorption lines).The initial input for the continuum-polynomial coefficients comes from a straight-line fit to thehighest points in each half of the input data-profile. The initial guesses for the line amplitudes aremeasured from this straight line down to the data-value at the guessed line-center positions.The initial-guesses for the line-center positions of the two telluric O lines and the two Fe π -component lines are determined first by a call to solis vsm ZEEMANFIT FLOODMIN(), whichlocates profile data ranges for four data-minimum ’pools’ and returns the minimum-value pixellocation and range-center location for each pool. The data-minimum positions are used for thetwo O lines, and the pool-center position is used for the 6301.5 π -component line. For the 6302.5 π -component position, the code first redefines the ’data-pool’ boundary to be at a level that ishalfway between the local data-minimum value and the lowest of the two local-data-peak valuesbetween the Fe-triplet set and the telluric O lines on either side. This level tends to be wellcentered around the lines composing this Fe-triplet set, and it is the center of this pool that is usedto guess the position of the 6302.5 π -component line.In earlier versions of the code, the data-minimum positions were used to guess the positions forall four of the above lines. However, this was changed when the code was modified to accommodate19igure 13: Two Stokes-I spectra taken from the same umbral region of a near-limb sunspot, onefrom a SOLIS 6302l observation and the other from a 6302v observation taken roughly three hourslater. Between the two instruments, spectral features appear offset relative to each other on thecamera. The arrows indicate the approximate locations of the three Zeeman-components of the6302.5 triplet set for each of the spectra. Note that for this particular example, the π -componentfor the 6302l profile appears to be suppressed relative to that seen in the 6302v profile. The sunspotregion sampled is the area most clearly effected by issues relating to the Evershed effect (see § π -components of insufficient strength the make the early method always viable.Next, determining appropriate guesses for the four σ -component line-center positions is muchtrickier, and our selection of the most appropriate method is the subject of § § σ ) for the triplet lines are set at a fraction of theline-center separations. For all lines that use it, the guesses for the Lorentzian-width-values ( γ ) areset to 1.0 pixel. Basic results of using this model can be seen in Figure 14. Now, in terms of why the profile definitions specified above were chosen: * The background polynomial of order 2 was chosen as being likely sufficient to account forthe background continuum and unlikely to introduce ugly artifacts into the line fits. However,the time has not been taken to determine whether a lower-order background might be equallysufficient or even superior.*
Lorentzians were chosen to fit the the telluric O lines for simplicity, reduction of param-eter space, and because they appear to do a perfectly lovely job of it.* All of the lines used to fit the Stokes-I Zeemanfit profiles are required to be in absorption be-cause all of the features expected to appear in these spectra are absorption features. However,particularly at low continuum intensities, the blue half of the spectra are sometimes fairly20igure 14: Maps generated using the fit to the Stokes-I profile of the magnetic-field-strength (a),the RMS of the fit-line to the spectral-data profile (b), and the 1-sigma error calculated due to theuncertainty in the fit line separations (c). (Note that these calculations were run during testingwith a polynomial background of order 3.) 21igure 15: A map of computed magnetic-field strength using a fit to the Stokes-I profile that does not include restricting the 6302.5˚A σ -component amplitudes to be lower than the π -componentamplitude. Note the large B -values computed for many of the spatially outlying pixels.bumpy, leading to occasional in-emission fits when positive line amplitudes were previouslyallowed (PROVER2B = 1.1).* An early-development version of the code required that the positions of the two 6302.5 σ -components be mirrored about the π -component (that ∆ x σ V = ∆ x σ R ). Requiring this mir-roring allowed for a small reduction in parameter space that is physically reasonable giventhe Zeeman-splitting mechanism and was found to produce less noisy results. However, asis discussed in detail in § requiringthe π -component amplitude to be larger than either of the σ -component amplitudesis a slippery one. If the observations contained no scattered light, the amplitude of the π -component would depend on the amount of both unpolarized and linearly polarized light, andcould be small. However, testing suggested that including this constraint helps to produceless noisy B -strength maps, and apparently more robust fit computations. Furthermore, asignificant amount of scattered light is expected to be present in the data (particularly in thedark umbral centers where the field alignment is most liable to present longitudinal). Pleasecompare the results from Figure 14 with those in Figure 15, which presents a B -strength mapgenerated using early fits (using /Vguess, see § B -calculations isthat the 6302.5˚A π -component line be fit as a Gaussian only , not as a Voigt. Figure 16presents the results of running the Stokes-I fit using all Voigts for the solar triplet lines.While the rms of the fit itself can appear relatively low and lovely with this method (panelb), the uncertainty on the σ -component line positions is actually very high, resulting in alarge uncertainty in the B -calculation (panel c). Most notably, though, the structure of themagnetic-field strength across the dark umbral regions is implausible, with reported umbral22igure 16: Maps generated using 6 Voigts to fit the the Fe-triplet lines in the Stokes-I profile(rather an using 5 Voigts plus 1 Gaussian for the 6302.5˚A π -component): the calculated magnetic-field strength (a), the RMS of the fit-line to the spectral-data profile (b), and the 1-sigma errorcalculated due to the uncertainty in the fit line separations (c).23igure 17: Map of the continuum intensity across the active region modeled in the preceding figures.Figure 18: Data profile (blue) and fit (red) of a high-field-strength Stokes-V spectrum fit with 4gaussians ( x : pink dashes) for the 6302˚A polarized σ -component lines. The black dash-dot linesplot the fit components. The green dashes denote the range-bounds of the fit data.field strengths often dipping across sun-spot centers, rather than peaking (panel a). Comparethat result to that of Figure 14, where the π -component-as-a-Gaussian constraint has beeninstituted. The results toward the penumbral regions are noisier than might be preferred(but this method of fitting to Stokes-I is chosen for being most robust in the strong-fieldcases), but the field-strength–profile morphologies agree with the morphology suggested bythe continuum image (Figure 17), and the uncertainty in the fit line-centers (and thereforethe B -calculation) has dropped into reasonable bounds. An example of the fit produced by the default settings of the Zeeman-fit to the Stokes-V profile(SOLIS VSM ZEEMANFIT VFIT 6302V() ) is shown in Figure 18. The fit includes:* a constant background (polynomial order 0)24igure 19: Mapped comparison of calculated B (column a) and B error (column b) using fits tothe Stokes-V profiles. Row 1 depicts mapped results using fits with Voigt profiles, Row 2 depictsmapped results using (pipeline-adopted) Gaussian profiles, and Row 3 presents the Strength andError profiles for one pixel row across a sunspot, comparing the results from the Stokes-I-fit (blue),the Stokes-V-Voigt-fit (red) and the Stokes-V-Gauss-fit (orange).* 4 Gaussian profilesBeyond this profile definition, the fit is entirely unconstrained, and the results of this model can beseen in Figure 19.The initial guesses for the positions and amplitudes of the four fit lines are taken from themin/max positions and values in each half of the data profile, and the guess for the backgroundconstant is entered as 0. As with the Stokes-I Zeeman-fit, the guesses for the Gaussian widths ( σ )are set to a fraction of the separations between each of the min/max peak pairs.Though Gaussians do not fit the Stokes-V line profiles as well as Voigts do, the choice was madeto fit using only Gaussians for the sake of both speed and robustness. Running the code usingVoigts tended, for several hundred pixels across the map, to max out the number of iterations runby MPFITFUN() (using either the default MAXITER=200, or MAXITER=400). Switching toGaussians not only reduces the number of fit parameters, it also drastically cuts down the numberof pixels that run maximum iterations (to only a handful across the whole map, default MAXITER).25igure 20: Data profile (blue) and fit (red) of a low-field-strength Stokes-I spectrum fit with 2 voigts( x : orange dashes) for the 6302˚A Fe lines and 2 lorentzians ( x : blue dashes) for the telluric O lines. The black dash-dot lines plot the fit components. The green dashes denote the range-boundsof the fit data.Also, running the fit with Voigts produces noticeably larger uncertainty in the line-center po-sitions around some of the penumbral edges, where the Stokes-V counts are not as strong. SeeFigure 19 for a comparison of map results produced by Stokes-V fits using Voigts versus Gaus-sians. One note: running the Stokes-V fit with Gaussians does tend to produce roughly 4% largerStokes-V B -values than does running the fit with Voigts, whatever that ultimately means. An example of the fit produced by the default settings of the Non-zeeman-fit to the Stokes-I profile(SOLIS VSM ZEEMANFIT OUTFIT 6302V() ) is shown in Figure 20. The fit includes:* a polynomial-fit for the background of order 2* 2 Lorentzian profiles defining the telluric O lines* 2 Voigt profiles defining the solar Fe lines (6301.5˚A & 6302.5˚A)Beyond this profile definition, the fit is entirely unconstrained.As during the Zeeman Stokes-I fit ( § polynomial order 2 was chosen as being likely sufficientto account for the background continuum and unlikely to introduce ugly artifacts into the linefits. However, the time has not been taken to determine whether a lower-order backgroundmight be equally sufficient or even superior.* Lorentzians were chosen to fit the the telluric O lines for simplicity, reduction of param-eter space, and because they appear to generally do a perfectly lovely job of it.* Voigts were chosen to fit the solar Fe lines because they could be. For the vast majority ofcases, Gaussians would probably do a perfectly acceptable job, considering that the positionsof the telluric lines are the only results of interest when running this fit. However, it is possiblethat the results would be less robust if this fit code, using Gaussians for the solar lines, wererun on an image pixel that ought to be Zeeman-triplet-fit but wasn’t due to any issues withthe pixel-selection criteria (see § § The separation of the triplet-model σ -component lines is the parameter of greatest importance tothe Zeemanfit results (see § σ -component line-center positions should be resolved to match fairly closely with thefour min/max profile peaks in each half of the Stokes-V profile.However, in the Stokes-I profile, the σ -component line-centers do not have profile minimums withwhich to directly correspond, and, so far, four separate techniques have been tested for providinga guess as to the Stokes-I σ -component positions to solis vsm ZEEMANFIT MULTVOIGTFIT()and MPFITFUN(). These techniques and our concluding choices are discussed below, along withthe pros and cons of requiring the fit 6302.5 σ -component positions to be mirrored about the π -component. Ultimately, we have chosen a default operation that uses the relative continuumintensity to make a guess of the magnetic-field strength and therefore of the σ -component lineseparation, and to not require that the fit σ -component positions be mirrored about the fit π -component position.Because it is both readily available and affected directly by properties of the local magneticfield, the first technique tried for guessing the Stokes-I σ -component positions was to use the sameinput positions as for the Stokes-V fit, the four min/max peaks of each half of the V-profile, asdepicted in Figure 21. Non-standard operation of the code using /Vguess does still allow for this useof the Stokes-V profiles in guessing the Stokes-I triplet-lines center positions, and is the necessarymode of operation if the code is computing fits for Level-0.5 spectra that do not have correspondingLevel-2-corrected continuum-intensity values readily available with which to guess the separation.However, there are two primary drawbacks to using this /Vguess method.27igure 21: Stokes-I and -V profiles denoting the use of the Stokes-V min/max locations (greydashes) for guessing the positions of the Stokes-I–Fe-triplet– σ -component line centers if the keyword/Vguess is flagged or PFILE has not been specified.1. Even in regions of strong total magnetic field, the Stokes-V signal is not always strong enoughfor this guess method to be employed. Particularly near the solar limb, strongly transversefields may mean a weak or non-existent polarized signal, disallowing results to be computedfor many pixels across, particularly, the dark umbral regions of a sunspot.2. Even where the polarized signal is perfectly clear and strong, it does not directly correlateto the total magnetic-field strength being sought in a fit to the Stokes-I profile. The Stokes-V peak separation depends on one component of the magnetic-field, and using it to guessthe Stokes-I σ -component separation leads to random inconsistencies in how the Stokes-I-fitcalculations proceed. As outlined below, the Stokes-I results are sensitive to the initiallyguessed separation.However, using the /Vguess method does appear to be reasonably robust. It will be biased towardreporting underestimates of the total magnetic-field strength.Next, a simplistic method is to merely make a fixed-width guess for the σ -component lineseparation applied to every Stokes-I profile where necessary. This was initially done to try to fillin missing regions of Stokes-I results left blank by the Stokes-V-guess method, and an example ofthis can be seen in Figure 22. A σ - π -guessed separation of 4.0 pixels corresponds to a guessed totalseparation of 8.0 pixels, or a 6302.5˚A-triplet-computed field-strength of ∼ σ -component line positions, guessing this 4-pixelseparation for every computation (and not using any other guess method for some pixels) would be aviable method. It meets the consistency requirement easily, and at this separation the code runningon the VSM-6302-vector data is reasonably robust (though note that this has only been tested while6302.5 σ -component mirroring was required.) It has problems with the outer penumbral regions,but these regions are of significantly less interest than the umbral centers.However, as is clearly depicted in Figure 23, the results of the Zeemanfit-computations are quitesensitive to the initially guessed separation (to the initial guess of the magnetic-field strength). If28igure 22: Calculated magnetic-field-strength values returned from fits to the Stokes-I (centerpanel) and Stokes-V (right panel) spectra for a near-limb sunspot. Stokes-V results show a gapwhere Stokes-V counts fall below the Stokes-V selection criteria. This gap coincides with theposition of the magnetic neutral line in the sunspot, where the field is perpendicular to the line-of-sight. The Stokes-I results are filled in across the gap using a guessed σ - π separation of 3.5 pixels,producing a clear discontinuity in umbral results.Figure 23: The calculated magnetic-field strengths (left panels) and errors (right panels) forZeemanfit-Stokes-I calculations run using a fixed π - σ -separation guess (increasing from the toppanels to the bottom) for each pixel calculation in a given run.29he initial guess is high, the outputted result tends to be high, and if the initial guess is substan-tially higher than physical reality, the computation becomes unstable. We could keep our guesseverywhere very modest, but then results computed for umbral centers are often well below theirphysical values. We need a guess method that is not constant, but is directly and consistently tiedto the observations.Therefore, two other guess methods were tested. One used an algorithm called solis vsm ZEE-MANFIT FWHM() to input the profile-minimum location returned from solis vsm ZEEMANFIT -FLOODMIN() corresponding to the guessed π -component position and return a point to either sidecorresponding to the half-maximum (minimum really since these are absorption features) positionsof that region of the spectral profile. The other method takes in the background-relative contin-uum intensity value for that image pixel and uses that value to estimate the local magnetic-fieldstrength and therefore the σ - π line-center separation for the Stokes-I profile, following the equationsuggested by Jack Harvey: B estimate = 1500 + 1500 (1 − ( I/I LD )) , (5)where I LD is the limb-darkened, background intensity computed in equation 1. (See § σ -position guesses in the case that the σ -component-absorption is on the same order or strongerthan the π -component absorption, and it is subject to provide over-estimates in the cases when theline-set is strongly influenced by broadening mechanisms outside the Zeeman effect.One such case appears to be the effect of spatial averaging of fine structure from the Evershedeffect, noticed primarily in the computed results for strong sunspots near the solar limb (thoughexactly which sunspots and how close to the limb appears to be fairly variable, and possiblydependent on data quality). False-high-field artifacts probably related to this effect (they alwaysappear on the sun-center-ward side of a sunspot) seem to be linked primarily to an asymmetry thatappears in the observed positioning of the σ -component line-centers relative to the π -componentcenter. Therefore, the effect is exacerbated by requiring that the profile-fit mirror the positions ofthe σ -components about the π -component line center. (Remember, the σ -component amplitudes remain unconstrained relative to each other, and therefore the fit might return results where onecomponent amplitude is quite small compared to the other.)Computed Stokes-I magnetic-field-strength values and 1-sigma errors are presented in Figure 24for four fit-computation scenarios, i.e., varying both the guess-method used to estimate the σ -component line-center positions and whether or not the fit requires the 6302.5 σ -positions to bemirrored about the π -center position. From these plots (mirroring: left versus no-mirroring: right),the advantages and disadvantages of mirroring become clear. Requiring mirrored positions removesone (of many) parameters from the list of those that need to be fit, and the results tend to be morestable. Further, for observations primarily affected by the the Zeeman effect, such a condition isreasonably physical. However , the artifact related to the Evershed effect is clearly present underthe mirroring condition in those sunspots so influenced, and furthermore, the error reported inthe regions of this artifact is quite low, leading one to suspect that under these conditions themirroring requirement over-constrains the fit, leading to a narrow best-fit space that is never-the-less unrealistic.However, the higher degree of instability that results when the mirroring condition is turnedoff is a non-negligible problem, as can be seen by the number of missing pixel results in the30igure 24:
Top set:
The computed magnetic-field strengths for four different configurations of theStokes-I–fit modeling upon an Evershed-artifact affected sunspot. Top panels model the fit usingthe half-maximum profile-positions to guess the σ -component line-center positions. Bottom panelsguess the separation based on the Level-2 corrected image-pixel continuum intensity (shown inthe center panel). Left panels require 6302.5 σ -positions be mirrored about the π -center position.Right panels were run with this mirroring requirement turned off. Bottom set:
The correspondingcomputed 1-sigma errors. 31igure 25: Scatter plot of the Zeemanfit-computed Stokes-I results for one sunspot versus the inputfield-strength guesses based on the continuum intensity. The grey line represents the location of1:1 correspondence.pipeline-selected default fit in the lower-righthand panels. This fit is more stable than the half-maximum-guessing counterpart (top-right), but these pixels have still been clipped out of the resultsdue to very high 1-sigma error ( > > The wavelength-per-pixel dispersion, used in the calculation of the magnetic-field-strength, cancome from either of two sources, detailed below. It can be specified by the code according to thecamera the data was taken on ( § lines ( § lines are quite stable acrossvariations in the fit setup. Currently for the 6302v and 6302l data, the code uses the dispersion values supplied by LorraineCallahan:* 0.02409 ˚A/pixel for SARNOFF data* 0.0271 ˚A/pixel for ROCKWELL data.For an error value on the SARNOFF data, the code supplies an error estimate of 1.3% thatwe made by inspection of the Stokes-I-calculated dispersion (see § When running the code, one may choose to set the Keyword flag /DISPERCALC. If so, the magneticfield-strength is calculated using the dispersion value calculated from the Zeeman-fit to the Stokes-Iprofile (solis vsm zeemanfit IFIT 6302V() ), plus all of the non-Zeeman-selected pixels also havea (simplified) fit run on their Stokes-I profiles (solis vsm zeemanfit OUTFIT 6302V() ) so that thedispersion values and errors may be returned for every solar-disk–image pixel. One importantnote , then, is that the calculated dispersion values presented across a given scan line or image are33igure 27: The bottom row maps a sample of the dispersion calculated using the Zeemanfit andOUTFIT 6302V() code. The left panel shows the value of the dispersion, which varies smoothlyacross the frame (between 0.02412 and 0.02418 ˚A/pixel). The right panel shows the %-error on thedispersion calculation, which shows a patch of lower-error (white and dark-red pixels) in the shapeof the B-calculated pixels (above panels) The dispersion for those pixels is calculated following theStokes-I fit by IFIT 6302V().Figure 28: The dispersion (dark blue) calculated by the code across a single scan line, plus thecorresponding relative error (light blue). 34oming (randomly, as far as the distribution of active regions is random) from calculations usingtwo different Stokes-I fitting schemes (see Figure 27).The dispersion is assumed to be constant across the spectral frame. It is calculated using thepositions of the two in-frame telluric O lines as: d = λ O b − λ O a x ,O b − x ,O a , (6)where d is the dispersion in ˚A/pixel, x ,O b and x ,O a are the line-center positions for the telluriclines returned from the fit to the Stokes-I profile, and for this data range λ O b = 6302 . A and λ O a = 6302 . A according to the Pierce-Breckenridge Atlas (ftp://nsokp.nso.edu/pub/atlas/linelist/).The 1-sigma relative error on the above-calculated dispersion is calculated as: σ d d = (cid:113) σ xO b + σ xO a | x ,O b − x ,O a | , (7)where σ d , σ xO b , and σ xO a are the 1-sigma uncertainties on the dispersion, and the O b and O a line-center positions, respectively. See § σ x -valuesfrom MPFITFUN(), though this is not as convoluted for the telluric O line positions as it is forthe Zeeman-fit Stokes-I 6302.5˚A-triplet positions.An example of the dispersion calculated across a scan line is presented in Figure 28. Oneimportant note is that the O lines are not well resolved by this data. Therefore, the dispersionvalue calculated according to their fit separations is likely noisier than any real dispersion variation. Once the line profiles have been fit, and the pixel dispersion either chosen or calculated, themagnetic-field-strength can be calculated (for regular-Zeeman-split lines) from the formula: B = | λ ,π − λ ,σ | . × − g λ ,π , (8)where, B is the magnetic-field strength (in Gauss), g is the Lande factor appropriate to the par-ticular Zeeman-triplet, λ ,π is the center wavelength of the principal line (in cm), and λ ,σ is thecenter wavelength of one of the Zeeman-triplet σ -component lines (in cm).Because we assume a constant dispersion value across the full (128-pixel) spectral image, andbecause we may or may not be using a fit-symmetry about the λ ,π component, the implementationin the code becomes: B = 10 − . × − g λ ,π ∗ d ∗
12 ( x ,σ R − x ,σ V ) , (9)where d is the dispersion in ˚A/pixel, λ ,π is the nominal wavelength in cm of the line of interest, x ,σ R and x ,σ V are the respective fitted pixel positions of the right and left σ -components, and g is the Lande factor (2.5 in the case of the 6302.5˚A Fe line).If the above equation is applied to the σ -component-line positions derived from the fit to theStokes-I profile, then the computed B -value should represent the total magnetic-field strength.However, if the equation is applied to the line-peak positions derived from the fit to the Stokes-Vprofile, then B should be a calculation of the longitudinal magnetic-field-strength only.Note that the code does include a magnetic-field-strength calculation for the 6301.5˚A line( g = 1 . § π -component can wind up situatedoutside rather than between the two σ -components.For these reasons, the fit to the Fe 6301.5˚A is considered unphysical.Figure 29 presents an example of calculated Stokes-I and -V B -values and errors for one pixelrow across an active region. Note that uncertainty in the Stokes-I result increases toward the edgesof the sunspots, in keeping with this Zeeman-fit method, which is aimed at fitting results in thehigh-magnetic-field-strength regions where the splitting is nice and broad.The 1-sigma error calculated for the reported B -values takes into account the uncertainty onboth the dispersion and the fit line-center positions. In general, it is given by: σ B = ( B σ d ) + (cid:0) c B d σ ∆ x ,R (cid:1) + (cid:0) c B d σ ∆ x ,V (cid:1) , (10)where σ B , σ d , σ ∆ x ,R , and σ ∆ x ,V are the 1-sigma error estimates on the magnetic-field strength,dispersion, and right- and left- σ -component separations from x ,π , respectively; in units of Gauss,˚A/pixel, and pixels, respectively. c B is the coefficient of constants given in equation 9: × − / (cid:0) . × − g λ ,π (cid:1) .The above equation is used to calculate error for the Stokes-V-calculated magnetic-field strengths,as well as for the Stokes-I strengths in the default processing where the x -mirroring has been turnedoff so that all of the line-center positions are allowed to freely vary. However, optional operationof the code (using the SMIRROR keyword) does allow the Stokes-I 6302.5 positions to be mirrored36the separations from x ,π and the two x ,σ ’s are forced to be equivalent). Therefore, the equationof the error in that instance becomes: σ B = ( B σ d ) + 4 (cid:0) c B d σ ∆ x ,σ (cid:1) , (11)Because the data-profile values passed into MPFITFUN() do not have particular error valuesassociated with each data-point, MPFITFUN() does not return a reliable 1-sigma estimate of theerror on the fit parameters. However, according to the documentation in MPFITFUN(), ”If youcan assume that the true reduced chi-squared value is unity [...] then the estimated parameteruncertainties can be computed by scaling PERROR by the measured chi-squared value”: PCERROR = PERROR * SQRT(BESTNORM / DOF)
Therefore, the code retrieves the PERROR-vector and the BESTNORM and DOF values fromMPFITFUN() and uses the above equation to compute the σ x, values returned from running thevarious line fits.Note also that, while ZEEMANFIT MULTGAUSSFIT() does return a parameter array con-taining the x ,σ R and x ,σ V parameters, for the Zeeman-fit to the Stokes-I profiles, MPFITFUN()itself varies ∆x σ R = x ,σ R − x ,π , and ∆x σ V = x ,π − x ,σ V in the specific cases of the two 6302.5˚A σ -component line-centers. Therefore, the 1-sigma values passed back for those two parameterscorrespond to these later quantities in the Stokes-I calculations. Comparison of field strengths derived by this code with observations from Bill Livingston (1.5 mi-cron near-infrared), Hinode (high spatial resolution in Fe I 6302.5A), and HMI/SDO (Fe I 6173.3 ˚A)indicate a good agreement with this method. A detailed description of this comparison will be pub-lished in a separate paper. * ROCKWELL processing:
The Zeemanfit code has not been tested on any Rockwell-eradata. There are at least a couple of issues to consider/fix if at some point the code will beapplied to Rockwell data or to any future data acquired on a different camera.*
Spectral-data pixel values:
The FITRANGE() algorithm uses a number of hard-coded values to account for things like the size of the input-spectrum data vector and veryroughly where certain features are expected to lie on that data profile. For processingusing a different camera, those pixel values may need to be tailored to the camera or someother method selected for specifying those ranges. Also, in solis vsm zeemanfit IFIT -6302V.pro, pixel-index 70 is used as a midway mark for a backup call to FLOODMIN();again, this may need to be modified or per-camera tailored.*
Dispersion:
The camera-set dispersion fixed into the code for data taken with theROCKWELL camera is 0.0271˚A/pixel, the value currently being used in the repro-cessing code. However, Lorraine Callahan has noted that the value in the database is0.0273˚A/pixel. Therefore, fairly arbitrarily, the relative-error on this dispersion valuethat we have coded in is this 0.74% difference. However, we have not had a chance to37igure 30: Both of these Stokes-I fits belong to pixels whose reported B-value is a clear outlier(too high) from where it should be (the one in the second panel being a less-extreme outlier thanthe one in the first) Note, however, that for PROVER2B=1.2 and later that all lines fits are now forbidden to be in emission.run this code in dispersion-calculation mode (or any other) on any ROCKWELL data (ifthere are any ROCKWELL spectra around to try it on), so these choices remain prettyrandom at the moment and should be verified before any Zeemanfit ’reprocessing’ ofROCKWELL data is implemented.*
Last bits and bobs: