A Multibranch Deep Neural Network for the Superresolution of Solar Magnetograms

The existing superresolution (SR) models for solar magnetograms are mostly borrowed from the SR models for natural images. They are less effective for processing solar magnetograms with a very large dynamic range and very rich image features. In this paper, a multibranch superresolution (MBSR) model is specially designed for solar magnetograms. First, we split a low-resolution magnetogram into a group of overlapping image patches, and classify them into three categories according to magnetic flux intensity, namely simple, medium, and complex. Then, image patches of each category are fed into the corresponding branch of the MBSR network, the lightweight branch for simple image patches and the heavyweight one for complex image patches. The advantage of such a strategy is twofold. On the one hand, active regions are allocated more computational resources to train a heavyweight branch more fully, while quiet regions are allocated fewer computational resources to train a lightweight branch for saving computational resources. On the other hand, a lightweight network with a simple nonlinear function is preferable to simple regions, while a heavyweight one may be underfitting. Additionally, to verify the effectiveness of the proposed model, a magnetic field structure similarity metric is proposed to measure the artifacts of the generated high-resolution (HR) magnetograms. Experimental results show that the proposed MBSR model generates HR magnetograms highly consistent with the HMI ones, and achieves the best performance over five objective metrics, including peak signal-to-noise ratio and structure similarity, etc.


