SPECTRAL CHANGES IN AT MICROSCOPII ATTRIBUTED TO FLARING Adam Clarke

2011

Abstract Spectroscopic analysis of AT Microscopii has been conducted during a period of flaring with estimated increase of three. The spectrum is shown to undergo considerable changes including doppler broadening, area increase and some potential pattern in peak value which require further analysis to confirm. Delayed changes in the full width at half maximum compared with the continuum is linked to flare activity triggered by single magnetic loop formation. A decrease in peak wave- length of approximately six angstroms has been detected and cannot be determined to be either physical or erroneous in nature without further analysis and observation. −1 The FWHM is converted to a velocity change of ∆VH gamma = (92.100±5.700)kms −1 and ∆VH delta = (122.000±24.000)kms from quiescent level to the maximum value during the flare outburst.

1 Contents

1 Introduction 3 1.1 What is a dMe Type ? ...... 3 1.2 Flares ...... 3 1.2.1 Rise Time ...... 3 1.2.2 Decay Time ...... 3 1.2.3 Decay Time Constant ...... 4 1.3 AT Mic ...... 4 1.4 Data Reduction ...... 5 1.4.1 Debiasing ...... 5 1.4.2 Flat Fielding ...... 5 1.4.3 Other Reduction Techniques ...... 5

2 Methodology 5 2.1 IRAF ...... 5 2.1.1 Image Reduction ...... 5 2.1.2 Spectra Extraction using IRAF ...... 6 2.1.3 Wavelength Calibration Using IRAF ...... 7 2.2 IDL ...... 10 2.2.1 Reading in the Calibrated Files ...... 10 2.2.2 Curve Fitting ...... 11 2.2.3 Area ...... 11 2.3 Time ...... 12 2.4 Wrapper ...... 12

3 Results 12

4 Analysis 15

5 Discussion 19

6 Conclusion 20

7 Acknowledgements 21

A IDL Functions and Procedures 23 A.1 Averaging FITS ...... 23 A.2 Line Fitting ...... 24 A.3 Area ...... 25 A.4 Time ...... 26 A.5 Wrapper ...... 27 A.6 Multiple Plots ...... 28

2 1 Introduction

In this paper observations of dMe type star AT Microscopii (AT Mic) are considered during periods of flaring, in particular with a flare of estimated magnitude increase of three. Comparison with quiescent period spectroscopy to the period of flaring, was conducted to determine any changes attributed. During the period of flaring Doppler Shifting or broadening is expected which would indicate matter being accreted either toward or away from the line of observation, or in the case of broadening could indicate atmospheric turbulence. The change in magnitude and the ratios between quiescent and outburst levels are also considered to determine trends between the two.

1.1 What is a dMe Type Star?

Stars are classified dependant on their spectral type and the Harvard system, founded by Cannon and Pickering [1912], which lists them in order of atmospheric temperature. An “M” type star on its , like AT Mic, typically has a temperature of ≤ 3,700K and is red in visual colour. The preceding “d” marks it as a dwarf star and the succeeding “e” specifies that the star has emission lines.

1.2 Flares

Stellar activity is based upon the rotation of . Rapidly rotating stars seem to offer more activity than those with longer rotational periods due to a magnetic dynamo type effect. One type of activity associated with rotation is flaring. Flares occur when magnetic energy in the stellar atmosphere is suddenly released, relating to a sudden increase in brightness of the star. Flares have many features associated with them;

1.2.1 Rise Time

The rise time of a flare is defined as the time taken for the intensity of the star to be enhanced from the quiescent level to its maximum intensity. Because of the natural variation in some stars a flare is defined as the scenario where at least two consecutive observation points lie 3σ above the average quiescent intensity, where σ is the standard deviation of the quiescent stars level, taken during the same observations.

1.2.2 Decay Time

The decay time is the time taken between the peak of the flare period intensity and the end of the flare, located when the intensity returns to the quiescent intensity. Due to the nature of flares, the decay time is much longer than the Rise Time which leads

3 to difficulty in estimation, since stars observed can often have set before the star has returned to quiescent levels.

1.2.3 Decay Time Constant

Hence it is much preferable to ascertain the decay time constant, which is defined as the time taken for the flare to decrease in intensity by a factor of (1/e) This is fitting since the flare decay often fits an exponential decay. Whilst the scope of this experiment is not to determine the values of this constant, its exponential nature will help confirm that the observations are of a flare event.

1.3 AT Mic

