A robust estimation of the twist distribution in magnetic clouds

Context. Magnetic clouds (MCs) are observed in situ by spacecraft. The rotation of their magnetic ﬁeld is typically interpreted as the crossing of a twisted magnetic ﬂux tube, or ﬂux rope, which was launched from the solar corona. Aims. The detailed magnetic measurements across MCs permit us to infer the ﬂux rope characteristics. Still, the precise spatial distribution of the magnetic twist is challenging


Introduction
Large-scale magnetic structures released from the solar corona have been observed over several decades with remote observations.These structures, known as coronal mass ejections (CMEs) are the main drivers for space weather effects at or near Earth.The in situ observations of CMEs in the interplanetary medium are known as interplanetary coronal mass ejections (ICMEs).About one-third of ICMEs have the signatures defining a magnetic cloud (MC): enhanced magnetic field strength with respect to ambient values, a monotonic and high rotation of the magnetic field vector, and a low proton temperature (Burlaga et al. 1981).The observed coherent rotation in MCs is interpreted as the passage through the spacecraft of a large-scale twisted magnetic flux tube or flux rope (FR).
The twist profile inside the FR is still under discussion, with different authors reaching different conclusions.Some authors (e.g.Burlaga et al. 1998;Dasso et al. 2006;Lepping et al. 2011;Lanabere et al. 2020, and references therein) found that the magnetic twist profile is comparable to the one of the Lundquist model (Lundquist 1950).In this model the twist is nearly constant around the FR centre, increasing from the core outwards, and reaching significant large values towards the FR boundary, and theoretically it can diverge depending on where the end of Send offprint requests to: V. Lanabere the FR is defined.Another used model to describe the interplanetary FRs is the Gold-Hoyle model, where the twist distributes uniformly along the radius of the FR (e.g.Farrugia et al. 1999;Dasso et al. 2003).Magnetic data are also least square fitted by various FR models.Since the assumed model defines the distribution of the twist, different authors using different models have found different twist distributions (e.g.Mulligan et al. 1999;Hidalgo et al. 2000;Cid et al. 2002;Nieves-Chinchilla et al. 2018).
In a recent study, and without the assumption of a magnetic model for the FR, Lanabere et al. (2020) found that the twist in a typical MC is distributed nearly uniformly in the FR core, and it increases towards the FR boundaries; in other words, they found the same expected behaviour for the twist as expected from the Lundquist model.Meanwhile, other authors support the idea that FRs have a highly twisted core enveloped by a less twisted outer shell (e.g.Wang et al. 2018).A more detailed discussion about recent twist studies can be found in Lanabere et al. (2020) and Florido-Llinas et al. (2020, and references therein).
Remote observations of CMEs show that their radial extension increases as they propagate away from the low corona.This expansion continues in the interplanetary space as deduced by in situ observations of the proton velocity (e.g.Démoulin et al. 2008;Gulisano et al. 2010;Regnault et al. 2020).This expansion creates an ageing effect with an FR growing in size, so with a weaker magnetic field, as the spacecraft crosses it.This in-troduces a bias in the data by mixing space and time evolution.Démoulin et al. (2020) concluded that the expansion effect in the in situ measurements is not the main origin of the observed asymmetry in the magnetic field profile of MCs.Thus, the effect of expansion on the deduced twist profile is expected to be weak.
Another important process that MCs experience during their travel though the interplanetary medium is erosion, due to magnetic reconnection with the ambient solar wind (e.g.Dasso et al. 2006Dasso et al. , 2007;;Ruffenach et al. 2015).This erosion modifies the balance of magnetic flux present in the inbound region compared to the outbound region, as well as the estimated values of magnetic flux and helicity derived from in situ measurements (the inbound (outbound) region corresponds to the time series when the spacecraft is coming nearer to (moving away from) the FR centre).Moreover, the percentage of eroded magnetic flux is very case dependent and so this needs to be taken into account in MC studies.In particular, from the analysis of two studiedcases, Pal et al. (2021) concluded that the erosion has significant effects on the obtained magnetic flux rope twist, as it is expected mainly due to the lack of its external part, which typically is highly twisted.
In a previous work, Lanabere et al. (2020) found the typical twist distribution inside MCs, using a superposed epoch analysis (SEA).The SEA is a classical technique used to enhance the common properties of a set of events while minimising the specificity of individual cases.An MC has a front and a rear boundary separated by a case-dependent time interval.Thus, in order to superpose the data of many MCs, their boundaries are first set to the same normalised time values within the selected events.Next, an SEA of a scalar quantity is carried out by taking the mean or the median of the cases.This defined an SEA time profile outlining the dominant characteristics of the MC selection (e.g.Masías-Meza et al. 2016).This can be generalised to ICMEs and to derive the probability distribution of the studied parameter versus time (Janvier et al. 2019;Regnault et al. 2020).
When a vector field is considered, such as the magnetic field, before performing the SEA, the data should be rotated to a common frame where the vector components have the same physical meaning for all the studied cases.Since MCs have an FR structure, the FR frame is the relevant frame, with the condition that all FRs need to be set to the same helicity sign so that the magnetic signals add up.Setting the same impact parameter sign is also needed.Then, an SEA of the axial and azimuthal components can be performed, from which a twist profile is derived (Lanabere et al. 2020).These authors applied this technique to a subset of MCs characterised by low asymmetry in the B profile to minimise its effect.This resulted in a typical twist profile that was nearly uniform in the FR core, and which moderately increased towards the MC boundaries.
However, by using the MC boundaries for the SEA, Lanabere et al. (2020) did not consider the in-and outbound asymmetries typically present in MCs (e.g.those produced by the erosion).Thus, such an SEA mixes MCs that have a different imbalance of magnetic flux in the in-and outbound sides.Said differently, the normalised time corresponding to the closest approach distance of the spacecraft to the FR axis would be at a different location for each of the superposed MCs.This could especially affect the deduced azimuthal component profile, which is reversing at the FR axis, and then this could impact the deduced twist profile.Démoulin et al. (2019) presented a new analysis of the results obtained by Lepping et al. (1990), with consequences on the interpretation of the FR boundaries.A reference time is defined for the minimum approach distance of the spacecraft to the fitted FR axis, which in general is different to the central MC time.
In general, this implies a different size of the FR in the in-and outbound regions.Then, the same size can be selected on both sides in order to get an FR.This allows us to superpose MC data limited to an FR extension with the closest approach time of FR axis for all cases located at the same time.Finally, this enhances the physical coherence of the superposed field components of the MC data.
The above improvements of the SEA of MC data is done in steps, as follows.In Sect. 2 we describe the data and the studied quantities.We define a method to assign a sign to the asymmetry factor reported in Lepping's catalogue so that the fitted FR is fully defined.In particular, this defined the central reference time corresponding to the FR axis for each studied MC.In Sect. 3 we implement the procedure developed by Démoulin et al. (2019) to define the radius of the FR remaining when crossed by the spacecraft and the radius of the non-eroded FR.Then, we present the SEA applied to different MCs subsets in order to analyse, then to minimise, the identified biases present within the magnetic field components.Next, in Sect. 4 we present the SEA twist profiles of the eroded and non-eroded FRs.Finally, in Sect. 5 we present a summary and our conclusions.