Introduction
Over the last 50 yr, many solar magnetic maps, known as magnetograms, have been produced by space-based instruments.These magnetograms are capable of measuring the magnetic field strength and polarity of the Sun and have been widely used for studying the source and evolution of the solar magnetic field.In addition, these magnetograms are crucial for probing solar mechanisms (Hathaway 2010), understanding the solar corona (Mikić et al. 1999) and forecasting space weather events (Tóth et al. 2005).The Helioseismic and Magnetic Imager (HMI; Schou et al. 2011;Scherrer et al. 2012) has operated since 2010 on board the Solar Dynamics Observatory (SDO; Pesnell et al. 2012), being one of the space-based instruments used to measure these vector magnetograms.The SDO/HMI provides high-resolution (HR) solar magnetograms with 0 5 pixel −1 , magnetic intensity, and vector magnetic field.Another space-based instrument is the Michelson Doppler Imager (MDI; Scherrer et al. 1995;Domingo et al. 1995) on board the Solar and Heliospheric Observatory (SOHO).It provided a low-resolution (LR) solar magnetogram with 2″ pixel −1 from 1995-2011.Despite a large amount of magnetogram data available, it is harder to combine data from various instruments to study the small-scale magnetic field structure of the Sun.Because of their differences in resolution, spectral inversion techniques, instrument noise levels, or other instrument characteristics.The superresolution (SR) of magnetograms reconstructs LR images into high-quality high-resolution (HR) images to let the resolution of MDI and HMI be the same.This in turn is conducive to studying solar flare forecasting, space weather forecasting, and other events.
Recently, deep-learning-based SR methods have gained a significant performance boost over traditional methods in both quantitative and qualitative terms (Lim et al. 2017;Muqeet et al. 2019), due to the powerful feature representation and model-fitting capabilities of neural networks.Aarti & Kumar (2021) applied two convolutional neural network-based methods (a residual attention model and a progressive generative adversarial network (GAN) model) for the SR of HMI magnetograms.This method leveraged the bicubicdownsampling method to obtain the LR HMI magnetograms by a factor of 4. It was trained and tested on the LR HMI magnetograms instead of the MDI magnetograms.Jungbluth et al. (2019) superresolved the full-disk MDI magnetograms to the same resolution as HMI magnetograms using the HighRes-Net method (Deudon et al. 2020).Dou et al. (2022) employed the SPSR-GAN model (Ma et al. 2020) for superresolving the MDI magnetograms of the active region (AR).In this method, DSGAN (Fritsche et al. 2019) was leveraged to solve the domain shift problem, and then the SPSR-GAN model was trained on the HMI magnetograms and tested on the MDI magnetograms.
The existing deep-learning-based methods for solar magnetogram SR achieve significant performance boosts; however, they were mostly borrowed from the SR of natural images, without discerning the complexity of the magnetic field, treating ARs and quiet regions (QRs) equally.In our investigation, there are significant differences between magnetograms and natural images, i.e., magnetograms contain QRs and ARs, with a much larger dynamic range than the natural Original content from this work may be used under the terms of the Creative Commons Attribution 4.0 licence.Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.
images.This makes it difficult for a single network to get a good trade-off between model complexity and efficiency.A lightweight network with a small number of parameters, such as HighRes-Net (Deudon et al. 2020), is not sufficient for processing strong magnetic fields, while a complex network with an excessive number of parameters, such as SPSR-GAN (Ma et al. 2020), is excessive for processing weak magnetic fields, resulting in low efficiency of computational resources utilization (generally, the larger the number of model parameters, the higher the computational resources required).These drawbacks limit the performance of the magnetogram's SR as discussed in Section 4.
To address the above problem, our strategy is to treat the ARs and QRs differently by allocating more computational resources to the ARs and fewer to the QRs.To achieve this purpose, the proposed model should have a module to distinguish ARs and QRs.Then, the regions of different complexity are superresolved by the different branches of a network with different complexity.To this end, we propose a multibranch SR model that is composed of two parts, an image patch classification module and a multibranch SR module.In the classification module, the input magnetogram is split into small overlapping image patches.Then, these patches are classified into three categories according to the total unsigned magnetic flux (TUMF), i.e., simple (weak magnetic field, e.g., QR), medium (moderate magnetic field), and complex (strong magnetic field, e.g., AR).An example of different categories of magnetic field patches is shown in Figure 1, where different colors label the three categories, green for simple, yellow for medium, and red for complex.Then, image patches of each category are fed into the corresponding branch of the proposed MBSR.The simple branch is the most lightweight network with the fewest parameters; the complex branch is the most heavyweight network with the most parameters.The advantage of the MBSR method is that the computing resources can be dynamically allocated according to the complexity of the magnetic field, which can reduce computational complexity and avoid underfitting if a heavyweight network is used for simple image patches simultaneously.
Furthermore, to measure the quality of a superresolved magnetic field, a magnetic field structure similarity (MFSS) metric is proposed.The extensive experimental results demonstrated that the proposed MBSR model can use computational resources more efficiently beyond existing solar magnetogram SR models.In addition, it outperforms existing solar magnetogram SR models in terms of peak S/N (pS/N), structure similarity (SSIM), correlation coefficient (CC), rms error (RMSE), 2D histogram, and MFSS metrics.