AT Mic is a visual binary system both of which are of the type dMe. Table 1 specifies its significant properties necessary for observation. This particular star was observed by a team consisting of myself and four colleagues, using the 1.9m Grubb-Parsons telescope, situated at the South African Astronomical Observatory as part of a UCLan funded student experience. Time-sampling intervals of 1000 seconds were taken, until flaring was detected using a secondary 0.5m telescope conducting real time . Upon detection of flaring the time-sampling period was reduced to a period of 500 seconds for approximately 2.5 hours, which should cover the flare and the stars return to quiescent level. AT Mic was not being observed at the onset of flare, instead once a flare was detected using the smaller photometric telescope the larger telescope had to be manoeuvred to the flaring target. This meant that the spectroscopic data will not show the two consecutive points at 3σ, however since the photometric data does show this, we can say with certainty that a flare is being observed.

Table 1: Observational Data for AT Mic Name AT Mic RA 20 41 51.1586 Dec -32 26 06.830 Visual Magnitude 10.25 Spec Type. M4Ve

4 1.4 Data Reduction

The spectroscopic data from the telescope needed to be reduced to remove additive effects such as background noise and differences in pixel sensitivity. For the SAAO data gathered this comprised of debiasing and flat-fielding.

1.4.1 Debiasing

The bias level is an offset added to the signal readout of the CCD which makes sure the input value to the Analogue-to-Digital converter is always positive [Kilkenny and Worters, 2010]. It is an intrinsic noise which must be subtracted from all output CCD images. This is done by taking bias-frames, 0 second exposure readouts, averaging these and subtracting it from the objective CCD images.

1.4.2 Flat Fielding

CCD response varies across the instrument, resulting in individual pixels have differing sensitivities. To overcome this, flat fields are taken during observations of photomet- rically flat source. In the case of the data gathered at SAAO, the 1.9m telescope was positioned targeting a white section of the dome, which was illuminated uniformly. Once several flat field images are found, an average is taken, and then all objective CCD frames are divided through resulting in a constant level of sensitivity across the images.

1.4.3 Other Reduction Techniques

Dependant on the instrument used, there is sometimes a requirement for Dark frames to be taken. However due to the nature of the SAAO CCD used and its cooling levels, this is not a necessity for the data gathered. The SITe CCD used had a dark count of a few counts per pixel per hour and so this can be ignored.There was also a slight issue with the spectrograph becoming slanted during observations, for some unknown reason, which needed to be extracted with care to avoid loss of data.

2 Methodology

2.1 IRAF

2.1.1 Image Reduction

As described earlier, the first part of the project involved taking raw telescope data and correcting the CCD frames for additive effects. Many modern computing programs are

5 available across differing platforms, one of the more widely available being the Image Reduction and Analysis Facility (IRAF) created by the National Optical Astronomy Observatories (NOAO). This is free-ware and is renowned for its cross-platform compat- ibility. IRAF is no longer supported by an official funded team, and as such technical support is given by volunteers. Since the program was not available on the university network, it had to be installed on a personal laptop. Problems with the downloaded binaries and the installation script, coupled with volunteer based support created un- foreseen delays in the beginning of the data analysis, although the problems that arose gave good experience of the issues astronomers can have to deal with, when installing older programs that have passed out of funded service and maintenance. IRAF is set up to work for certain CCD types “out of the box” however parameters had to be refined to work with the header information set by the SAAO telescopes. This mainly comprised of editing translation tables so that IRAF could understand the SAAO specific header information. This was needed for specific packages, for example allowing the program to determine the difference between flat, image and bias frames. Over the period of the observing week bias frames were taken which needed to be com- bined to form a master bias. This was done using the zerocombine procedure within the noao, imred, ccdred package. Similarly the flat fields were combined to form a master flat, using the flatcombine procedure within the same package. As previously mentioned the CCD is of high enough quality that the dark count can be assumed negligible. Now all the master correction files had been created, they were applied to the object frames. This was done by running the ccdproc procedure. In short this takes each object frame, subtracts the master bias and then divides through by the master flat. The output is then a object file which has negligible additive effects which can now be used for scientific purposes which overwrites the original files. Therefore care must be taken at this stage to have a backup of the raw telescope data in case of error.

2.1.2 Spectra Extraction using IRAF

At this stage however the images are still CCD exposures with the spectral dispersion being along the horizontal pixel direction, and the spectrum being located approximately in the middle of the CCD. It was necessary to extract the spectrum, although this was complicated by the aforementioned slanting of the spectra. Consider first the ideal situation of a spectra dispersed horizontally over 5 pixels across the middle of the CCD. IRAF can be made to simply define an aperture, in this case one would pick six pixel diameter to lower any data loss, and specify the centre pixel of the spectrum. The procedure built into the program would then start at one end of the CCD, and move the aperture across whilst reading the counts, producing a spectrum. However the inclusion of a slant meant that this simple method would not prove success- ful without dramatic loss of data. Instead, once the aperture had been defined, it was necessary to form a trace profile to track the dispersion through the slant. Essentially