Data
In this work we used the Lepping et al. (2006) catalogue1 , which consists of a full description of more than 160 MCs observed by the Wind spacecraft between 1995 and 2012.This catalogue includes physical quantities that were estimated with the Lundquist's FR model fitted to the MC data (Lepping et al. 1990).In particular, we used the start and end time of the passage of Wind through the MCs, the FR orientation θ L φ L , the closest approach distance CA of Wind to the FR axis, the asymmetry factor asf, the FR radius R 0 (in au), and the magnetic helicity sign H.In this catalogue, each MC is classified into three different categories according to the fitting quality (Q 0 ), where Q 0 = 1 means that a good fitting was obtained, Q 0 = 2 stands for fair quality, and Q 0 = 3 for poor quality, as defined in Appendix A of Lepping et al. (2006).We kept a set of 91 MCs of quality Q 1,2 .
Wind spacecraft data were used in this study.In particular, we used data from the Magnetic Field Instrument (MFI)2 and the Solar Wind Experiment (SWE)3 , with a temporal cadence of 60 s for the MFI and 92 s for the SWE.From these data we used the magnetic field magnitude and components in the GSE coordinate system, and a proton wind speed component along the Sun-Earth direction.
The study of geometric and physical properties of MCs, such as asymmetry, magnetic flux, and twist, is best defined in the local frame (ê x , êy , êz ), known as the orthonormal FR frame.The Z axis is defined by the FR axis direction, oriented by the magnetic field direction in the central FR part.X and Y axes are orthogonal to the Z axis with the spacecraft trajectory contained in the X, Z plane.In the FR frame, the magnetic field components are noted as (B x , B y , B z ) and (b x , b y , b z ) when normalised by the magnetic field strength.The observed magnetic field components are rotated from GSE to the FR frame using Lepping's FR axis orientation (θ L , φ L ).A study of the differences between The magnetic field magnitude, (b,c,d) the magnetic field components, normalised to the field magnitude, in the FR frame.Two Lundquist solutions fitted to the observed magnetic field components, with their origin set at t 0,minus (blue) and t 0,plus (red) is added in (b,c,d).(e) The observed velocity profile.The correct sign of the asf is determined by the best fit represented by the lower χ R value (Eq.8).Here it is for sgn(asf) = 1 (red curves).
Lepping's orientations and minimum variance (MV) orientations can be found in Lanabere et al. (2020).In that work, we showed that there are small differences between MV and Lepping orientations for the set Q 1,2 (Pearson and Spearman correlation coefficients about 0.93 and 0.78 for θ and φ, respectively), leading to comparable SEA profiles.
We quantify the asymmetry of the B(t) profile as in Lanabere et al. (2020) with the barycentre of the magnetic field intensity: where the observed MC is set in the time interval [0, ∆t].The factor (t/∆t − 1/2) defines the time fraction to the MC central time.C B = 0 for any symmetric B(t) profile around the central time, while C B < 0 (C B > 0) when the magnetic field is stronger on the inbound (outbound) side.Finally, the magnitude of |C B | measures the importance of the asymmetry.