Data
The SDO/HMI line-of-sight (LOS) magnetogram was taken every 45 s from 2010 February 11, while the SOHO/MDI LOS magnetogram was taken every 96 minutes from 1995-2011.The two have overlapped time from 2010-2011.For this study, we download the full-disk (4096 × 4096) HMI and the full-disk (1024 × 1024) MDI LOS magnetograms from 2010-2011 by using Sunpy (The SunPy Community et al. 2015).The random position, rotation, and time differences between MDI and HMI magnetograms would significantly reduce the model's ability to learn the mapping; therefore, those differences need to be removed before the data are available.We conduct a series of operations on the level 1.5 MDI and HMI magnetograms to remove the above differences.The operations include: (1) Centering.We first obtain the size of the Sun's radius based on the RSUN_OBS parameter in the magnetogram headers and find the CDELTI conversion factor to convert the Sun's radius to heliospheric coordinates.Then, we get the center of the Sun according to the two parameters IMCRPIX1 and IMCRPIX2 in the magnetogram headers.Finally, according to the radius of the Sun, we cut out the full-disk and apply it to the outer tangent rectangle to get the full-disk magnetogram; To better show the shape of solar ARs with clearer magnetic field structure, we chose upper and lower saturation limits of ±500 G for the LOS magnetograms.For the magnetograms, the limits of ±500 G can display most of the magnetic fields in the magnetograms, including the strong magnetic fields in the AR.Considering the variation of the elliptical orbit of the Earth's revolution, we fixed the disk sizes of the MDI and HMI full-disk magnetograms to 465 and 1860 pixels, respectively, as reported by Galvez et al. (2019).
Due to the different imaging times of the MDI and HMI magnetograms, we selected the magnetograms from the HMI data set that are taken closest in time to the MDI magnetogram.As a result, the imaging locations of the HMI and MDI magnetograms are different.Therefore, we utilize the Oriented Fast and Rotated Brief (ORB; Rublee et al. 2011) feature detection algorithm to align the two magnetograms.ORB is an efficient and fast method for detecting and characterizing features in a nonlinear scale space (Rublee et al. 2011).First, the ORB algorithm detects and extracts all the key points in the two images, and creates their corresponding binary feature vectors that are combined into an ORB descriptor.Subsequently, matched feature points between the two images are identified and ranked based on their similarities, with only a small portion of the best matches retained.The Hamming distance is commonly used to measure the similarity of two feature point descriptors.As shown in Figure 2, the feature points that match the MDI and HMI images are connected by lines.We set the HMI image as a reference image to align the MDI image, and feed the unregistered image and the reference image into the detector to obtain the corresponding keypoint features.Through matching, the single homography matrix is calculated and the unaligned image is affine transformed using this matrix to obtain the aligned image.
After the above processing, we find that some aligned magnetograms are severely distorted.This may be because the difference between the two original magnetic maps is too large, and they lack significant features, making it difficult to align accurately.Due to this, we filter out the paired local magnetograms with a CC greater than 0.8, which are considered to be more successfully aligned.Finally, we obtained a total of 3201 pairs of full-disk magnetograms of HR-HMI and LR-MDI, which constitute the data set of this study.To efficiently train the model, we extracted 6742 pairs of HMI-MDI local magnetograms around the solar disk center from the aligned full-disk magnetogram data set.A local magnetogram is a magnetogram patch that is obtained by randomly cropping the full-disk magnetogram without using a fixed stride and size.It contains the strong/weak magnetic field regions.In this paper, the "LABELME" tool is employed to manually cut the nonoverlapping local magnetograms, which are close to the center of the solar disk of the MDI full-disk magnetogram.Meanwhile, the coordinates of each MDI magnetogram patch relative to the full-disk magnetogram are recorded for cutting the corresponding HMI magnetogram patch with four times the resolution of the MDI patch.
In this study, we take 6282 pairs from 2010 May 1 to November 15 as the training data set, 170 pairs from 2010 November 15-30 as the validation data set, and 290 pairs from 2010 December 1-31 as the testing data set.We chose to divide the data set by month to preserve some time evolution of the magnetic field during the training period, as random allocation of images can lead to cases where the training and testing data sets are only a few minutes apart.During this time, there may not be sufficient changes in the instrument's perspective and magnetic field characteristics, which could bias the evaluation of the model's performance and lead to data leakage.In our model, the input local magnetogram is first split into small patches.The patch sizes are 128 × 128 and 32 × 32 for HMI and MDI, respectively.The details of training, validation, and testing sets are shown in Table 1.

Method
The MBSR network is designed to superresolve the MDI magnetograms with the same resolution as the HMI magnetograms.We take the LR-MDI patch as the input and the corresponding HR-HMI patch as the label data.The local magnetogram contains strong magnetic field regions (complex structure) and weak magnetic field regions (simple structure).A local magnetogram is split into small patches, which are then classified into three categories, namely, simple, medium, and complex, according to the TUMF.The TUMF of the solar magnetogram is a physical parameter used to describe the magnetic field, and Jeong et al. (2022) divide the magnetogram into ARs and QRs by the TUMF.Therefore, we consider it as prior knowledge to reconstruct the solar magnetogram.Besides, some other statistical metrics, such as fractal dimension, Shannon entropy, or spectral slope, may be available for the categorization (please see Section 4.1 and Table 2) for related discussions.After that, the three categories of data are fed into three different branches of the MBSR network.These branches have different numbers of channels, 32, 48, and 64 for simple, medium, and complex.This approach can reduce computational complexity and avoid underfitting as a complex network is trained over only simple magnetogram patches.