6 the trace determines the shape and behaviour of the aperture as it moves along the dis- persion axis. Once the aperture has been defined, using IRAF’s interactive cursor mode, the trace is generated, and is shown in Figure 1. This shows a slant of approximately 4 pixels across the whole CCD, and shows the user defined fitting line. The aperture diameter is set to allow for all points which are within one pixel of the fitted line. This then means the extracted spectra will have the maximum possible data retention. Be- cause the slant changed over the observing periods, this trace had to be checked for each exposure to make sure all the data was being extracted, reducing any automation the program could have achieved if the spectra were not slanted. The output once the trace is completed is a one dimensional fits file.

Figure 1: IRAF Trace showing slanted spectra and fitted extraction line.

2.1.3 Wavelength Calibration Using IRAF

The final part of the preliminary data reduction is to calibrate the wavelength scale, the flux scale being left uncalibrated since this project is mainly interested in relative changes between the ratio’s of the levels between quiescent and activity periods. Usually one would take a catalogue spectra of the arc lamp used for the arc exposures and look for patterns in the spacings of the lines (the relative heights being variant between different lamps). However the spectrum in this wavelength region of the CuAr arc is very cluttered and because of this, it is rather difficult to identify lines.

7 Instead a logical system was implemented to try and conceive a wavelength calibration. It is known the that Balmer lines will be broadened during the period of flaring. There- fore inspecting a flare spectrum should easily show at a glance which lines are Balmer in origin. An example flare spectrum is shown in Figure 2 with the pixel values of the Doppler broadened lines marked. The differences between the pixel counts of the broadened lines was determined and this is summarised in Table 2.

Table 2: Pixel Differences for Flare Spectra Line Pixel Location (Pixel) Differences (Pixels) Ratio 1 649 470 2 1119 1.8287 257 3 1376

Then catalogue values for the Balmer series were compared with the values in Table 2 with the principle being that one ratio would coincide with the ratio 1.8287. The catalogue values are shown in Table 3.

Table 3: Wavelength Differences for Comparison Spectra Line Wavelength (A)˚ Differences (A)˚ Ratio

Hβ 4861 520 Hγ 4340 2.1757 239 Hδ 4101 1.8244 131 H 3970

8 Figure 2: Example Flare Spectra with Pixel Counts shown for Broadened Balmer Lines.

Knowing the wavelengths of the three lines, hydrogen delta, gamma and epsilon, allow the spectra to be wavelength calibrated. This is done by opening any spectrum in IRAF and identifying the wavelengths of two or more lines using the interactive cursor mode. IRAF then iterates and finds the best fit for the data. The more line values the user adds, the more accurate the iteration should be. Once the lines are identified, IRAF creates a file which can then be applied to all the other frames. This calibrates them to the defined scale, and also changes it so that, as is more traditional, the x-axis increases with wavelength. An example of a calibrated, quiescent spectrum is shown in Figure 3.

9 Figure 3: Calibrated Quiescent Spectrum

2.2 IDL

At this stage, since all of the reduction and calibration had been completed, IRAF was no longer sufficient to continue with the data extraction and processing. As such the Interactive Data Language (IDL) package was utilised, and this was readily available on the university starlink network. This distribution also includes the Solar Software packages (SSWIDL) which have many pre-defined, user created procedures and functions for dealing with astronomical file formats.

2.2.1 Reading in the Calibrated Files

The first requirement for IDL was to be able to read in the FITS files from IRAF. The technicality behind this, was that the files output are only one-dimensional counts. Using the READFITS function in the SSWIDL libraries imported the spectrum as expected, but the wavelength scale was reverted back to a channel count number. Further in- spection of the files and IRAF documentation showed that the wavelength calibration is stored under two additions to the header, CRVAL1 and CDELT1, being the wavelength coordinate of the first pixel and the wavelength interval per pixel respectively.

10 Furthermore, an average quiescent spectrum was required and as such it was necessary to write a function. IDL is a command line programming language, and it is possible to write instructions manually, but the creation of procedures and functions help to automate the process, which saves time for tasks which are to be repeated on multiple data sets as well as allowing for better debugging of errors. The function written can be found in A.1 and the code itself has been commented to guide the reader through the commands. In short, the user to specifies a file or files to be read in and the function reads in the data and averages across all files if multiple were specified. Naturally the code also performs the average if single files are specified, though this has no effect on the spectrum since it divides by unity. This makes the procedure more generic. The header is then inspected to extract the wavelength scale and exposure time, so the spectrum can be normalised, removing any effect of differing exposure times. Finally the spectrum is plotted so the user can check for consistency, i.e. null input data or the presence of a cosmic ray. Because the function has been written in a way where most of the required data is taken from the header, this function should be readily available for use with other CCD’s from differing observatories with little or no adaptation.

2.2.2 Curve Fitting