Definition of the asf sign
The fit of the Lundquist's model to the magnetic data provides the time when the spacecraft was the closest from the axis of the best-fitted FR.The asymmetry factor (asf) reported in Lepping's catalogue provides information about how far the centre of the observed MC time interval is with respect to the closest approach time.However, only the absolute value of the asf is provided.In this section we define a procedure to retrieve the sign of the asf.
Figure 1 shows the procedure applied to an example, the MC observed on 22 August 1995.
The absolute value of the asymmetry factor (|asf|) provided in Lepping's catalogue (Lepping et al. 2006) allows us to compute the time of the closest approach as (2) We added the absolute value to the asf to reinforce that Lepping provides only positive values.Then, Eq. ( 2) results in t 0 = ∆t/2 when the closest approach of the FR axis is at the centre of the time interval (asf = 0%), and t 0 ∆t/2 otherwise.We note the two possible values for t 0 in Eq. ( 2) with the minus and plus signs as t 0,minus and t 0,plus , respectively.These two options are shown in Fig. 1 as blue and red vertical lines for t 0,minus and t 0,plus , respectively.
The linear force-free field model with cylindrical symmetry (Lundquist 1950) is used to fit the observed MC data (blue background in Fig. 1).In cylindrical coordinates (ê r , êθ , êz ), this model writes where J 0 and J 1 are the ordinary Bessel functions of order zero and order one, respectively, while B 0 and α are the two free parameters of the model.In order to fit the Lundquist's model to the observed magnetic field components in the FR frame, the time t needs to be converted into the spatial coordinate X with its origin set at where the minimum approach distance occurs (X(t o ) = 0, X < 0 for the inbound branch, and X > 0 for the outbound one), where V is the mean solar wind speed of the MC and λ = sin −1 (cos φ L cos θ L ) is the location angle measured from the plane (ŷ GSE , ẑGSE ) towards the MC axis, as defined by Janvier et al. (2013).Next, the signed distance to the FR axis, along the spacecraft trajectory inside the FR, is computed as where p is the impact parameter defined as p = CA/100 and R 0 is the FR radius from Lepping's table defined by the first zero of J 0 (αR) (i.e.R 0 such that J 0 (αR 0 ) = 0).For each option of the time of the closest approach (i.e.t 0,minus or t 0,plus ), we computed the normalised Lundquist solution Next, the cylindrical magnetic field components are transformed to the orthonormal FR frame (ê x , êy , êz ).We recall that êx is in the plane defined by the spacecraft trajectory and the FR axis (ê z ).The Lundquist model writes where X is given by Eq. ( 4), pR 0 is the distance of the spacecraft from the flux rope axis at the closest approach point, and b θ,L and b z,L are the normalised azimuthal and axial magnetic field components from Lundquist solution (Eq. 6).
Next, we computed the two possible models for each MC as the example shown in Fig. 1 with blue and red lines corresponding to t 0,minus and t 0,plus , respectively.The quality of the fit between the normalised Lundquist magnetic field components and the normalised observations is characterised by the reduced chi-square defined as where n = 5 is the number of parameters of the fit and N d is the number of data points as defined by Lepping et al. (2006).Then, we computed χ R for both fits (with t 0,minus and t 0,plus ).Finally, we designated a sign to asf according to the fit that presents the lowest χ R .This implies that asf > 0 when the best fit is obtained with t 0,plus , and asf < 0 when the best fit is obtained with t 0,minus .As a summary, we present in Fig. 2a the distribution of the signed asymmetry factor for Q 1,2 and the subset Q best defined with |C B | ≤ 0.05, and with |p| ≤ 0.3 (Lanabere et al. 2020).We remind the reader that all C B values reported by Lanabere et al. (2020) are larger by a factor of two.In particular, we found 53 cases (58 % of cases, see Table A) having an asf > 0, which corresponds to have more erosion in the MC back, assuming the observed asymmetry is mainly due to erosion.The other 38 cases (42 % of cases) with an asf < 0 correspond to more erosion in the front.
The distribution of Q 1,2 presents a maximum near zero, with a low bias to positive values (58% positive).Furthermore, there were no cases with |asf| > 40%.Meanwhile, the distribution for Q best is more evenly distributed (52% positive).
The shift of time for the closest axis approach, t 0 , from the central MC time could be due to the FR erosion during the travel from the Sun.For example, if reconnection at the FR front had removed magnetic flux, t 0 is earlier than ∆t/2, or the asf < 0, and also C B < 0 as B(t) is stronger in front.On the other hand, erosion at the FR rear implies t 0 later than ∆t/2, the asf > 0, and C B > 0. Another possibility is the asymmetric compression of the FR.For example, if the inbound region is more compressed (by a strong sheath), B(t) is stronger there, C B < 0, and the inbound side is less extended implying the asf < 0. Thus, if erosion or asymmetric compression of the FR is the main origin of a finite |asf|, we expect a positive correlation between the asf and C B .In fact, Fig. 2b shows only a weak anti-correlation with the Pearson correlation coefficients slightly negative ( −0.15 for Q 1,2 and −0.26 for Q best ).Therefore, the asymmetry in the magnetic field profile B(t), either by erosion or compression, is not dominantly at the origin of the shift in time of the position of the closest axis approach.