MBSR Model
The architecture of our MBSR network is shown in Figure 3, consisting of two parts, an image patch classification module and a multibranch SR module.First, the input local LR-MDI image is split into overlapping patches { } x i i N 1 = .The classification module classifies these patches into simple, medium, and complex three types, i.e., x j , 1, 2, 3 i j = according to the magnetic flux intensity, and then fed these patches into the corresponding branch to reconstruct the HR patches: In the multibranch SR module, there are three branches named f SR 1 , f SR 2 , and f SR 3 to deal with different categories of these patches, and each branch is a simplified version of the SPSR (Ma et al. 2020).Finally, we combine all output patches to obtain the final superresolved magnetogram.
Classification module.The purpose of classification is to split a local magnetogram into small patches with different complexities.The complex image patches need a complex network to fit, and vice versa.This module is an off-line module, which first splits the input LR magnetogram into multiple nonoverlapping patches.Then, it uses two thresholds to divide these patches into three categories according to magnetic flux intensity.The two thresholds are determined by the following two steps.First, we calculate the TUMF for each LR patch in the data set.Second, we sort these values in ascending order, as shown in Figure 4.For the load balancing among the three branches, we set t1 = 5.7 × 10 5 and t2 = 8.9 × 10 5 empirically so that the same number of samples are distributed to each category.
Multibranch SR.An overview of the multibranch SR module is shown in Figure 2. The module is designed as a container that is composed of three individual branches with different channels (32,48,56).In this paper, we employ the simplified SPSR model as the baseline, which consists of a gradient path and a content path.The gradient branch is critical for recovering fine magnetic field structure, while the content path ensures the fidelity of the magnetic field.The input of the content path is the magnetogram patch, while the input of the gradient path is the gradient map of the magnetogram patch.Both paths contain five residuals in residual dense blocks (RRDB), where the convolution kernel size is 3 × 3.Then, their outputs are upsampled and fused by one RRDB block followed by a 1 × 1 convolutional layer.Finally, after getting all superresolved image patches of an LR magnetogram, we combine them to get an HR magnetogram.
The gradient path aims to learn the mapping between LR and HR gradients of magnetograms.It takes the gradient map of the LR magnetogram patch as input.Given a magnetogram patch I, where x and y denote the pixel coordinates, the function ( ) I denotes the operator of calculating gradient.

Loss Functions
We utilize a common pixel-wise loss and a gradient pixelwise loss.The pixel-wise loss mainly optimizes the pixel-level difference between the recovered image and the real image.Therefore, it is widely used to accelerate convergence and improve SR performance, which is proven efficient for some scientific images (Tong et al. 2020), although it may result in the oversmoothness of detailed magnetic field structures.These two losses are both L1 loss, given by where M is a gradient operator.
In conclusion, the overall loss is given by

