1 Introduction

Sunspots are the first noticeable feature on the visible surface of the Sun. The number of spots on the Sun’s surface increase and decrease during a specific time range which is 11 years on average. This period is known as Solar Cycle or Sunspot Cycle. During the minimum phase of a cycle, no sunspots are seen, but, at the maximum phase, many sunspots can be observed on the Sun’s surface (Fig. 1). Sometimes big-sized spots are visible to the naked-eye under proper conditions. These sunspots have attracted attention through the centuries. Therefore, since the 17th century, sunspot observations are being continued without interruption.

Fig. 1
figure 1

Two typical views of a Sunspot Cycle. Left Minimum, Right maximum phase. Images were taken from the SOHO (Solar and Heliospheric Observatory) archive

One of the most known Sun observers, Galileo showed that movement of the sunspots across the apparent disk of the Sun is similar to rotating across a spherical surface, rather than a flat disk. This concept made it possible to develop a spherical coordinate system of solar latitude and longitude, similar to the latitude and longitude system on Earth. Today, two heliographic coordinates are defined: Carrington and Stonyhurst. They differ on whether the lines of longitude are fixed for the Sun’s rotation (in Carrington) or fixed for the observer (in Stonyhurst) [14]. More explanations about both heliographic coordinates can be found in the articles of Thompson [3] and Sanchez-Bajo & Vaquero [4].

More properties about the positions of the sunspot groups were discovered with increasing solar observations in the past. German astronomer Christoph Scheiner showed that the solar rotation rate varied with latitude. This meant that the Sun does not rotate as a solid body. Carrington published his observations of sunspot positions in 1863. And, he estimated the correlation between solar rotation rate and latitude [4]. In 1904, Edward Maunder showed the latitude of sunspot emergence changes from the beginning to the end of the sunspot cycle in a diagram called butterfly. All these movement behaviors of sunspot groups provide information about the Sun: e.g. the rotation period of the Sun, the nature of the solar cycle and the existence of differential rotation.

Most of observatories spread around the world are continuing to draw the sunspots manually. But, on the other hand, technological developments are making it also necessary to process these sunspot drawings in computer environment. Some of the observatories transferred their old drawings into digital environment via scanners to process them later. Some studies are done on determining the positions of sunspot groups from sunspot drawings. The most known applications are the Helio programs developed by Peter Meadows [5]. These are sufficient in some extents, but not adequate for our own needs. Moreover, similar programs are developed by different people: the program HSUNSPOTS is developed by Cristoet al. [6] to analyze ancient solar drawings and the program DigiSun is used in the SIDC of the Royal Observatory of Belgium [7].

The CAMS program which will be introduced here has been developed with a different perspective from the others. It aims to obtain as many features of the sunspot groups as possible. Moreover, not only the scanned solar drawings but also CCD and solar digital images can be used with the program by adjusting their size and resolution properly. In this program, a Stonyhurst disk overlaying technique is used. This technique gives the opportunity for calculating most of the properties of the sunspot groups easily. All operations are carried out in two simple steps, superimposing Stonyhurst disk onto image and, marking and classifying the sunspot groups separately. Most of the other processes are performed automatically such as calculating the solar parameters at the time of observation, the heliographic coordinates and other measurable parameters of the sunspot groups and, altering and sorting the groups by their latitude and longitude.

In the sunspot observations, the appearance of the Stonyhurst disk depends mainly on the P and B 0 angles. Therefore, the calculations of these solar parameters have a special importance and are introduced in detail in Section 2. The algorithm for drawing the Stonyhurst disks is explained in Section 3. And, the basics of CAMS’s workings are given in Section 4. The advantages, importance and possible future developments of the CAMS are presented in the Discussion Section.

2 Calculations of the solar parameters

Any coordinate system used in astronomy must be set up using a plane and a starting point. For heliographic coordinates the plane in question is the equator of the Sun, but the starting point is a little difficult to describe, because there are no permanent features on the surface of the Sun, which can be taken as a fixed point. Carrington defined this virtual point as a point occupied by the ascending node of the solar equator on the ecliptic at noon on January 1st 1854. By this assumption, heliographic coordinates of a point on the surface of the Sun are defined by the spherical definitions as shown in Fig. 2a [9].