Method
The main aim of the present section is to improve the SEA of MCs as outlined in Sect. 1.In order that the magnetic field components of the different MCs add up constructively, they need to represent the same quantity (e.g. the axial component) and have the same polarity (Sect.3.2).Moreover, since a spacecraft provides data only on an eroded, or partially formed, FR, we also need to infer a coherent FR for each MC so that the SEA adds up coherently the same FR portion of the data.This FR definition could be realised with the fitted FR model, or with the FR remaining when the MC is observed, or even with the expected fully formed FR (counting on the statistical approach to fill the data gap of individual MCs for the eroded part).This procedure of defining an FR associated with the data is the object of Sect.3.1.The steps needed to perform an SEA of the vector magnetic field are described in Sect.3.2.Since we identified biases in this SEA, we define MC subsets to decrease them, at the expense of lower statistics (Sect.3.3).Finally, we analyse the various SEA results (Sect.3.4).

Definition of FR radius
In order to define an FR from MC data, we applied the procedure described by Démoulin et al. (2019).We first defined the inferior and superior values of the FR radius (R) at the MC boundaries, for each MC of the set Q 1,2 .This procedure is shown applied to two examples of MCs in Figs. 3 and 4. The MC observed on 22 August 1995 is represented by the schema shown in Fig. 3a with the time of the closest approach t 0 = t 0,plus (see Fig. 1 and Sect.2.2).The MC observed on 24 July 2004 with t 0 = t 0,minus is represented by Fig. 3b.The observed MCs are typically not compatible with a full FR since the time of the FR axis closest distance, t 0 , is typically not at the centre of the observed MC time interval.This is linked to the asymmetry of the magnetic field profile due to asymmetric compression and erosion (Dasso et al. 2007;Ruffenach et al. 2015).More precisely, the amount of azimuthal magnetic flux is not balanced between the in-and outbound regions.To precisely correct this, the FR boundary could be computed by imposing this flux balance from the data transformed to the FR frame.An alternative is to use the fitted FR model to define this flux balance.It has the advantage of filtering out magnetic fluctuations such as the ones created by Alfvén waves.In any case, the two procedures are expected to provide very close results since we select the set of MCs that are best fitted by the model.The remaining small differences are further minimised by the SEA procedure.
The typical MC asymmetry implies that the fitted FR extends to a radius R in and R out , which are generally different at the in-and outbound MC boundaries.Thus, the model is not an FR ending at a given radius R.This could occur when either the MC is formed of a smaller FR, of radius R inf = min(R in , R out ), with extra B flux on one side, or the initial FR was eroded on one side during its travel, so that the total FR would have been R sup = max(R in , R out ) without erosion.These two interpretations are shown in Fig. 3 for the two cases R in > R out and R in < R out .We precise the derivation of these radius below, with the computation steps summarised in Fig. 4 for two MCs with a similar asymmetry factor, impact parameter, and a nearly symmetric B profile.
After the definition of the asf sign, we computed the spatial coordinate X using Eq.(4) with its origin set at t 0,plus or t 0,minus (third row of Fig. 4).In this spatial coordinate the in-and outbound boundaries of the MC are located at X in and X out , as defined by Démoulin et al. (2019).For the MC of Fig. 4a the maximum χ R selects t 0,plus , and then the inbound boundary is more extended than the outbound boundary.Meanwhile in Fig. 4b, t 0 = t 0,minus and the outbound boundary is larger than the inbound one.The MC boundaries are associated with the FR radius R defined as (Eq.5): The in-and outbound MC radius boundaries are shown in the bottom row of Fig. 4 with B y (R).The blank space around the magnetic cloud axis (R = 0) is associated with the distance to the spacecraft at the closest approach.The last step is to define the inferior and superior values of R at the MC boundaries: The examples shown in Fig. 4 have R 0 in between R inf and R sup .This is not observed for all the cases (see Fig. 2f of Démoulin et al. 2019).In particular, 42% of MCs in the set Q 1,2 have R inf < R sup < R 0 , so where B z = 0 is located beyond the MC boundaries.At the opposite, 20% have  so where the FR core (B z > 0) is surrounded by B z < 0, so they are named annulus cases (see, e.g.Vandas & Geranios 2001).Finally, in Table A.1 we present the results of sgn(asf), R inf , R sup , and the values of χ R for the Lundquist fit with both possible signs of the asf for the set Q 1,2 .