Implementation Details
We establish a data set at doi:10.12149/101354 that contains the pairs of LR-MDI and HR-HMI images (please refer to Section 2 for details).In this paper, we superresolve the MDI images to the size of HMI images by a factor of 4.Then, to facilitate training the model, we further crop 128 × 128 and 32 × 32 patches from the local HMI and MDI magnetograms, respectively.
During training, we divide the original data set into three categories, which are used to train three subnetworks that are of different complexity, as introduced in Section 3.During testing, we select 290 local magnetograms (2010 December) to test the MBSR model.The test images are cropped into 32 × 32 patches.Through the classification module, each patch is fed into the corresponding branch.Finally, the multiple reconstructed patches are combined to obtain the final superresolved magnetogram.
The proposed model is implemented by using the deeplearning package of PyTorch 1.6.0,and the source code4 is  accessible publicly.It has 120 epochs and a batch size of 16 on a single NVIDIA GeForce RTX 3090 GPU.In addition, the Adam optimizer (Kingma & Ba 2014) is adopted with β1 = 0.9 and β2 = 0.99.The initial learning rate is 2 × 10 −4 .It is adjusted by adopting a cosine annealing strategy.To ensure the speed of training, the minimum learning rate is set to 1 × 10 −7 .The weights of the pixel loss and gradient loss are set to 1 to better optimize the objectives.We adopt the same setting as SPSR-GAN and HighRes-Net and retrain them on our data sets for 400 epochs.

Evaluation Metrics
Unlike natural image SR tasks that focus on producing visually pleasing results.Magnetogram, as a kind of scientific data, needs to be evaluated not only at pixel-level matching but also fidelity of physical parameters.Therefore, to measure the SR performance of solar magnetograms, the pixel-to-pixel CC and the 2D histograms between the generated and observed magnetograms are employed.Besides, an MFSS metric is raised to measure the similarity of magnetic field structures.These metrics are described in detail as follows.
PS/N and SSIM.For quantitative evaluation, we employ pS/N and SSIM (Wang et al. 2014) as the image-specialized evaluation metrics.PS/N is deployed to measure the average difference in pixels between the generated image and the HR ground truth.SSIM is utilized to measure the similarity including brightness, contrast, and structure between two compared images.Moreover, the SSIM measurement results are more in line with the perception of the human visual system.RMSE and CC.RMSE is the square root of the mean squared error between the predicted and actual values, which measures the magnitude of the deviation and is sensitive to outliers.The CC reflects the degree of linear correlation between the predicted and actual values.Both CC and RMSE reflect the consistency of the correlation trend with the real value.They are calculated as where I GT and I SR represent the magnetic fluxes of real observed and superresolved magnetograms, respectively.The number of samples is given by N, and the average magnetic flux over N samples are denoted as I GT and I SR for I GT and I SR , respectively.MFSS.The MFSS metric is raised to evaluate the SSIM.It is formulated by the covariance, as the covariance can represent the distribution of the structure and measure the SSIM.It is calculated by dividing the magnetic field array into small patches.For example, given a patch "x" in the generated data and the corresponding patch "y" in the real data.Then, the MFSS of the pair patched (x,y) is calculated by where c1 = (k * M) 2 is a constant to avoid the case that the denominator is 0. We empirically set k = 0.01, referring to the SSIM metrics (Wang et al. 2014).σ x and σ y denote the variances of the patch "x" and "y," respectively, and σ xy denotes the covariance between these two patches computed by where N is the maximum strength of the magnetic field, which is set to 500 in this paper.The MFSS index is computed in patches, namely, it is a patch-wise index.In calculation, we test the patch sizes of 7, 11, and 15.The visual comparisons of our MBSR method and other methods are illustrated in Figure 5, where the first row lists the LR-MDI magnetograms, the second row lists the ground truth (HR-HMI magnetograms), and the other rows are MBSR, SPSR-GAN, HighRes-Net, and bicubic method, respectively.From left to right in Figure 5, the magnetogram is observed on 2010 December 12, 3:15 UT, 2010 December 18, 4:51 UT, and 2010 December 28, 9:35 UT.It is observed that the MBSR model can generate clear neutral lines.The features of the SR-MDI magnetogram have sharper edges of the magnetic field and resemble to the HR-HMI magnetograms in both the positive and negative magnetic regions.Moreover, the generated magnetograms have some clear small-scale structures.The SPSR-GAN method generates a magnetogram with over-enhanced edges and more spurious structures (lower values of MFSS: 0.5875).The HighRes-Net method can not generate the small-scale structure and the edge is blurred.Especially, in the bicubic as a traditional superresolving method, the generated MDI magnetograms are blurred and the structures are not clear.It can be concluded that our MBSR model can generate fine image structures, and keep the fidelity of scientific data.