Fig. 2
figure 2

a Definition of the heliographic coordinates of a point X on the surface of the Sun according to the spherical definitions. b Position of the rotation axis of the Sun with respect to the rotation axis of the Earth and north & south line of the solar projection disk

The line of sight is shown by the line towards the Earth in Fig. 2a and it shows the direction to the center of the apparent solar disk, which is labeled as E in Fig. 2b. Also, the rotation axis of the Sun is shown by E P N line and the angle between this line and the rotation axis of the Earth is P, the position angle of the Sun. The angle \(\widehat {FCE}\) is the latitude angle B o and represents the angular distance of the Sun’s equator from the center of the apparent solar disk. In accordance with the definitions as shown in Fig. 2a, the starting longitude L o (point O) and B o are calculated by [8]

$$\begin{array}{@{}rcl@{}} L_{o} &=& \arctan \left( \tan (\lambda_{\odot} - {\Omega}) \cos I \right) + M ,\\ B_{o} &=& \arcsin \left( \sin (\lambda_{\odot} - {\Omega}) \sin I \right) , \end{array} $$

where Ω is the angle between the ascending node of the Sun’s equator on the ecliptic and the point of the vernal equinox (ΥN angle), λ is the ecliptical longitude of the Sun, I is the inclination of the Sun’s equator with respect to the ecliptic plane and its value is 7.25°. M is the angular distance of the ascending node of the Sun’s equator on the ecliptic from the starting longitude. Here, M is given by [9]

$$\begin{array}{@{}rcl@{}} \begin{array}{ccc} M = 360 - M^{\prime} & \text{with} & M^{\prime}= \frac{360}{25.38} (JD - 2 398 220.0) \end{array} \end{array} $$

where JD is the Julian date for the day in question, 2 398 220 is the Julian date at noon on 1 January 1854. M′ must be reduced to the range 0 - 360 degrees.

P is the angle between both rotation axis directions of the Sun and the Earth. But, this cannot be calculated directly. Therefore, both axis inclinations with respect to ecliptic are calculated separately and P is the sum of both. So, let θ 1 be the inclination of the Earth’s axis and let θ 2 be the inclination of the Sun’s axis. And, P is given by [8]

$$\begin{array}{@{}rcl@{}} \begin{array}{ccc} \quad P = \theta_{1} + \theta_{2}&\quad \qquad \text{with} \quad \qquad & \begin{array}{cc} \theta_{1} &= \arctan (-\cos \lambda_{\odot} \tan \varepsilon ) ,\\ \theta_{2} &= \arctan \{ -\cos (\lambda_{\odot} - {\Omega})\tan I \} , \end{array} \end{array} \end{array} $$

where ε is the angular distance of the Earth’s rotation axis from the ecliptic plane. More detailed explanations are given in the Textbook on Spherical Astronomy of Smart & Green [8].

In general, Ω, λ and ε are changing with time. Therefore, these parameters should also be calculated at the time under consideration and they are given by [9]

$$\begin{array}{@{}rcl@{}} {\Omega} &= &75^{\circ} 46^{\prime} + 84^{\prime} T ,\\ \varepsilon &=& 23^{\circ} 26^{\prime} 21.45^{\prime\prime} - 46.815^{\prime\prime} T - 0.0006^{\prime\prime} T^{2} + 0.00181^{\prime\prime} T^{3} ,\\ \lambda_{\odot} &=& \frac{360}{365.242191}T + \frac{360}{\pi}e \sin \left\{ \frac{360}{365.242191}T + \varepsilon_{g} - \varpi_{g} \right\} + \varepsilon_{g} , \end{array} $$

with