Superposed epoch analysis procedure
The SEA is a statistical tool useful to reinforce the common features between several individual MC profiles and minimise the peculiarities of each event.After defining the boundaries of the data to be superposed, an SEA of scalar quantities can be done.
For vectors quantities, the data first need to be rotated in a common meaningful frame and defined with the same global sign so that the SEA of the components are meaningful.
In order to make a coherent superposition of the events, we rotated the magnetic field components into the FR frame defined so that B z > 0 in the FR core.The sign of B x and B y in the FR frame depends on the sign of the FR helicity (H), so we first need to change all the MCs to positive helicity.Next, the B x sign depends on the sign of the closest approach distance (CA).In summary, we change B x to sgn(CA H) B x and B y to sgn(H) B y to have a set of FRs with positive helicity and positive closest approach distance.
Next, we need to define which is the relevant portion of the data to include for each MC.We investigated three possibilities that below we call the model, the in situ , and the initial FR.Case 1: The first one used the Lundquist fitted model to define the FR boundaries where B z (R 0 ) = 0.This can be partly justified by the presence in the corona of a potential field arcade above the erupting flux rope, which provides B z = 0 after reconnection behind the FR (this argument has its own limitations, see Démoulin et al. 2013).This is the way Lepping built his MC tables and related papers.Case 2: The second choice, or in situ FR extension, was to consider only the FR crossed by the spacecraft, so as to analyse the data within [−R inf , R inf ].Two extreme interpretations of this choice are that this FR corresponds either to the remaining solar FR due to erosion, or to the restrictive region where an FR could be formed in the corona.In the latter case, the extra flux present on one side would be flux that could not be incorporated, via reconnection, in the FR (e.g. an overlying coronal magnetic arcade).Case 3: Finally, a third choice, or non-eroded FR extension, was to consider all the MC data, so an FR defined within [−R sup , R sup ], considering that the flux missing on one side was lost by erosion during the travel.This missing flux is treated as data gap.Since the missing flux is present about in half MCs, either in the inbound region or outbound region (Ruffenach et al. 2015), the corresponding SEA has approximately half the MCs near the interval boundaries.We also remind the reader that the central part of an MC, [−pR 0 , pR 0 ], has no data since the spacecraft does not explore the FR core.This implies that for all above boundary selection, the central part of the SEA is only realised with a few MCs (those observed with a low impact parameter p).
In order to superpose the FRs data on an SEA, the extension of the FRs should be the same.This is achieved for all MC data by normalising R with R 0 , R inf , or R sup , respectively, for the three above-selected FR extensions.The result is an abscissa inside [−1, 1], which allows us to superpose the various MC data.
The computation of the SEA requires that each individual profile has the same number of data points.The number of data points increases with the duration of the observed MC.In order to obtain the same number of data points in every MC profile, we defined a grid of equally spaced bins, so that there were 25 bins within the inbound region and 25 bins within the outbound region of MCs.All data points that are present in each bin were averaged to a single value.Next, the average (mean or the median values) of the MC set was performed in each bin.This defined the SEA profile for each magnetic field component.Here we used the median as it is more robust to outlier values (see Regnault et al. 2020;Lanabere et al. 2020, for a comparison between mean and median results).
The results of the above three SEAs cannot be directly compared since a different normalisation of R was needed.We corrected this by multiplying the normalised radius by R 0 , R inf and R sup , where is an average over the MCs considered.For Q 1,2 set R 0 = 0.109 au, R inf = 0.094 au, and R sup = 0.113 au, for p < 0.3 set R 0 = 0.102 au, R inf = 0.082 au, and R sup = 0.104 au, while for Q best R 0 = 0.115 au, R inf = 0.088 au, and R sup = 0.110 au.Then, the renormalisation of the SEA results to comparable sizes was a modest factor.First, the above normalisation of R by R 0 , R inf , or R sup , and second the normalised radius was multiplied by R 0 , R inf , or R sup to make the SEAs comparable and to provide a radius R in au used in Fig. 5.

Definition of MC subsets
The full set of MCs corresponds to 91 MCs from Lepping's catalogue with quality Q 0 = 1 and Q 0 = 2, defined as Q 1,2 in Sect.2.1.Next, we defined new subsets according to the impact parameter p and the asymmetry C B .
The impact parameter p expresses how far from the MC axis the spacecraft scans the MC.This implies that the azimuthal magnetic field components (B x , B y ) are significantly dependant on the impact parameter p.In order to superpose the magnetic field components, with low B x values and a better FR orientation, we selected MCs with |p| ≤ 0.3.This kept almost half of the Q 1,2 events.Finally, the set defined by Q best (Sect.2.2) kept 25 events.It corresponds approximately to symmetric events with a low impact parameter, |C B | ≤ 0.05 and |p| ≤ 0.3.