Quantitative Comparison
In this section, we evaluate the MBSR model on the LR-MDI magnetograms in 2010 December by comparing it with the other three methods, i.e., the bicubic method, the HighRes-Net model, and the SPSR-GAN model.The quantitative results across testing data are shown in Table 2.It can be found that the proposed MBSR model gets the best performance in terms of these five metrics.Especially, our method surpasses other methods by a large margin in terms of MFSS.The pS/N value of the MBSR model, at 33.4418 dB, is significantly higher than that of the other three models.This suggests that the MBSR model is better equipped to efficiently reconstruct and recover small-scale features compared to the other models, as it can preserve details and minimize distortions in the reconstructed image.In addition, the SSIM indices (0.8765) of the MBSR model are higher than those of the other three methods, which indicates that our method can generate MDI magnetograms that are more similar to the target ones.The MFSS (window size = 7 as the example) is 0.8806 6 The Astrophysical Journal Supplement Series, 271:9 (13pp), 2024 March Dou et al. which is higher than other methods, it turns out that the MBSR model can generate an MDI magnetogram with the least artifacts.
Especially, both small-scale and large-scale structures are well reconstructed, close to the HR-HMI, which may benefit from the multiple treatments to different complexity of the magnetic field.Furthermore, our method achieves the best value of CC (0.9350) and RMSE (21.4112), indicating that our results have a good linear correlation with the HR-HMI magnetograms, while magnetic flux in generated magnetograms closely resembles to the target magnetograms.The SPSR-GAN method fails to superresolve the MDI magnetogram.It is more likely to produce over-enhanced visual artifacts.The bicubic method is the worst concerning all these metrics.It indicates that our MBSR approach achieves good performance in terms of both image similarity and fidelity of magnetic field.
Discussion on the classification.The experimental results demonstrate that the proposed MBSR with Shannon entropy is superior to other compared methods, which implies that the Shannon entropy is also a good proxy for magnetic complexity.In conclusion, the SR of the magnetogram with the multibranch network for processing magnetic patches of different complexity is effective.
Analysis of the 2D histogram.We adopt 2D histograms to show the pixel distribution of the generated and target magnetograms.Figure 6 presents that the proposed MBSR model can preserve the magnetic flux distributions much better than other methods, where the linear fitting slope of the MBSR is 0.8895 superior to the SPSR-GAN (0.8411) and HighRes-Net (0.8655) methods.In addition, the bias of the MBSR is much higher (0.5) than the other three methods, they are 6.6, 2.4, and 3.6, respectively.The magnetograms generated by the HighRes-Net method are asymmetric in the region of +500 G, which indicates that the recovery of the method is unbalanced for the positive and negative pole regions.The histogram generated by SPSR-GAN is wider, especially in the area closer to ±500 G, and the distribution of flux is more scattered, with a lower fitting rate (0.8411).This indicates that the correlation between the magnetogram generated by this method and the observed magnetogram is poor.The quantitative effect of the GAN method in the magnetogram reconstruction task is poor, and it is more suitable for natural image processing.Although the linear fitting rate of the histogram generated by the bicubic method is close to 1, the histogram is asymmetric, indicating that the recovery of positive and negative polarity regions in the magnetic field by this method is inconsistent, with significant differences.Through more in-depth analysis, we conclude that the GAN model can generate rich textures and photorealistic results, but the fidelity to scientific data may not be satisfied.
Analysis of the difference maps.Figure 7 shows the difference maps between the reconstructed and observed  Figure 8. Plot of the difference between the HR and SR magnetograms method performs well in restoring positive poles in the AR but poorly in restoring negative poles.These results indicate that our proposed method has significant advantages in magnetic field reconstruction, especially in the restoration of ARs.
Analysis of the TUMF difference between the generated and real magnetograms better shows the TUMF difference, we draw the error curve of the TUMF difference in Figure 8 (2010 December 28 at 00:03 UT).The horizontal coordinate is the index of image patches, and the vertical coordinate gives the TUMF difference between the generated and real magnetograms.It can be seen from Figure 8, our method obtains the smoothest error curve with the least TUMF difference, indicating that our method is the best for the recovery of both quiet and ARs among all compared methods, while HighRes-Net performs the worst with the largest TUMF difference.
Analysis of the horizontal and vertical cut plots to illustrate whether the artifacts are generated across patch edges, horizontal and vertical cut plots are drawn in Figure 9 (2010 December 12 at 3:15 UT), where the horizontal/vertical cut plot is just the edge of two adjacent patches.It can be observed that the magnetogram generated by the MBSR method fits well with the real magnetogram, while the SPSR-GAN fits the worst with the real magnetogram, indicating our method performs the best without obvious edge artifact.

