|
Section 14 Exercise: Project 2, Part 3
|
|
Today's exercise is the third and final part of Project 2. In the
previous
two exercises you have created the data, seen two tools to analyze the
data and obtained skills needed to make the final Twiki report. This
exercise
adds to the previous exercises, by showing how to make simple movies
of the computational data. Finally there is a description of the desired
content of the final report. Today, there is only one place to get the
final
credits, namely by finishing the report and let us evaluate the outcome.
-
NOTE:
-
The deadline for
finishing the project
is Friday June 25.
-
There is still time to make the course evaluations if you
have not already done it!
You find it under the course on Absalon.
Please fill in the evaluation form, even if (especially if
;-!) you are happy with the course!
|
Animation
|
[1 hour]
|
There are many tools that may be used to make animations. Here we give a
few hints that may be used in different combinations to make animations
from the
images you can produce with the different visualization packages. Many
of them
produce series of images with an unique id number. Others can make
movies directly, "on the fly". Below we give two examples.
Note: convert and ffmpeg
do not exist on the
DCSC-KU nodes (gifsicle does). We may (or may not) be able to
convince
the sysadmin to install them, but in any case these tools are available
on
the host astro03. You may not have a home directory there, but
logging
in is possible from fend03, and directories (for scp in and out) can be
made
under /tmp, if needed. You may also have these tools on your own laptop
-- they
can easily be installed under Linux, Mac and CygWin.
Movies from Paraview
Paraview can make AVI movies directly. To do this you need to choose a
series of
data files that defines the time evolution. Then build up your
visualisation.
Then in the top menu chose file -> Save Animation and
follow the
choices on the menues that appear. Just to make it clear, you can
also chose to save the individual images in a few different image
formats.
Producing animation files from images
The easiest option for producing animations is to do it directly with
Paraview, as per
the above. However, it is also possible to convert a series of images
(produced for
example with IDL or Paraview) to animated GIF or MPEG files. Here's
more about that:
- An animated GIF is an old standard format used on web pages.
It has the
advantage that it is easy to construct and runs in all web browsers. The
disadvantage is
the lack of control when the animation is running. You just follow it as
it
runs - - you can't stop or restart it from a given frame...
- To use convert to turn a series of jpg images into an
animated GIF file one can use the command
convert *.jpg anim.gif
or, if the movie is too fast it can be slowed down with for example
convert *.jpg -delay 20 anim.gif
which sets the speed to roughly 5 frames per second.
Convert is a part of the ImageMagic package - - you can find
help
on convert here - -
- To use gifsicle to make an animated GIF file you
first
have to convert the images to GIF format:
convert -write im%02d.gif *.jpg
That converts all *.jpg images into .gif images with the same
numbers, without removing the original
image files, and the gif files can now be combined into a single
gif animation with the command:
gifsicle - -loopcount im*.gif > final_animation.gif
If the movie is too fast it can be slowed down, as with "convert"
above:
gifsicle - -delay 20 - -loopcount im*.gif > final_animation.gif
Gifsicle is a small program that can do lots of editing of
gif animations.... check the webpage
or the man pages to see some of these possibilities.
- MPEG movies is another standard. Here, again, there
are a number of different options,
especially if one includes Windows and MAC.
-
As part of the last exercise we showed how the
xinteranimate
IDL procedure could be used
for making mpeg movies. One could still use this, reading in the
relevant images and look
at the animation in IDL, before saving it to a mpeg movie.
-
Another possibility to use convert. To convert a series of
images into a movie do
convert *.jpg movie.mpg
-
Applications available under Windows and MAC are generally more easy to
control,
for example with respect to the balance between compression and movie
quality, and
with respect to the viewing speed of the MPEG file. VideoMach is a
good
example (find it with Google).
To "slow down" a movie with VideoMach, right click on the source (left
hand side panel)
and choose for example 5 frames per second input rate (under "speed and
direction").
Then choose "keep original duration" under output options ("video" panel
under "save as").
VideoMach can also make .avi files, which have the advantage of
supporting 15 frames
per second frame rate (MPEG generally assumes 30 or 25 frames per
second), and that
they work very smoothly in PowerPoint presentation. Most web-browsers
also support
AVI files.
- You can view the mpg movie using:
mplayer -loop 0 -fps 5 density.mpg
This loops the movie and plays it with 5 frames per second instead of
the default 25 that
convert
creates it with. You can pause it using the space
bar, toggle it to full
screen using f
- - or use -fs as option. Check the man
pages for more info!
- ffmpeg is another a package that can be used to
make different
video formats mpeg, avi, flash...
ffmpeg -pass 1 -r 10 -y -b 8500 -i movie%03d.png -vcodec msmpeg4 -vtag MP43 -acodec mp3 movie.avi
ffmpeg -pass 2 -r 10 -y -b 8500 -i movie%03d.png -vcodec msmpeg4 -vtag MP43 -acodec mp3 movie.avi
rm ffmpeg2pass-0.log
Check their web page for more information.
Report
|
[until it is finished..]
|
Writing the report in Twiki allows for a short turnover time, in terms
of changing and viewing
the material being written. Being on the web, it is possible
to include all the advantages that this brings. Namely, sharing images,
movies and text with
just a single click.
To access the TWiki page and register as a user you need to follow the
instruction on this
page
The report should be a description of the experiment you have been
running, with emphasis on
showing the time evolution in some genius detail such that visitors of
the web page can
understand what is taking place. To do this you need to include the
following main items:
-
Front page.
- A representative illustration of the experiment.
- Name of the author.
- Table of content / links to the sections below (not
mandatory)
-
A brief description of the experiment.
- Discussion of the initial setup.
- Solution method.
-
A description of the structure and time evolution of the magnetic
relaxation experiment.
- Include the 3D images you made of a combination of the five
visualization "instances"
- Time evolution and other relevant data including
animations (see below).
- Simple 2D plots of the time evolution of the peak and
average values of
relevant quantities. Mark where the other images are located
in time.
-
Discussions and conclusions
- Some remarks regarding the experiment.
- Other remarks related to the use of the different
visualization tools and their
aid in providing you with the answers you were trying to
reach.
-
Appendix containing links to paraview saved session, paraview_saved.pvsm,
idl scripts,
and what else you have used producing the above visualization (use
the upload
feature on the Twiki page).
There is a template
page,
also available via a link on the
main report
page.
It is preferable to keep everything on one TWiki page.
If you prefer to make several independent TWiki pages, then use the same
first
part of the name and add something at the end (this is to avoid page
names conflicting
with your fellow students' pages), and remember to include the magic
line that makes
the page readable only by you and us for now (we will remove this
restriction after
everyone has finished!)
The main emphasis of your effort should be on the description
section of the report.
Here are some ideas - not all of which need to be used! - (see also
the
page
discussing the basic physical principles):
There are, in principle, two phases of the:
- The initial phase, where the initial lorentz forces
accelerates the
magnetic field in different regions. This converts magnetic
energy into kinetic
energy.
- Pinching by the velocity field, where the
accelerated plasma distorts
the magnetic field structure. This allows the null points to
move towards each other
and eventually collapse to a region much smaller than the
initial one.
- Magnetic reconnection is important for letting
the magnetic flux contained
in the null point region around the central null escape out of
this region, allowing
the region to collapse (tracking this in detail is difficult).
- The final state is very much simpler than the
initial one and resembels
the initial field where only one wave vector is used. Something
close to a constant alpha
magnetic field has been obtained. Due to the field approaching a
constant alpha field
the diffuseion time becomes very long, which is why the later
part of the experiment
only changes very slowly.
We are convinced that, by sitting and playing with the data, you can
find other ways of
making informative combinations of the physical parameters available.
How does the
topology of the magnetic field change? What happens to the null points
and the week field
structures around them? Where does the force driving the field come
from? How far from a
constant alpha field is the field towards the end of the simulation?
What happens to the
flows that are initiated by the initial forces? How many nulls are left
at the end of
the experiment? Does the density around the central null increase as
the complex flux
region decreases in size and so on.
Once you are satisfied with the report, submit it by confirming here:
Note: The report will be graded by a censor (internal) and us,
and based on the grade
additional credits (from 0 to 120) will be assigned.
$Id: index.php,v 1.14 2010/06/09 15:46:05 aake Exp $
kg@astro.ku.dk