Comparing SEA profiles
A comparison of the SEA profiles for the three sets of MCs (Q 1,2 , Q 1,2 with |p| ≤ 0.3, and Q best ) is shown for three different FR boundaries: the model FR in [−R 0 , R 0 ], the in situ FR in [−R inf , R inf ], and the non-eroded FR [−R sup , R sup ].In order to compare the asymmetry between the in-and outbound boundaries of the FR, we set the abscissa to |R| and we flipped the B y sign in the inbound boundary (to better compare it to the outbound values).
The SEA of B x is shown in the top row of Fig. 5.With Q 1,2 set, B x increases with R up to R ≈ 0.07.This contrasts with the flat profile of B x obtained with |p| ≤ 0.3 and Q best .In fact, the increasing profile with Q 1,2 set is due to a bias: only MCs observed with a low p contribute near the origin, and a small |p| implies small B x values (Eq.7).Progressively, for larger |R|, more MCs contribute with larger |p|, implying a larger B x contribution.Selecting MCs with |p| ≤ 0.3 limits this bias to |R| values closer to the origin (middle and right columns).Moreover, the slight decrease in B x near the boundaries for FRs defined with R 0 and R sup could be due to perturbations by the surrounding medium present at the FR periphery, or the inclusion of non-MC data.We conclude that the results show a flat B x profile when the biases are minimised.
The profile of B y is also affected by the p bias, although differently than B x .Going more to the periphery (larger |R|), more MCs with larger |p| contribute, so B y is weaker for Q 1,2 compared with |p| ≤ 0.3 and Q best results.For all sets, B y (0) ≈ 0 as expected in the FR model.The azimuthal component B θ is computed from B x and B y assuming a circular FR cross section.Thus, it includes the biases of B x and B y .For |p| ≤ 0.3 and Q best , B θ is almost a linear function of R.
B x is significantly stronger in the inbound region (continuous lines in Fig. 5) than in the outbound region for the Q 1,2 and |p| ≤ 0.3 sets.This is also true for B y to a lesser extent for large R values.This is due to the frequently stronger B measured in the inbound region compared to the outbound one (C B is strongly negative for a fraction of MCs, Fig. 2b).This effect disappears if we limit the B asymmetry of the included MCs, as in the Q best set.
The profile of B z is expected to be much less affected by the |p| value, since B z is maximum around the origin with a weak dependence on R in the core.Indeed, B z profiles in the third row of Fig. 5 are closer than for the other components.Still, near R = 0, there are too few MCs for the SEA to be reliable.Thus, the local B z peak near the origin is due to a larger B for the few MCs with low |p| cases.At the FR boundary, B z is almost zero, especially for the Q 1,2 set.
Setting the FR boundary at R 0 , R inf , or R sup before making the SEA finally has little effect on the results since the curves of these cases nearly superpose in Fig. 5. Indeed, in the common core region, the same in situ data are included and they are phased the same way (using the closest approach distance to separate in-and outbound regions).Thus, the difference between the three SEAs is related to how the binning is done (same number of SEA bins while the radial extension taken is different).As a result, the closeness of the curves in Fig. 5 is a logical consequence of the weak effect of the data rebinning.The main differences between the results obtained with different selected FR boundaries are the large |R| values, as expected.
The bias introduced by p is partly solved by selecting MCs with low |p| values with the limit of having enough MCs, at least a few tens, to perform an SEA that is not too affected by fluctuations (due to individual MC peculiarities).With these limitations, the B x profile is almost flat, and both the B y and B θ profiles are close to being linear with the radius.This implies an axial current density that is uniform, such as in the model of Hidalgo et al. (2002).
In summary, when the effect of the various bias are well decreased, a typical profile of B is obtained independently of the precise method used to derive it (right column of Fig. 5).The selection of FR extension at R 0 , R inf , or R sup does not significantly change the SEA profiles of the magnetic field components in the common region of the radius R. Using the FR extension up to R sup extends the profiles to larger radii, with more fluctuations, since only about half of the MCs contribute to the largest R values.It is much more significant to select a low impact parameter |p| and an asymmetry |C B | to limit the corresponding biases.

Generic twist profile
A main characteristic of an FR is its amount of magnetic twist, which is defined as the amount of rotation that the magnetic field lines make around the FR axis per unit length along the axis.The twist distribution can be computed considering a cylindrical symmetry as τ = B θ /(RB z ) in radian/au (or simply au −1 ), with R the radial distance from the FR axis.
The twist as a function of R for the three subsets of Sect.3.3 were computed following the procedure described in Lanabere et al. (2020).In order to show a representative twist profile for each subset, the twist is shown where more than 50% of the events contribute to the SEA (so that there is a limited variation in the statistical weight across the twist profile).
The twist profiles derived with the SEA extension set to the model (case 1), in situ (case 2), and non-eroded FR (case 3) are compared in Fig. 6a for Q best set (to avoid biases as much as possible).The twist profile is almost constant in the FR core (|R| < 0.06 au) and comparable within the in-and outbound profiles.Indeed, the average of the in-and outbound profiles are τ = 13.85,13.82, and 13.4 au −1 for cases 1 to 3, respectively.This slight difference is the result of the sensitivity of the twist profile to the SEA binning, to magnetic fluctuations in MCs, and to the low number of MCs included, at most 25 events, to avoid biases (Sect. 3.4).
The twist profile near the origin could not be reliably determined as there were too few MCs observed with a small impact parameter.Additionally, the twist determination implies the ratio of two small quantities (B θ and R) in the vicinity of the FR axis.Since R is vanishing by definition of the FR axis, while B θ incorporates the fluctuations of B x and B y , B θ is typically not vanishing in the data of individual MCs, not even in SEAs (last row of Fig. 5).This implies that the computed twist profile typically diverges near the FR axis.In fact, the twist profile cannot be reliably derived there with an SEA, and even less so for an individual MC.
For |R| > 0.06 au, the twist has a small increase with |R|, which is coherent between the cases up to |R| ≈ 0.09 au.For larger |R| values, in cases 1 and 3 there is a large dispersion of the results.This dispersion is enhanced by the low B z value reached in the inbound profile of case 1 (Fig. 5, right column).On the other side, B z has a local increase for case 1 at the outbound profile, which implies a decrease in the twist there.The results of case 3 is in between these two extremes (Fig. 6a).Selecting the set Q 1,2 or |p| ≤ 0.3 would lead to different values of B z near the FR boundary.This implies important variations in the deduced twist.We conclude that the twist significantly increases at the FR periphery, but its value has a large uncertainty.
We next compared the present results to the ones of Lanabere et al. (2020) in Fig. 6b.The global twist trend is comparable.This justifies a posteriori the results of Lanabere et al. (2020) where the SEA was simply performed using the central time, and not the time of the minimum distance approach to the FR axis, as in this study, so finally using R in and R out even if they differ.The similarity of the results is at first surprising because SEA could accumulate the bias of a dominant erosion from one side.In that case, there would be a systematic shift of the MC and the FR boundaries, and so different SEA profiles.In fact, MCs are statistically eroded almost symmetrically at the front and rear (Ruffenach et al. 2015), as they are present in approximately equal amounts in our various samples, so that a systematic bias of one side erosion has a weak signature in the SEA using MC boundaries.This is the strength of the SEA to erase the peculiarities (here erosion side and amount) of individual cases.Finally, the above uniform twist values are larger than previous studies, with τ ∼ 9.4 au −1 (Möstl et al. 2009, performed with a Grad-Shafranov model applied to an MC crossed by two spacecraft), and with τ ∼ 11.5 au −1 (Lanabere et al. 2020, derived with an SEA analysis) .
Finally, we compared the results to the Lundquist model (green curve in Fig. 6b).The SEA twist is even flatter than the Lundquist's twist in the FR core, especially for cases 1-3.Within the SEA twist dispersion discussed above, the SEAs show a comparable increase in the twist at the FR periphery.Thus, we confirm that the Lundquist's model well represents the median twist of MCs.