Ablation Study
We first conduct the ablation experiments that compare our MBSR model with several simplified SPSR models with 32, 48, 56, and 64 channels, denoted as the models SPSR-O (32C), SPSR-O (48C), SPSR-O (56C), and SPSR-O (64C), respectively.Each of the above models has five RRDB blocks.We also compare our MBSR model with the original SPSR model without GAN loss, named SPSR-O (64C-23block), which contains 23 RRDB blocks and 64 channels.The quantitative results are shown in Table 3.
Table 3 shows that MBSR outperforms other methods on almost all metrics.MBSR and SPSR-O (64C-23block) methods obtain comparable CC values.However, SPSR-O (64C-23block) uses 23 blocks and 64 channels, leading to an excessive number of parameters (3.83 × 10 4 M) and higher computational resources, resulting in longer training times.During training, this network took about 17 days to train, which is not conducive to handling massive solar observation data.In comparison, the proposed MBSR network has 1.5 times fewer parameters (2.80 × 10 4 M), and can be trained in approximately 5 days.Furthermore, on the test set, SPSR-O (64C-23block) took 593 s to test, with a test time of over 2 s per image, while MBSR only took 239 s, with a test time of only 0.8 s per image, saving more than half the time and reducing the time to the millisecond level.Therefore, the SPSR-O (64C-23block) method is not suitable for practical applications because the computational speed is too slow, which hinders the application of this technology to satellites.Experimental results also show that the number of channels is not proportional to the SR results of scientific data.This may be because magnetic maps have different features from natural images and lack the more complex semantic information that natural images have.Therefore, a network that is not too deep or too wide is required to extract semantic information.In particular, training with a complex model when dealing with QRs may lead to overfitting, which can affect SR effects.Therefore, we use 32 and 48 channels to process weak magnetic field and mediumintensity magnetic field data.
Additionally, we design a new version of our MBSR model, where the three local magnetogram patches are classified   3 shows the results between our method and the MBSR-class method.Our MBSR method outperforms the MBSR-class method in terms of all metrics.
The possible reason for this is that the threshold method directly introduces the valid and relevant knowledge of AR, while it is difficult for a classifier based on deep learning to efficiently learn this kind of knowledge.
Figure 10 shows the 2D histograms of the tested methods.It is observed that our method and SPSR-O (64C-23block) can fit the curves with the target better.Figure 11 shows the generated magnetograms taken on 2010 December 12, 19:15 UT by these methods.It can be observed that the MBSR and SPSR-O (64C-23block) methods can recover magnetograms better than other methods.
We perform the second ablation experiment to demonstrate that different image regions require different network complexities.First, we crop 32 × 32 patches from 290 test images with a stride of 28, getting a total of 6830 patches.Then, these images are divided into three categories according to the TUMF, which are separately passed through the three welltrained SR branches to test.The results are shown in Table 4, where the MBSR (32, 48, 56) performs the best for simple, medium, and complex patches, separately.This indicates that we can treat magnetic field patches differently, applying a lightweight network to process simple patches to save computational cost, and allocating more computing sources to complex patches to get better photorealistic details and high fidelity of scientific data.