$$\begin{array}{@{}rcl@{}} \varepsilon_{g} &=& 279.6966778 + 36000.76892\hspace{0.05cm}T + 0.0003025\hspace{0.05cm}T^{2} ,\\ \varpi_{g} &=& 281.2208444 + 1.719175\hspace{0.05cm}T + 0.000452778\hspace{0.05cm}T^{2} ,\\ e &=& 0.01675104 - 0.0000418\hspace{0.05cm}T -0.000000126\hspace{0.05cm}T^{2} , \end{array} $$

where T is the number of Julian centuries since the epoch 2000 January 1.5, ε g is the mean ecliptic longitude of the Sun at the epoch, ϖ g is the longitude of the Sun at perigee and e is the eccentricity of the Earth’s orbit around the Sun.

3 Preparation of the Stonyhurst disk

In order to form a Stonyhurst disk on an image, it is necessary to form a two-dimensional projection of a three-dimensional sphere. But only half of the sphere or the visible side of the sphere must be taken into consideration. Let this sphere be indicated in Fig. 3a. If N is any point on this sphere and its spherical coordinates in three-dimensional space are the radius of the sphere (r), latitude angle (θ) and longitude angle (φ), its Cartesian coordinates (x, y, z) are given by [12]

$$\begin{array}{@{}rcl@{}} \begin{array}{cc} x &= r \cos \theta \sin \varphi ,\\ y &= r \sin \theta ,\\ z &= r \cos \theta \cos \varphi , \end{array} \end{array} $$

where the angle θ is selected between −90° and +90° and, the angle φ is selected between 0° and 180° [8]. These three-dimensional (3D) coordinates have to be converted to two-dimensional (2D) coordinates to draw the Stonyhurst disk depending on P and B o parameters of the Sun. These are done with the well known transformation and projection equations [1013]. Let us assume that an angle is rotated in the anti-clockwise direction of its positive and in clockwise direction of its negative values. And also, let us assume that P and B o angles are positive. First, the x axis is rotated B o degrees and x 1, y 1, z 1 values are obtained, and then, the z axis is rotated P degrees and x 2, y 2, z 2 values are obtained (Fig. 3b). These equations are specified as follows [10]

$$\begin{array}{@{}rcl@{}} \begin{array}{cccc} x_{1} &= x , &\hspace{1cm} x_{2} &= y_{1} \sin P + x_{1} \cos P ,\\ y_{1} &= z \sin B_{o} + y \cos B_{o} , & y_{2} &= y_{1} \cos P - x_{1} \sin P ,\\ z_{1} &= z \cos B_{o} - y \sin B_{o} , & z_{2} &= z_{1} , \end{array} \end{array} $$

Here, x 2 and y 2 are the 2D projection coordinates of the point N with respect to the sphere center. When these are rearranged, we get

$$\begin{array}{@{}rcl@{}} x_{2} &=& (z \sin B_{o} + y \cos B_{o}) \sin P + x \cos P ,\\ y_{2} &=& (z \sin B_{o} + y \cos B_{o}) \cos P - x \sin P , \end{array} $$
Fig. 3
figure 3

a Spherical (r, θ, φ) and Cartesian (x, y, z) coordinates of the point N in three-dimensional space. b Projection coordinates of the point N are expressed as x 2,y 2 and z 2 in the \({x^{\prime }y^{\prime }z^{\prime }}\) projection system. Here, z axis (blue) is rotated P degree and x axis (blue) is rotated B 0 degree. Also, blue colored circles represent the rotated planes of the point N

Since the zero point of the screen coordinates in the computer environments is the top-left corner, the x-axis’s value is increasing from the left to right of the screen and, the y-axis’s value is increasing from the top to bottom of the screen, Therefore, the center of the any solar disk image on the screen does not coincide with the zero point of the screen coordinates. Hence, in order to draw the sphere onto solar image, the center of the sphere must be moved to the center of the solar disk image. This is done by adding x and y-axis values of the screen coordinates of the center of the solar disk image to the x and y-axis values of the all points of the sphere separately. Let x p and y p be the screen coordinates of the point N. The following equations are obtained with the explanations above:

$$\begin{array}{@{}rcl@{}} \begin{array}{ccccc} x_{p} &= x_{0} + x_{2}, &\hspace{1cm} x_{p} &=& x_{o} + (z \sin B_{o} + y \cos B_{o}) \sin P + x \cos P ,\\ y_{p} &= y_{0} - y_{2} , & y_{p} &=& y_{o} - (z \sin B_{o} + y \cos B_{o}) \cos P + x \sin P , \end{array} \end{array} $$

where x 0 and y 0 are the coordinates of the disk image center in screen coordinates. The subtraction is carried out in y-values because of the increase in the reverse direction contrary to the Cartesian system. With these projection equations, Stonyhurst disk can be prepared with any values of P and B o . As an example, the Stonyhurst disk for B o = 5° and P = 0° values is shown in Fig. 4a. This is compared with the one used in the observatory (Fig. 4b) and their can be seen agreement in Fig. 4c. Also, other Stonyhurst disks (for B o = 0, 1, 2, 3, 4, 5, 6, 7°) were checked as well and exact fits were obtained.

Fig. 4
figure 4

a Stonyhurst disk prepared for B o = 5° in computer. b Plastic Stonyhurst disk with the same B o . c Two disks superposed

4 Computer-aided process of the solar drawings

CAMS is mainly designed to process the daily solar drawings, and the interface is presented in Fig. 5. All processes are performed in this window, such as a new process, checking the previous processes, calculation of the solar parameters and transferring the results of the process to the web. Processing the solar drawing has two stages. First stage is the transferring the drawing into the program and superposing the Stonyhurst disk onto it. The second stage is the determining the heliographic coordinates of each sunspot group besides other features like the group length and tilt angle.

Fig. 5
figure 5

CAMS main window with an example of the transferred sunspot drawing. The solar parameter calculation and image quality selection windows are seen at the bottom, respectively

4.1 Transferring the solar drawing into program and superposing Stonyhurst disk on it

After all sunspots on the solar surface are drawn manually on the observation paper, the processing stage starts with the calculation of the solar parameters by entering date and time of the observation in the parameter calculation window. Then, the drawing is transferred into the program by using the scanner interface. After this is done, the center and a point on the outer border of the drawing disk must be marked, respectively. A circle representing the size of the Stonyhurst disk is imposed spontaneously over the image (Fig. 6). Conformity between circle and disk is checked visually by changing the radius and by shifting the center of the circle. Also, the location of the North point of the drawing is adjusted properly by the arrows of the positioning window. After approval of conformity between circle and disk, the cleaning of the outer region and the clipping process of the image is carried out and, the image is transfered into the measurement window.

Fig. 6
figure 6

Defining the center and radius of the circle represent the size of the Stonyhurst disk over the image of the drawing

4.2 Measuring the heliographic coordinate of the sunspot groups

Stonyhurst disk is drawn automatically over the clipped image of the drawing for the time of observation entered before as seen in Fig. 5. This disk can be redrawn again, if needed, by readjusting the date or the time of the observation on the date & time section of the program. The measurement process is started by passing big picture mode of the measurement window and the big-sized image of the drawing is loaded into the window. When the mouse moves over the Stonyhurst disk, a spherical cursor will appear and display its position in apparent heliographic coordinates. The sunspot group to be processed is marked as an enclosed rectangular area with this spherical cursor. Some stages of this process are shown in Fig. 7a.

Fig. 7
figure 7

a Marking the sunspot group using an enclosed rectangular frame. The beginning, middle and last sequence of the stage. b The adjustment can be made easily by moving the handles on the border of the frame

The rectangular frame’s edges should be as narrow as possible while containing the whole group. This proximity can be adjusted more precisely by moving the small handles placed on four edges of the frame, after the marking process is completed (Fig. 7b). Then, a group information window is displayed on top-middle of the measurement window showing all information about the sunspot group. The coordinates at the center of this rectangular frame are the heliographic coordinates of the sunspot group. Its latitudinal and longitudinal width is the height and length of the group, respectively. The type of the group and the number of the sunspots are entered by selecting proper values from the dropdown lists (Fig. 8a). If an A-type group which has a length smaller than 1° is encountered, point source measurement is fulfilled by touching to the center of the group. No length, tilt angle and rectangular area for the group is calculated in this case (Fig. 8b).