Summary and conclusions
Previous studies have shown contrasted results for the magnetic twist profiles present in MCs, even in the framework of a supposed locally cylindrical symmetric magnetic field (Sect.1).The twist profile is especially delicate to derive both because the data need to be precisely rotated in the FR frame and because the twist is derived from the ratio of two quantities that vanish at the FR axis.A way to improve the derived twist profile is to use the powerful SEA method, which weakens the individual MC peculiarities and decreases fluctuations.This was done in a simple way by Lanabere et al. (2020), choosing the central time of the time series to split the in-and outbound branches, and also using the MC boundaries to superpose the magnetic field in the FR frame.However, since MCs are differently eroded during their travel from the Sun, one may wonder how justified it is to superpose data where the FR magnetic flux was partly removed on either side.Thus, one of the main aims of this paper was to correct this possible bias.
Another aim of the present study was to search, then to correct, other possible biases present within the SEA.For that, we limited our study to the MCs of best quality present in Lepping's list.The fitted Lundquist model provides the FR frame where the data are rotated in order to superpose, in a consistent way, the magnetic field components (azimuthal and axial components).We remind the reader that comparable results have been obtained with FR orientation defined with the minimum variance method (Lanabere et al. 2020).The magnetic components also need to add up.This requires that all cases have the same sign of magnetic helicity and impact parameter.Furthermore, the magnetic signals need to be phased in time so that the closest approach distance of all the FRs are synchronised to a common reference time.This is typically not the case when the MC boundaries are used for the SEA (Lanabere et al. 2020) since MCs are typically eroded on one or both sides when observed at 1 au.The Lepping's list does not provide the time of the axis closest approach because it provides only the absolute value of a related parameter, called the asf (see, Démoulin et al. 2019).We thus performed a least square fit, as originally done, to recover the sign of asf.This is a useful byproduct obtained in the present study, and presented in Table A.1.This fully completed the parameter set of the best Lundquist model associated with each MC.
In order to have a more coherent superposition of the magnetic field components in the SEA, we used the fitted model to align the various parameter data.We selected three possible FR boundaries (see Fig. 3).The first one was set at R 0 , where B z (R 0 ) = 0 for the Lundquist model (original Lepping's choice).The second one, R inf , was set to include only the inner spatially symmetric part of the FR extension, crossed by the spacecraft, so it corresponds to the FR remaining when crossed by the spacecraft.Extra magnetic flux present before or after was interpreted as the remaining magnetic flux on the side opposite to erosion (rather than extra flux not belonging to the FR close to the Sun).The third radius, R sup was designed to also incorporate this extra magnetic field at the outer part.This implies a data gap on the outer part of the other side.Since erosion occurred almost as frequently at the front and the rear (Ruffenach et al. 2015), the periphery part of the profiles were based on about half MC data.
Even selecting the best observed MCs, of quality Q 1,2 , within Lepping's list, biases were present in the corresponding SEA.A first bias was tied to the magnitude of the impact parameter p.The largest effect was an increasing profile of B x with distance to the FR axis.This bias was strongly weakened when the impact parameter was limited to |p| ≤ 0.3 (Fig. 5).A second bias was linked to the field strength asymmetry between the in-and outbound regions.This bias can affect the quality of the obtained FR orientation, with consequences on possible mixing of B components in the local FR frame.This asymmetric effect is again mostly present in the B x component, and could be reduced by limiting the B asymmetry of the MCs included within the SEA.Finally, a third possible bias was linked to flux erosion during the travel from the Sun.This bias was found to be weak as the profile of the B components were similar with the data limited to the MC or by a given radius of the fitted FR.All these results justify and set on firmer ground the results of Lanabere et al. (2020) obtained by directly including the MC data in a simple way, neglecting the in-out bound asymmetries present in each of the analysed events.
The twist profile within an MC is typically difficult to derive because the spacecraft typically crosses only a part of the FR, in general missing the core, and because the computations need to be done in the FR frame with an axisymmetric hypothesis.Magnetic fluctuations and peculiarities of individual MCs worsen the derivation of the twist profile.The expected singularity of the twist profile at the FR radius (with finite B fluctuations) and at its periphery (where the axial field component vanishes) worsen the derivation of the twist profile.These difficulties soften with an SEA.The various derived profiles, with a different selected outer FR radius and a different set of MCs (to analyse bias effects) point to a flat twist profile in the FR core (about two-thirds of the FR radius).In the vicinity of the FR axis, there are presently not enough MCs observed with a low impact parameter to get a reliable twist profile.At the FR periphery, the twist sharply increases, while the uncertainty is large mostly due to a weak axial B component easily affected by external perturbations.This implies that the original FR present close to the Sun is expected to have a more strongly twisted periphery, in agreement with the solar FR further building up during eruptions (see Démoulin et al. 2019).
To summarise, we verify that SEA of MCs is weakly sensible to the precise definition of the boundaries considered to do the superposition.Still, SEA includes the biases present in the original data set.The selection of the included MCs can significantly reduce these biases, but at the cost of decreasing the number of events and consequently having weaker statistics, thus including more fluctuations in the SEA profiles.Further improvements would require a larger data base of observed MCs, especially to better constrain the twist profile near the centre and the periphery of the FR).