Now IDL has extracted both the counts, and the wavelength value for each pixel, mea- surements can be made on the data. For the spectral analysis it was useful to consider the full width at half maximum (FWHM), area, peak and continuum level. The easiest way for IDL to ascertain these values is to fit a gaussian to the spectral lines. SSWIDL libraries contain many functions already written that allow the fitting of data, the most documented and reliable being MPCURVEFIT. This requires multiple inputs, the user must specify their own gaussian description function, weights for each point and initial guesses which the procedure uses to iterate from. Danielle Bewsher provided a gaussian description function which has been tested thoroughly. The weights for each point in this scenario are all equal and so an array must be created with the same number of elements as the FITS file, with all the values being equal to one. A function was written to automate the creation of initial guesses, and running the curve fitting, then outputting the final results for peak, centre, width and background as well as statistical uncertainties in the values. This can be found in A.2 and once again, the function has been commented to guide the reader through the code.

2.2.3 Area

Finding the area under the peaks gives an indication of the energy contained within the line, which during a flare would be expected to increase overall. This is as simple as

11 creating a function which loops over the whole histogram of the peak, summing the value multiplied by the change in wavelength. It should be noted that this area also includes the continuum area, and for a more detailed analysis this would have to be removed, which will be discussed later. The function written to calculate the area can be found in A.3.

2.3 Time

Since the overall aim of this project was to compare and contrast the spectral line characteristics over the period of the flare and prior to activity the values attained so far are going to be compared as a function of time. Therefore it was necessary to create a function that inspected the headers of the FITS files and extracted the date in MJD at the start of the exposure. It was not necessary to extract the value for exposure time, since at this stage all the exposures had been normalised to one second. The function is given in A.4.

2.4 Wrapper

At this point considerable processing time was saved by the creation of a wrapping function as given in A.5. This in principle calls on all aforementioned functions and procedures, and allows batch processing of all the steps for a specific data set.

3 Results

Two lines were analysed, the Hydrogen Gamma line, which is the most intensive in the spectrum and the Hydrogen Delta line. The results gathered are given below”

12 Time Peak Peak Error Centre Centre Error Width Width Error Background Background Error Area (MJD-55405) (Counts) (Angstroms) (Angstroms) (Counts) (Uncalibrated) 0.00000 65.9750 1.19132 4342.37 0.0090943 0.507870 0.0119825 10.5193 0.244756 233.665 0.01902 99.1422 1.00568 4334.57 0.0107200 0.945285 0.0116443 39.4404 0.248224 1119.94 0.03019 99.4371 0.99713 4334.61 0.0107784 0.961084 0.0117063 21.7919 0.248828 728.547 0.03716 116.821 1.13019 4334.61 0.0083571 0.826668 0.0101856 21.7206 0.244991 729.456 0.04583 116.036 1.19009 4334.55 0.0082184 0.776586 0.0101933 19.2494 0.243236 657.800 0.05436 100.698 1.54816 4334.55 0.0092599 0.676312 0.0137288 17.7749 0.240970 569.472 0.06234 97.3072 1.71757 4334.59 0.0091721 0.668407 0.0157123 17.5286 0.241585 556.233 13 0.06868 121.563 1.35980 4334.56 0.0075666 0.720398 0.0106230 19.0467 0.242132 646.856 0.07654 140.278 3.05950 4334.61 0.0066448 0.596644 0.0159092 18.4038 0.241050 621.960 0.08354 125.988 4.18765 4334.61 0.0081034 0.569322 0.0216112 19.7592 0.240813 621.983 0.09164 176.757 10.6384 4284.92 0.0778760 0.343223 0.0298459 15.7776 0.235702 541.115 0.09792 135.645 2.72083 4334.58 0.0075414 0.598402 0.0148441 19.9679 0.240200 650.865 0.10580 98.9482 1.28786 4334.46 0.0100712 0.686891 0.0112810 19.2934 0.239714 603.270 0.11206 110.776 3.60427 4334.55 0.0150232 0.559717 0.0209129 19.0071 0.238811 580.995 0.12001 129.640 51.6369 4334.59 0.0560858 0.431252 0.1164850 19.4602 0.237880 567.549

Table 4: Results for the Hydrogen Gamma Spectral Line Time Peak Peak Error Centre Centre Error Width Width Error Background Background Error Area (MJD-55405) (Counts) (Angstroms) (Angstroms) (Counts) (Uncalibrated) 0.00000 22.4077 0.91598 4111.51 0.0328961 0.71074 0.0348377 3.79184 0.254648 93.8737 0.01902 34.4160 0.84011 4105.89 0.0370475 1.34835 0.09384381 8.6695 0.264533 535.251 0.03019 31.1404 0.74119 4105.70 0.0470379 1.77976 0.0524443 8.53741 0.286952 330.496 0.03716 43.1374 0.84422 4105.75 0.0294021 1.33418 0.0315867 5.03591 0.263882 324.661 0.04583 43.0164 0.89751 4105.87 0.0276248 1.17164 0.0293768 7.59553 0.256772 296.765 0.05436 34.5024 0.95206 4105.89 0.0324287 1.04052 0.0345150 6.70499 0.251582 240.439 0.06234 40.1008 0.94126 4105.87 0.0282142 1.06299 0.0299498 5.02212 0.252411 219.534

