Steps to analyze flare and magnetic field data to find reconnection
topology
- Comparing energy release rate and reconnection rate
2007/06/28: to better illustrate the results you just produced, you may
try to generate a plot as such:
!p.multi = [0, 2, 0, 0, 0]
plot, df(*, s1(0)), di(*, s1(0)), /nodata, xr = [...], yr = [...]
; you may determine the xrange and yrange according to your data
for i = 0, ns1 -1 do begin
oplot, df(*, s1(i)), di(*, s1(i)), psym = 1, col = (i+1)/float(ns1)*255
oplot, df(*, s1(i)), df(*, s1(i))*B+A, col = col = (i+1)/float(ns1)*255
endfor
legend, 'P'+strcompress(string(ss1+min(cindex)), /rem), textcolor = (indgen(ns1)+1.)/ns1*255,
/left, /top
; above is to plot positive cells; you can do the same for negative cells.
The slope of the plot is, theoretically, a measure of electric current, or resistivity,
along the reconnecting current sheet. When you see different flux cells (or pairs
of connected flux cells) with different slopes, it tells the energetics of each
separatrice along which reconnection takes place. You will then be at the point
of constructing a theoretic topology map and calculate theoretically the energetics
of each separatrice to compare with observations.
- Display and Review your results on tempo-spatially
resolved reconnection rate
2007/06/22: One of the check-items would be to look at whether the positive and negative
reconnection flux derived from flux_rate are the same. You can do:
plot, total(flx>0, 2)
oplot, -total(flx<0, 2)
In principle, the two fluxes should be balanced, i.e., they are of the same amount and
they track each other in the evolution.
I wrote a paragraph last night to mark the flux cell IDs in your plot. This
paragraph can be added to your show_flux_rate.pro:
pid = s1 + min(cindex)
nid = s2 + min(cindex)
ipol = bytarr(ns1+ns2)
xx1 = fltarr(ns1)
xx2 = fltarr(ns2)
yy1 = xx1
yy2 = xx2
for i = 0, ns1 - 1 do begin
ss = where(cindex eq pid(i))
xx = ss mod nx
yy = ss / nx
xx1(i) = total(xx*mag1(xx, yy))/total(mag1(xx, yy))
yy1(i) = total(yy*mag1(xx, yy))/total(mag1(xx, yy))
endfor
for i = 0, ns2 - 1 do begin
ss = where(cindex eq nid(i))
xx = ss mod nx
yy = ss / nx
xx2(i) = total(xx*mag1(xx, yy))/total(mag1(xx, yy))
yy2(i) = total(yy*mag1(xx, yy))/total(mag1(xx, yy))
endfor
str1 = 'P'+strcompress(string(pid), /rem)
str2 = 'N'+strcompress(string(-nid), /rem)
for i = 0, ns1 - 1 do xyouts, (xx1(i)/nx*16.+1.5)/18., (yy1(i)/ny*9.03+1.5)/20., /nor, str1(i), align = 0.5, col = 220, size = 0.6
for i = 0, ns2 - 1 do xyouts, (xx2(i)/nx*16.+1.5)/18., (yy2(i)/ny*9.03+1.5)/20., /nor, str2(i), align = 0.5, col = 120, size = 0.6
2007/06/21: now that you have had your flux_rate and show_flux_rate
run properly to generate and display results. We can start trying
to figure out what these results tell us.
- from the color-coded flare brightening superimposed on the
tessellation map, try to get a qualitative description of
locality and evolution of magnetic reconnection: what magnetic
cells are involved, the order of reconnection, the manner
of reconnection, or, what kind of ribbon "motion" do you observe
at various stages of the flare.
- you can also plot the reconnection flux to be more quantitative, such
as :
mflx = flx*7.3e7^2 ; this is to get the right value of flux in Mx;
; 7.3e7 (cm) is the length of 1 arcsec, or your pixel size.
; 1 Mx = 1 Gauss cm^2 = ? Weber
s1 = where(total(mflx, 1)/1e21 ge 10, ns1) ; positive fluxes
s2 = where(total(mflx, 1)/1e21 le -10, ns2) ; negative fluxes
postive_id = s1 + min(cindex) ; here get the cell id
negative_id = s2 + min(cindex)
maxflx = max(abs(mflx))
plot, tim, flx(*, s1(0)), yr = [-maxflx, maxflx], /nodata, xtit = 'time (min)', ytit = 'flux (Mx)'
loadct, 39
for i = 0, ns1 - 1 do oplot, tim, mflx(*, s1(i)), psym = 10, col = float(i)/ns1 * 255
for i = 0, ns2 - 1 do oplot, tim, mflx(*, s2(i)), psym = 10, col = float(i)/ns2 * 255
; or design your color code as you like
You may tell the reconnection sequence from the plot.
- deriving reconnection sequence from flare data
2007/06/19: With the newly determined tessellation maps which carry
information of the magnetic field evolution, and with
co-alignment between flare and magnetic field data done, you
can derive partitioned reconnection flux rate and display
it with show_flux_rate.pro. You might have to modify the
display program in such ways:
- re-design the color-code for the time/duration of your flare;
- re-design the dimensions for your event; if you look at this
sentence:
device, filename = '***.eps', xs = XSIZE, ys = YSIZE ...
You will want to re-calculate XSIZE and YSIZE (both in centimeters)
to match (proportional to) the X & Y sizes of your images.
- input the coordinates for your image; these are specified by xc and
yc in the program; and these are equivalent to msk.x, msk.y;
- when you see something like this:
contour, img, pos = [...].... /nor
pos defines where you put a contour on top of an image; pos gives [x0, y0, x1, y1], i.e.,
the lower-left and upper-right corners of the contour map position; /nor means that
pos is given as a normalized position, or the fraction of the image size. Numbers in
pos usually only ranges from 0.0 to 1.0, of course.
- if you are still quite lost at what this program is doing, you may stop by my office,
or, employ the 050513 test event results to this program to see how this works. This
program was written for the 050513 test event.
- Evolution of Magnetic Field Before/After flare onset
2007/06/11-13: you will learn to analyze MDI time sequence with Masha
next week. To keep things simple, you can stick to the 96-m data
you just movied. Masha will guide you through analyzing these
data, and the end product for this stage would be fairly sophisticated
tessellation maps throughout the 2-day evolution. While doing so, you
will be able to record some more details of evolution, such as whether
there is new flux emergency and at what times etc. After preliminary
analysis is done on 96-m maps, we'll decide whether it is necessary
to explore higher-cadence maps.
Note: you can find the time of each map from mdi_index when you have read out
the mdi_data and mdi_index from a certain file, do
IDL> mdi_time = mdi_index.time/1000.
; this will give you seconds after 0UT for that day.
In general, you can find a lot of information of the map by
IDL> help, mdi_index, /str
And to retrieve a particular piece of information from mdi_index, do
IDL> info = mdi_index.INFO_TAG_NAME
; INFO_TAG_NAME will be known from the above "help" command.
Post your progress on-line so that I can follow.
2007/06/08 Now that you will have had your MDI movie ready, study the movie
to see what kind of evolutionary features your data show. Particularly,
do you see prominent shear motion of magnetic spots/pores about each other,
spinning/rotating motion of spots/pores about themselves, emergence or
sub-mergency of magnetic elements? Try to write a small account of magnetic
evolution of the active region you are studying.
- A quick look at MDI data sequence
2007/06/07 Since I'll be leaving for half a week, let's take a break with flare data
until I come back to see where to proceed. You will get MDI magnetograms retrieved
and prepared so that Masha will guide you towards how to analyze these data.
You will have had download the MDI data files in your directory (NB: save the data
in your directory in /disk/data, where there is larger space) , and here are
the ways to read MDI data in IDL
; to read just one map:
IDL> rd_mdi, filename, mdi_index, mdi_data
IDL> tvscl, rebin(mdi_data<2000>(-2000), 512, 512)
IDL> help, mdi_index, /str ; to show information of the mdi image
; to read a series of maps into a data cube:
IDL> .r
IDL>filenames = dialog_pickfile(filter = '*fits', /multi)
IDL> nfrms = n_elements(filenames)
IDL> mdi_datas = intarr(1024, 1024, nfrms) ; nfrms depends on how many frames you want to see
IDL> mdi_indexs = replicate(mdi_index, nfrms)
IDL> for i = 0, nfrms - 1 do begin
IDL> rd_mdi, filenames(i), mdi_index, mdi_data
IDL> mdi_datas(*, *, i) = mdi_data
IDL> mdi_indexs(i) = mdi_index
IDL> endfor
IDL> end
Homework for your IDL tutorial to be presented on Friday:
Step 1: try to write the above individual command lines after .r command into a workable program
and run this program to read the MDI files into a data cube. You can name
the program whatever way, and name your input/output whatever way. Your output usually
includes the index array (information array) and a 3D data cube.
Note: for the time being, do not deal with the 1-min cadence data yet; just
pick up MDI files containing the 96-m cadence magnetograms and read and movie
these 20-30 maps covering about 2 days.
Step 2: in IDL help session, search for "mpeg_open" and read through the guide
for this command to know how to make a mpeg movie from a data cube. Then expand your
small program above to make a movie with your MDI data cube.
Note that you can choose to make a movie of the fulldisk MDI data or a movie of
only a part of the fulldisk containing the active region of our interest. To decide
the coordinates of the sub-frame, you may use the following routine:
IDL>tmp = wdefroi(mdi_data)
Note that you will need to write a loop to continuously adding images to the movie.
Note that when you try to display MDI data (or make the movie), limit the data range
to be between -3000 and 3000 so that you can actually see meaningful things. The way
to do so is, for example:
IDL> tvscl, mdi_data>(-3000)<3000
Do experiments on your own to see if you vary this range, say, to -300 and 300, what you will see ... thus
you can determine for yourself what's the best range for best movie effect.
We'll need these movies to give us first-hand information of how magnetic field evolves
in a day before/after the flare onset.
- Start analyzing data.
2007/06/06 You each will have data for an event to start analyzing
using flux_rate.pro. You shall find two .sav files one containing
flare data and the other containing MDI map.
Find the program(s) at /disk/data/qiuj/reu_2007
For Nick's event, find the data at /disk/data/jmaxwell/000714 If you find
two maps called MDI1 and MDI2 (or similar), both coaligned with flare
data, then use the map with stronger magnetic field (i.e., data counts larger).
For Peter's event, find the data at /disk/data/qiuj/reu_2007/
and when you restore the magnetic field data, use MDI1 as the map.
1. first try to restore data files, find relevant images, and
check if the images are fine.
2. then use tessellation.pro to generate cindex; it is up to
your choice whether you wish to rebin the magnetogram into
smaller size. Remember to save the outcome into a file you
can recognize. To save data, you may do:
IDL> save, VAR, file = FILENAME
3. with flare and magnetic field data (including results from
tessellation), run flux_rate.pro and again save the outcome
in a file you can recognize.
- Trial period: trying out the programs to analyze flare.
2007/06/05 You are given processed data sets of flare and magnetic field
observations and a program to analyze them. In your IDL session, do the
following:
IDL> restore, 'trace_final_full_050513.sav',/ver
; to restore the image cube for flares, /ver allows you to see
what is being restored. Then to display images, you may do, e.g.:
IDL> tvscl, alog(data(*, *, 100)>1.)
; or to show movies, use:
IDL> xmovie, alog(data>1.)
; alog is to give a logarithmic scaling to reduce the contrast
; data>1. is to guarantee that you do not alog negative data counts; otherwise it will
give you interesting consequence....
; To have an idea of the data counts, you can profile a certain image by:
IDL> profiles, data(*, *, 100)
; you may restore another .sav file to retrieve the processed map of magnetic field
and display it in various ways.
; now we may run the program to analyze these data, to start with, you need
to compile all procedures in the program by:
IDL> .r flux_rate
; then run the program by making sure all the inputs are correct (I mean by
taking care of re-scaling the images etc. as you saw.
IDL> flux_rate, index, rebin(data, 128, 128, 517), rebin(smdi_image1, 128, 128), cindex, pos, flx
; here, the first 4 arguments are inputs, and the last two are outputs.
; make sure that when you use data and smdi_image1 as inputs, you DO NOT artificially
re-scale the image contrast as you would do for display.
; Once you get sensible pos and flx, you are all done with this step. There are many
ways to look at these outputs, e.g.:
IDL> xmovie, pos
; the movie of abstracted flare ribbons.
IDL> utplot, index, flx(*, 10)
; the time history of reconnection flux in a certain magnetic cell of ID 10.