Fig. 8
figure 8

a Selecting the type of the group and the number of the sunspot with the drop-down lists. b Measuring the point like sunspot and information about it. Fine adjustments are done using the arrow buttons. c Positioning the tilt line according to the tilt direction of the group

The tilt angle of the group is adjusted by pressing the E symbol on the top-left corner of the group’s frame. A line with two small handles at its ends appears in the middle of the frame. Then, the inclination of this line is adjusted by moving these handles in proper position to indicate the tilt direction of the group (Fig. 8c). Adjusting the tilt is concluded by pressing again the E symbol again. After all the sunspot group are marked and processed individually (Fig. 9), all data about the observation is saved into the database of the program and sent to web page server of the observatory. Detailed information about the CAMS and steps of the processing the observations with CAMS are given in the Çakmak’s symposium proceeding [14].

Fig. 9
figure 9

A finished observation process example that all the sunspot groups are measured. Left Calculated values for the sunspot groups. Right Rectangular frames of the groups with the corresponding sequence number

As an example of the precision of the CAMS, the comparative measurement values of a sample observation day is listed in the Table 1. Image of the solar drawing of this day is shown in Fig. 10. Old-dated solar observation is specially selected to show the capability of the built-in solar ephemeris of the program. In this table, the measurements of the both plastic Stonyhurst disk and CAMS are given for every sunspot group separately. The last two columns of the right panel are the values calculated with CAMS, latitudinal length and tilt angle of the sunspot group, respectively.

Table 1 The comparative measurement values of a sample observation day
Fig. 10
figure 10

Solar drawing of the observatory taken in 1989.12.19. Stonyhurst disk is superimposed for the time of the observation, 09:45 UT

5 Discussion

Nowadays, i.e. in the computer age, observation techniques, calculation steps and archiving the obtained knowledge are important and essential. From this perspective, the main purpose of CAMS is the shortening the time spent on processing the observation and to eliminate possible observer errors from the calculations. Second purpose is calculating the heliographic coordinates, latitudinal and longitudinal length, tilt angle and the rectangular area of the sunspot groups more precisely than manual measurements. Therefore, the measured values are saved with two decimals. When working on the positions of the sunspot groups, increasing the numerical precision in the coordinates gives a more accurate approach in the calculations. For example, in the butterfly diagram, the distributions of the sunspot groups with latitudes will appear to be more accurate instead of being concentrated on the latitude lines.

Another point of the CAMS is that the Stonyhurst disks are drawn at the true angle of the latitude angle instead of the nearest integer value. That is to say, it is drawn at the angle, for example, 7.12° or 7.25° or 7.57° or 7.92°, so not just for 7.0°. The same is valid for the position angle, as well. Although CAMS is designed to process daily solar drawings, any digital solar image can be used by the program. Two examples of this are shown in Fig. 11. One is a HMIIF (Helioseismic and Magnetic Imager Intensitygram - Flattened) image of the Solar Dynamics Obsevatory, and the other is the chromospheric H-Alpha image taken with CCD at the university observatory. The heliographic coordinates of the sunspot groups can be measured more precisely with respect to the drawings. This can be done to obtain more accurate results or to eliminate the drawing errors of the observers in their studies.

Fig. 11
figure 11

Examples of the using digital solar image with CAMS. Left A HMIIF (Helioseismic and Magnetic Imager Intensitygram - Flattened) image of the Solar Dynamics Observatory (SDO). Right A chromospheric H-Alpha image taken with CCD at the Istanbul University Observatory

The development of CAMS is still continuing and the integration with the database is under development. After this is done, it will be possible to obtain any group’s evolution separately and all statistical information about the positions and types of the sunspot groups. Also the daily, monthly changes and general trend of the sunspot relative number can be easily generated graphically. Since the relative numbers are archived by making a distinction between the Northern and Southern, the variations of the relative number in both will be also examined separately. After sufficient data is gathered, the whole solar sunspot cycle will be analyzed in detail.