14 0.06868 47.9352 0.98582 4105.83 0.0225333 0.97054 0.0239820 6.34508 0.248898 258.987 0.07654 51.3498 0.95769 4105.76 0.0216116 1.02131 0.0227381 5.17923 0.250649 247.668 0.08354 41.9027 0.98138 4105.78 0.0258423 0.97285 0.0272078 5.80263 0.248828 232.383 0.09164 43.5402 1.01916 4105.81 0.0240369 0.91230 0.0257207 5.66479 0.246787 226.674 0.09792 46.5618 0.99355 4105.77 0.0229665 0.94821 0.0241367 6.10838 0.247885 247.729 0.10580 37.0770 1.03177 4105.77 0.0278355 0.87968 0.0291975 5.78931 0.245376 211.658 0.11206 32.0121 0.97354 4105.68 0.0339869 0.977872 0.0351451 5.67614 0.248757 205.832 0.12001 31.3904 1.01675 4105.69 0.0330864 0.879101 0.0331768 5.28109 0.244884 187.672 0.12872 29.8891 1.03065 4105.79 0.346208 0.888243 0.0367469 4.20949 0.245815 161.001

Table 5: Results for the Hydrogen Delta Spectral Line 4 Analysis

The first thing to note is that the width given in the results tables is in fact the gaussian width and not the FWHM. In one dimension, a Gaussian is the probability density function of a distribution given by:

1 2 2 f(x) = √ e−(x−µ) /2σ (1) σ 2π

The FWHM is found by considering the points at half maximum value. The scaling factor preceding the exponent can be ignored and thus we need to solve:

2 2 1 e−(xo−µ) /(2σ ) = f(x ) (2) 2 max

But f(xmax) occurs at xmax = µ thus:

2 2 1 1 e−(xo−µ) /(2σ ) = f(µ) = (3) 2 2

Solving:

2 2 e−(xo−µ) /(2σ ) = 2−1 (4)

−(x − µ)2 o = − ln 2 (5) 2σ2

√ ∴ xo = ± 2 ln 2 + µ (6) √ Thus FWHM ≡ x+ − x− = 2 2 ln 2σ. Further analysis was achieved simply by plotting these values as a function of time to try and determine if there are any recurring patterns between the two lines. With the need to incorporate the above mathematical conversion from gaussian width to FWHM it was once again simpler to automate the process of plotting the graphs using a procedure. This is given in A.6 and the graphical outputs are given below:

15 Figure 4: Hydrogen Gamma Properties as a function of Time 16 Figure 5: Hydrogen Delta Properties as a function of Time 17 Figure 6: Hydrogen Gamma Area as a function of Time

Figure 7: Hydrogen Delta Area as a function of Time

The errors on the area graphs are comparable with the data point sizes. All errors shows are systematic errors outputted from MPCURVEFIT. It should also be noted

18 that there will be some error attributed to the fitting procedure itself, however this is not quantifiable and therefore is not shown. This error arises from an issue where the spectral lines analysed are only a few angstroms in width and with a spectral resolution of approximately one angstrom/pixel leads to a problem where each spectral line is composed of only three-four points and thus the iterative process of MPCURVEFIT leads to uncertainty in the location and characteristics of the fitted gaussian. Simply put the more points per spectral line present in the data, the better the gaussian fit, thus the higher the spectral resolution the more reliable the results will be. It is possible to convert the FWHM values in to a velocity thus comparing the difference in atmospheric velocities of the lines. Consider the following equations:

q (FWHM) = (FWHM)2 − (FWHM)2 (7) star observed star instrumental width

√ FWHM = 2 2 ln 2σ (8)

∆λ v = (9) λo c

Combining Equations 7, 8 and 9 gives the following relation, assuming that the instru- mental width is a gaussian of width one angstrom:

q √ ∆λ (2 2 ln 2σ)2 − 1 v = c = c (10) λo λo

This equation is then used to calculate the velocities of the quiescent line profile and the highest flare width profile, thus giving rise to the maximum change in velocity (this corresponds to the first two data points in both line profiles). This leads to ∆VH gamma = −1 −1 (92.100 ± 5.700)kms and ∆VH delta = (122.000 ± 24.000)kms

5 Discussion