Conclusions
In this paper, a multibranch network consisting of three branch networks is proposed to superresolve an LR SOHO/ MDI magnetogram to an HR magnetogram with the same resolution as SDO/HMI.The biggest benefit is that we can therefore establish a big database across two solar cycles, which is crucial to both model training of artificial intelligence and statistical analysis of solar physics.The proposed model first splits a full-disk magnetogram into small patches and classifies them into three categories according to magnetic field intensity.Then, small patches of each category are fed into the corresponding branch so that each branch of the network is separately trained.This approach can allocate computing resources more reasonably and therefore reduce computing complexity.In addition, it may train each branch more easily and fully, especially for the complex branch, both photorealistic   12 The Astrophysical Journal Supplement Series, 271:9 (13pp), 2024 March Dou et al.
details and high-fidelity scientific data can be obtained with more effort, while less effort is devoted to the simple category.

Figure 1 .
Figure 1.An example illustrating magnetic field patches of different complexity.
(2) Rotating.Applying the instrument pointing information contained in the magnetogram header file, the north of the Sun is rotated to the north of the image to normalize the orientation of the Sun in each image (Map.rotate(order= 3)); (3) Normalizing.We convert the intensity data to image data in the range of [0, 255].Normalization has several benefits, such as making the training of the network model faster, preventing the model gradient from exploding, and reducing the likelihood of the model falling into a local optimum.Our normalization is based on the extreme values of the image.Specifically, we denote the original data as I and the normalized data as I * according to the following equation:

Figure 2 .
Figure 2.An example of key feature points of the HMI and MDI magnetograms.
of the two losses.Note that, unlike the SPSR-GAN(Ma et al. 2020), our model is a non-GAN model without adversarial loss.However, it still can outperform the SPSR-GAN in terms of both magnetic field details and the main structures.

Figure 4 .
Figure 4. Distribution of TUMF of each sample over the training set.

Figure 5 .
Figure 5. Comparisons of generated magnetograms among the MBSR model, SPSR-GAN model, HighRes-Net model, and the bicubic method.

Figure 6 .
Figure 6.2D histograms of our MBSR method, HighRes-Net method, SPSR-GAN method, and the bicubic method on the testing data set with a range of −500 to 500 G. x and y axes represent the magnetic flux of the generated and target.The straight line in red represents y = x, while the dotted straight lines give the best linear fitting between x and y.

Figure 7 .
Figure 7. Difference map between the reconstructed and observed magnetograms.

Figure 9 .
Figure 9. Horizontal and vertical cut plots of a whole magnetogram compared among the bicubic, HighRes-Net, MBSR, and SPSR-GAN methods (The top row shows the horizontal cut plot, representing the edge of upper and lower patches; the bottom row shows the vertical cut plot, representing the edge of left and right patches).

Figure 10 .
Figure 10.2D histograms of our MBSR, SPSR-O(64C-23b), SPSR-O(64C), SPSR-O(56C), SPSR-O(48C), and SPSR-O(32C) methods on the testing data set with a range of −500 to 500 G. x and y axes represent target and reconstructed magnetic flux, respectively.The straight line in red represents y = x, while the dotted straight lines give the best linear fitting between x and y.

Table 1
Splitting of the Data Set for Training, Validation, and Testing

Table 2
Objective Comparisons Evaluated on 290 Test Samples Table 2 lists the MFSS values for different patch sizes.It indicates that the MFSS is related to the patch size, but not closely.Finally, the MFSS of an image is the average of all patch-wise MFSS(x, y).A higher MFSS indicates superior quality and fewer artifacts in the generated HR magnetogram.

Table 3
Quantitative Comparisons Evaluated on 290 Test Samples through a deep-learning-based classification network, and denote it as MBSR class.Table

Table 4
PSNR (dB) Obtained by Three SR Branches Note.The best results are highlighted in bold font.