Fig. 1 .
Fig. 1.Selection of the correct sign of the asf for the MC observed on 22 August 1995.The MC region is shown with a blue background.(a) The magnetic field magnitude, (b,c,d) the magnetic field components, normalised to the field magnitude, in the FR frame.Two Lundquist solutions fitted to the observed magnetic field components, with their origin set at t 0,minus (blue) and t 0,plus (red) is added in(b,c,d).(e) The observed velocity profile.The correct sign of the asf is determined by the best fit represented by the lower χ R value (Eq.8).Here it is for sgn(asf) = 1 (red curves).
Fig. 2. Signed asymmetry factor results.(a) Histogram of the signed asf (related to the time of the closest approach to the FR axis with Eq. (2)).(b) Scatter plot of asf vs C B (related to the magnetic field profile symmetry).The group Q 1,2 of analysed MCs and its subset Q best are shown.The dashed line in (b) corresponds to the most symmetric MCs with |C B | ≤ 0.05.

Fig. 3 .
Fig. 3. Schema of an MC cross-section used to define the MC parameters defined by Démoulin et al. (2019).The MC interval, deduced from in situ observations, is schematised with a thick green line.The dashed circles represent the boundary for three characteristic FRs: in blue for the in situ FR, in black for the fitted Lundquist FR limited within B z (R 0 ) = 0, and in red for the expected fully formed FR without erosion at its boundary.Two cases are shown: (a) R in > R 0 > R out and (b) R in < R 0 < R out corresponding to the MC examples shown in Fig. 4.

Fig. 4 .
Fig. 4. Definition of the asf sign and the in-and outbound regions of the MC in X and R spacial coordinates.From top to bottom, the first two rows show the magnetic field magnitude B and the B y component in function of time.The B y profile is dominating in χ R (Eq.8) to determine the sign of the asf.The third and fourth rows show the in-and outbound regions of the MC in X and R spacial coordinates, respectively.Column (a) corresponds to an MC observed on 22 August 1995 as an example of an asf > 0 with R in > R 0 > R out as the schema shown in Fig.3a.Furthermore, in this case R inf = R out and R sup = R in .Column (b) corresponds to an MC observed on 24 July 2004 as an example of an asf < 0 with R in < R 0 < R out as the schema shown in Fig.3b.In this case, R inf = R in and R sup = R out .

Fig. 5 .
Fig. 5. Median profile of the magnetic field components derived with an SEA using first the MC data in [−R 0 , R 0 ] with B z (R 0 ) = 0 (black), second in the in situ FR [−R inf , R inf ] (blue), and third in the non-eroded FR [−R sup , R sup ].The in-and outbound profiles are drawn with continuous and dashed lines, respectively.The columns show three different samples: (a) the set Q 1,2 ; (b) a subset of Q 1,2 with a low impact parameter (|p| ≤ 0.3); and (c) a subset of Q 1,2 , Q best , with a symmetric magnetic field profile (|C B | ≤ 0.05) and a low impact parameter (|p| ≤ 0.3).

Fig. 6 .
Fig. 6.Twist profiles for Q best set.(a) Comparison of the in-and outbound profiles for the three cases: the Lepping FR extension [−R 0 , R 0 ] (black, case 1), the in situ FR extension [−R inf , R inf ] representing the eroded FR observed at 1 au (blue, case 2), and the non-eroded FR extension [−R sup , R sup ] representing the possible initial FR (case 3).The in-and outbound profiles are represented with solid and dashed lines, respectively.(b) Comparison of case 3 (R sup boundary) with the results of Fig. 10 inLanabere et al. (2020).Their SEA results for in-and outbound (in orange) and the Lundquist model with R 0 = 0.12 au (in green) are included.