The centre of both the hydrogen gamma and delta lines appears to be reduced by six angstroms once the flare begins. Whilst this seems unphysical at first and could possibly be attributed to inaccurate wavelength correction, the fact it appears in both of the lines profiles seems to indicate a real phenomenon. However without further investigation it would not be possible to determine this any certainty. The hydrogen gamma line appears to have a sudden drop at t = (0.09164) MDJ-55405. Closer inspection of the same points in the peak, FWHM and Continuum plots also show points which appear to be lower than the trends. Therefore it would be sensible to regard this as an erroneous data

19 point, possibly as a feature of incorrect gaussian fitting which was not spotted in the verification stages of the automated procedures or an issue with that specific spectrum’s wavelength calibration. Whilst at first the peak plots appear to show some pattern, considering the extra un- plotted error arising from the uncertainty in fitting the gaussian to so few points, the apparent distribution cannot really be separated from the systematic error and therefore without further investigation it would be unconvincing to state that there is any change in either the hydrogen gamma or delta line peak values during a period of flaring. For both the hydrogen gamma and delta profiles the FWHM and continuum levels follow a sensible predicted trend. The lines show clear broadening at the onset of the flare with gradual decrease as time continues. The graphs appear to have similarities to the exponential decay time as described earlier on. It is important to note that different levels correspond to different temperatures and thus different regions of the stellar atmosphere. It is clear from the hydrogen delta data that the continuum shows a rise due to the flare sooner than the FWHM and it appears to reduce back to the pre- flare level sooner. It is possible then to conclude that the continuum and the FWHM are attributed to different parts of the atmosphere. This is explained by Pallavicini and Priest [1991] who explain the creation of a magnetic loop in which the ionised particles are constrained. As these particles move through the loop they eventually come in contact with the photosphere or chromosphere (dependant on the nature of the magnetic loop). When this occurs it triggers a flare event, resulting in the continuum level showing changes earlier than the FWHM. The area under the spectral lines gives an view of the energy involved. It would be expected that during a flare the area should increase dramatically and then exponentially decrease as via the decay time. This is shown in both lines, with the hydrogen gamma and delta lines showing an approximate increase of five and six times the quiescent level respectively.

6 Conclusion

In conclusion it has been found that AT Mic’s spectrum undergoes considerable changes upon flare outburst. Firstly the lines are doppler broadened, showing an increase in energy of the system. No pattern has be found for the peak levels of the lines, but it should be noted that for this uncalibrated flux scale little meaning could have been deduced from any result in this area. Delayed changes in the FWHM compared with the continuum has been linked to flare activity triggered by single magnetic loop formation as detailed by Pallavicini and Priest [1991]. An approximate shift in line centre wavelength of six angstroms has been detected however without further analysis this cannot thought of as a physical phenomenon rather than either an instrumental error, or an issue with the wavelength calibration.

20 Given more time on the project it would have been interesting to make further analysis of this shift in wavelength, by taking a higher resolution spectrum of more peaks and seeing if this occurs in all lines, or if indeed it is an error in data processing. To further analyse the trend in peak level changes a flux calibration would have to be applied to the data. This would allow a more mathematical treatment of errors and would determine whether the changes seen in figures 4 and 5 are real phenomenon or statistical noise. This would require the observation of a standard star at the observatory and thus was unobtainable in the confines of this project. Furthermore it would have been interesting to write another IDL procedure which could calculate the effective area, the area relation between the continuum area and the area under the peak. This would allow direct comparison of changes between the differing lines which may produce some more patterns for analysis. Finally, time permitting it would have been useful to analyse more of the lines found in this region of the spectrum. The hydrogen epsilon line at 3934 angstroms was attempted but is in fact blended with ionised Calcium which in low resolution spectroscopy cannot be separated [Phillips et al., 2008], once again repeating the observations with higher resolution would help, providing much more workable data. Finally using the equation for the Doppler/Velocity relation, and assuming that the instrumental width also follows that of a gaussian function the changes in velocity −1 were calculated to be ∆VH gamma = (92.100 ± 5.700)kms and ∆VH delta = (122.000 ± 24.000)kms−1 from quiescent level to the maximum value during the flare outburst. In terms of personal gain this project has given me the opportunity to gain valuable skills in observational astronomy, using multiple programs both in and out of service, scripting and automating data processing for considerable time saving as well as learning to write in LATEX, which is used by many professional physicists to write academic papers and theses. Again given more time on the project it would have been more effective to create functions in IDL which can perform the data reduction stages, thus removing the use of IRAF, cross program file compatibility issues and problems experienced in installing and operating a system that is only given support by volunteers.

7 Acknowledgements

The Author wishes to thank: • Prof. G.E. Bromage, for patient support, supervision, ideas, confidence and feed- back • Dr. H. Worters, for IRAF parameter help, and supervision observing at SAAO and • Dr. D. Bewsher, for IDL guidance and general removal of dead ends.

21 References

A. J. Cannon and E. C. Pickering. Classification of 1,688 southern stars by means of their spectra. Annals of Harvard College Observatory, 56:115–164, 1912. Dave Kilkenny and Hannah Worters. The SAAO 1.9-m Telescope and Grating Spectro- graph, 2010. R. Pallavicini and E. R. Priest. The role of magnetic loops in solar flares [and discussion]. Philosophical Transactions: Physical Sciences and Engineering, 336(1643):pp. 389– 400, 1991. ISSN 09628428. URL http://www.jstor.org/stable/53825. Kenneth. Phillips, Uri Feldman, and Enrico Landi. Ultraviolet and X-ray Spectroscopy of the Solar Atmosphere, volume 44 of Cambridge Astrophysics Series. Cambridge University Press, 2008.

22 A IDL Functions and Procedures

A.1 Averaging FITS

FUNCTION ave_fits,file,wav=wav,dl=dl,exptime=exptime

;DESCRIPTION: This procedure reads in a number of fits files, ;sums them and divides through by the number of files inputted. ;Used to create master quiescent files, or read in single files, since ;the division will have no effect on single files. The wavelength ;calibration is extracted from the header using the values specified ;from IRAF. Finally the function also divides each file by the ;exposure time before summing to remove any issues with differing ;integration lengths ;WRITTEN: Adam Clarke 7th March 2011 - BSc Project work ;USAGE: output=ave_fits(’input file’)

nf = n_elements(file) ;finds number of files dl = fltarr(nf) ;set up array for delta lambda exptime = fltarr(nf) ;set up array for exposure time tdata=fltarr(1749) ;creates array for data

;for loop reading in fits for i=0,nf-1 do begin

;read fits, storing header in index data = readfits(file(i),index)

;save exposure time to array exptime(i) = float(strmid(index(23),20,10))

;save delta lamba to array dl(i) = float(strmid(index(45),14,16)) tdata = tdata + (data/exptime(i)) ;sum fits endfor ;end for loop

;divide data creating the average file mdata = tdata/float(nf)

;Need to take the specific section of the string value, using ;strmid(index(line number),start character,character length) and then ;put floats around it to convert it so that it can be used to plot the ;spectrum with the wavelength calibration

;extract pixel 1 wavelength value crval1 = float(strmid(index(43),15,16))

;extract wavelength change per pixel cdelt1 = float(strmid(index(45),14,16))

;create wavelength scale using aove values wav = findgen(1749)*cdelt1+crval1 plot,wav,mdata, title=’AT Mic, average quiescent spectrum’, xtitle=’wavelength (angstroms)’,ytitle=’counts (uncalibrated)’ return,mdata end

23 A.2 Line Fitting

FUNCTION line_fitting,tmp_data,tmp_wav,ig=ig

; PURPOSE: Procedure for running MPCURVEFIT with data ; ; USAGE: line_fitting ; ; REQUIRED KEYWORDS: N/A ; ; OPTIONAL KEYWORDS: N/A ; ; NOTES: This procedure runs MPCURVEFIT with the data in tmp_data and ;tmp_wav. It limits the width from ebing negative, to prevent ;MPCURVEFIT iterating the wrong way. MPCURVEFIT outputs the results in ;a table as well as statistical errors, sigma. The function creates ;its own initial guesses by finding the maximum value in the ;wavelength range and attributing the same values central wavelength. ; ; HISTORY: Written 22/03/11 Adam Clarke nn = n_elements(tmp_data) ww = findgen(nn)*0.+1. lc = where(tmp_data eq max(tmp_data)) peak = max(tmp_data) ig = [peak,tmp_wav(lc),1.,min(tmp_data)]

;This prevents the width from being a negative value. parinfo = replicate(value:0.,limited:[0,0], $ limits:[0.D,0.D],parname:’’,4)

;names of parameters parinfo[*].parname=[’Amplitude’,’Line centre’,’FWHM’,’Background’]

;width contrained to be positive parinfo[2].limited(0) = 1 parinfo[2].limits(0) = 0.0

;starting parameters parinfo[*].value = ig yfit = mpcurvefit(tmp_wav,tmp_data,ww,ig, $ sigma,function_name=’fgauss’,parinfo=parinfo,/quiet) print, " Peak, Centre, Width, Background:" print, ig print, sigma return,yfit

END

24 A.3 Area

FUNCTION calc_area,tmp_wav,yfit, dl

;DESCRIPTION: A FUNCTION FOR CALCULATING THE AREA OF THE FITTED ;GUASSIAN DATA. ;WRITTEN: ADAM CLARKE - 28TH MARCH 2011 ;USEAGE: area=calc_area(tmp_wav,yfit,dl)

;Set number of elements equivelent to the number of values in tmp_wav nn = n_elements(tmp_wav)

;Initialise area at zero area = 0.

;Loop for summing each value of yfit FOR i=0,nn-1 DO BEGIN

;Take initial value of area, and add ;the value of yfit multiplied by ;change in wavelength area = area+(yfit(i)*dl(0)) ENDFOR

;Return area for use later return,area

END

25 A.4 Time

FUNCTION ajc_time,file,ref=ref

;DESCRIPTION: This function extracts the MJD from the header of a ;file. Because of restrictions in IDL for the length of floating point ;values, the loop is created to find the lowest MJD in the files ;specified and uses this as a reference to subtract, thus changing the ;number to a length that IDL can sucessfully handle. ; ;WRITTEN: 4/4/11 ; ;ADAM CLARKE

;Find the number of elements in ’file’ nf = n_elements(file)

;set mjd as an array with nf number of elements mjd = dblarr(nf) for i=0,nf-1 do begin ;for loop reading in fits

data = readfits(file(i),index) ;read fits

;Set reference from lowest value of MJD IF (i eq 0) THEN ref = floor(float(strmid(index(22),19,11)))

;Subtract ref fromt the MJD and return this as a new value mjd(i) = double(strmid(index(22),19,11))-ref endfor print, mjd ;print time in MJD

END

26 A.5 Wrapper

PRO wrapper,file,ss,ee

;WRITTEN: Adam Clarke - 21st March 2011 ;UPDATED: 4/04/2011 ;DESCRIPTION: This procedure brings together the other procedures ;written and allows for batch processing without the need to type many ;commands ;USEAGE: wrapper, file, ss, ee ;where file=input file location (can be multiple since the wrapper ;uses the average function) and lower and upper are the wavelengths ;the peak is located between

;Read in the file and call it data, take header information ;inc. Exposure time etc and average it. data = ave_fits(file,wav=wav,dl=dl,exptime=exptime)

;Set number of points. npts = 10

;Set initial guesses, ii=Maximum peak between values of ss and ee then ;extract npts number of points around this, to get the ;tmp_data and tmp_wav of the peak for analysis. kk = where(wav lt ss,nkk) ss2 = kk(nkk-1) jj = where(wav gt ee,njj) ee2 = jj(0) ii = where(data(ss2:ee2) eq max(data(ss2:ee2))) tmp_data = data(ss2+ii-npts:ss2+ii+npts) tmp_wav = wav(ss2+ii-npts:ss2+ii+npts) stop ;allows for checking of imported spectrum plot

;Run line_fitting procedure on tmp_data, and tmp_wav, with initial ;guesses ig yfit = line_fitting(tmp_data, tmp_wav,ig=ig)

;Calculate Area and print area=calc_area(tmp_wav,yfit,dl) print,area

;Stop to allow further use of tmp_data, tmp_wav, sigma, and ig to ;check for clarity stop

END

27 A.6 Multiple Plots

PRO multi, time,peak,peak_err,cen,cen_err,wid, wid_err,bgrnd, bgrnd_err

;This creates a page with four plot spaces on it ;Written: Adam Clarke ;16th May 2011

;Custom string to get the angstrom symbol angstrom = ’!6!sA!r!u!9%!6!n’

;Set plotting device to Postscript: SET_plot, ’ps’

;Set the filename DEVICE, FILENAME=’graphs.ps’,xsize=’10’, ysize=’7’, /inches,/HELVETICA, set_character_size=[140,180]

;Make IDL’s plotting routine fit four plots to a page with two ;columns and two rows !P.MULTI=[0,2,2]

;Plot #1 - Centre with Error (Top Left) ploterror, time, cen,cen_err, title=’Centre’, xtitle=’MJD-55405’, ytitle=’Centre (’+angstrom+’ )’, $ xtickinterval=0.04

;Plot #2 - Peak with Error (Top Right) ploterror, time, peak, peak_err, title=’Peak’, xtitle=’MJD-55405’, ytitle=’Counts’, $ xtickinterval=0.04

;Plot #3 - Gauss width with Error (Bottom Left) - uses conversion factor from width to FWHM FWHM=2*SQRT(2*ALOG(2))*WID FWHM_ERR=2*SQRT(2*ALOG(2))*WID_ERR ploterror, time, fwhm, fwhm_err, title=’FWHM’, xtitle=’MJD-55405’, ytitle=’FWHM (’+angstrom+’ )’, $ xtickinterval=’0.04’

;Plot #4 - Background Value with Error (Bottom Right) ploterror, time, bgrnd, bgrnd_err, title=’Continuum’, xtitle=’MJD-55405’, $ ytitle=’Counts’, xtickinterval=0.04

;Close the file DEVICE, /CLOSE

;Return plotting to Windows SET_PLOT, ’x’

;Reset plotting to one plot per Window !P.MULTI=0

END

28