<?xml version="1.0" encoding="utf-8"?>
<!-- generator="Kukkaisvoima version 9" -->
<rss version="2.0"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
>
<channel>
<atom:link href="http://www.nickcoleman.org/blog/index.cgi/feed" rel="self" />
<title>Nick Coleman: nasa</title>
<link>http://www.nickcoleman.org/blog/index.cgi</link>
<description>Nick Coleman blog</description>
<pubDate>Fri, 15 Jul 2011 18:53:00 -0700</pubDate>
<lastBuildDate>Fri, 15 Jul 2011 18:53:00 -0700</lastBuildDate>
<generator>http://23.fi/kukkaisvoima/</generator>
<language>en</language>
<item>
<title>History of Space Flight
</title>
<link>http://www.nickcoleman.org/blog/index.cgi?post=spacehistory%21201107151853%21science%2Cnasa</link>
<comments>http://www.nickcoleman.org/blog/index.cgi?post=spacehistory%21201107151853%21science%2Cnasa#comments</comments>
<pubDate>Fri, 15 Jul 2011 18:53:00 -0700</pubDate>
<dc:creator>Nick</dc:creator>
<category>science</category>
<category>nasa</category>
<guid isPermaLink="true">http://www.nickcoleman.org/blog/index.cgi?post=spacehistory%21201107151853%21science%2Cnasa/</guid>
<description><![CDATA[ 
 [...]]]></description>
<content:encoded><![CDATA[
<p>
<img src="http://www.nickcoleman.org/blog/images/space_history.jpg" alt="History of space flight" >
<p>
Sigh, indeed.
<p>
Amazing to think that we landed on the Moon just 42 years after the first major
intercontinental flight, and that we are now 42 years after that.
<p>
<hr>
<small><i>(Cartoon from a local newsletter, I don't know the source.)</i></small>
<p>
]]></content:encoded>
<wfw:commentRss>http://www.nickcoleman.org/blog/index.cgi?post=spacehistory%21201107151853%21science%2Cnasa/feed/</wfw:commentRss>
</item>
<item>
<title>Stunning Image of ISS
</title>
<link>http://www.nickcoleman.org/blog/index.cgi?post=issphoto%21201106080850%21astronomy%2Cnasa%2Cscience</link>
<comments>http://www.nickcoleman.org/blog/index.cgi?post=issphoto%21201106080850%21astronomy%2Cnasa%2Cscience#comments</comments>
<pubDate>Wed, 08 Jun 2011 08:50:00 -0700</pubDate>
<dc:creator>Nick</dc:creator>
<category>astronomy</category>
<category>nasa</category>
<category>science</category>
<guid isPermaLink="true">http://www.nickcoleman.org/blog/index.cgi?post=issphoto%21201106080850%21astronomy%2Cnasa%2Cscience/</guid>
<description><![CDATA[ 
 [...]]]></description>
<content:encoded><![CDATA[
<p>
NASA's <a href="http://www.nickcoleman.org/axs/ax.pl?http://www.nasa.gov/multimedia/imagegallery/iotd.html">Image of the Day</a> shows some stunning photos occasionally, and this is one of them.
<p>
<div class="image"> <a href="http://www.nickcoleman.org/blog/images/iss_from_soyuz.jpg"><img src="http://www.nickcoleman.org/blog/images/iss_from_soyuz_th.jpg" alt="ISS from Soyuz" > </a><p>Endeavour docked to the ISS, taken from Soyuz <small>(click for bigger)</small></p></div>
<p>
<div class="blockquote">
The pictures are the first taken of a shuttle docked to the station from the
perspective of a Russian Soyuz spacecraft. On May 23, the Soyuz was carrying
Russian cosmonaut Dmitry Kondratyev, NASA astronaut Cady Coleman and European
Space Agency astronaut Paolo Nespoli back to Earth. Once their vehicle was
about 600 feet from the station, Mission Control Moscow, outside the Russian
capital, commanded the orbiting laboratory to rotate 130 degrees. This move
allowed Nespoli to capture digital photographs and high definition video of
shuttle Endeavour docked to the station. Credit: NASA
</div>
<p>
<p>
]]></content:encoded>
<wfw:commentRss>http://www.nickcoleman.org/blog/index.cgi?post=issphoto%21201106080850%21astronomy%2Cnasa%2Cscience/feed/</wfw:commentRss>
</item>
<item>
<title>NASA: Aeronautics, Space?
</title>
<link>http://www.nickcoleman.org/blog/index.cgi?post=nasamission%21201104191000%21science%2Cnasa</link>
<comments>http://www.nickcoleman.org/blog/index.cgi?post=nasamission%21201104191000%21science%2Cnasa#comments</comments>
<pubDate>Tue, 19 Apr 2011 10:00:00 -0700</pubDate>
<dc:creator>Nick</dc:creator>
<category>science</category>
<category>nasa</category>
<guid isPermaLink="true">http://www.nickcoleman.org/blog/index.cgi?post=nasamission%21201104191000%21science%2Cnasa/</guid>
<description><![CDATA[ 
 [...]]]></description>
<content:encoded><![CDATA[
<p>
I was struck by the caption of today's NASA <a href="http://www.nasa.gov/multimedia/imagegallery/">Image of the Day</a>.
Here is a small copy of the image, and I've copied the caption below as it is hard to read on this small image:
<div class="images"><img src="http://www.nickcoleman.org/blog/images/nasamission.jpg" alt="NASA scientists examine sea ice" ></div>
<div class="blockquote">
The terrain for the scientific work conducted by ICESCAPE scientists on July 4,
2010, was Arctic sea ice and melt ponds in the Chukchi Sea. The five-week field
mission was dedicated to sampling the physical, chemical and biological
characteristics of the ocean and sea ice. Impacts of Climate change on the
Eco-Systems and Chemistry of the Arctic Pacific Environment, or ICESCPE
Mission, is a multi-year NASA shipborne project. The bulk of the research will
take place in the Beaufort and Chukchi Seas in summer of 2010 and fall of 2011. 
</div>
NASA, shipborne? Why is NASA doing earth science research on a ship? Where does
shipborne fit into "aeronautics" and "space"?
<p>
NASA does do much earth science, but it's within its purvue of space: satellites and so on. 
<p>
It looks like NASA is doing whatever it can to keep its budget even when it is
nothing to do with its mission statement.
<p>
I know that NASA is a highly political organisation, but it must be frustrating
having to resort to distractions like this.
<p>
No doubt the research is worthy and needs doing, but it should be done by one
of the many earth-bound science organisations.  I can't fathom any reason for
NASA (and, more importantly, its tight budget) to be involved.
<p>
]]></content:encoded>
<wfw:commentRss>http://www.nickcoleman.org/blog/index.cgi?post=nasamission%21201104191000%21science%2Cnasa/feed/</wfw:commentRss>
</item>
<item>
<title>NASA's Mars Spirit Stops
</title>
<link>http://www.nickcoleman.org/blog/index.cgi?post=nasaspiritrestingplace%21201001051737%21nasa%2Cscience%2Cimage</link>
<comments>http://www.nickcoleman.org/blog/index.cgi?post=nasaspiritrestingplace%21201001051737%21nasa%2Cscience%2Cimage#comments</comments>
<pubDate>Tue, 05 Jan 2010 17:37:00 -0700</pubDate>
<dc:creator>Nick</dc:creator>
<category>nasa</category>
<category>science</category>
<category>image</category>
<guid isPermaLink="true">http://www.nickcoleman.org/blog/index.cgi?post=nasaspiritrestingplace%21201001051737%21nasa%2Cscience%2Cimage/</guid>
<description><![CDATA[ 
 [...]]]></description>
<content:encoded><![CDATA[
<p>
You may know that NASA's Mars Exploration rover <i>Spirit</i> has been bogged in one
place since about April 2009.  It broke through the crust into soft sand, got bogged and
then one wheel stopped working.
<p>
<div class="image"><a href="http://www.nickcoleman.org/blog/images/nasa_rover.jpg" target="_blank">
<img src="http://www.nickcoleman.org/blog/images/nasa_rover_th.jpg" alt="NASA Mars Rover Spirit" ></a>
Copyright NASA
<br />Click for larger image in new window
</div>
<p>
From what I read, they're not hopeful of freeing it. The issue now is that dust is
accumulating on the solar panels and, with winter approaching, they are not confident
that the batteries will recharge.  Which means the end of it.
<p>
It's too early to call for closing-drinks, but it's getting near.  
<p>
Interesting to see a plastic shopping bag, and a well-used track heading off to the local
shops and a pub, no doubt. That's where we'll have the last drinks.   
<p>
It's done a great job.  It's design brief was for an extendable 90
days, and it has lasted for six years.  The engineers should be and no doubt are proud of
what they've made.
<p>
Let's remember that this was one of NASA's cheapest missions and one of its most
productive.  Surely robot missions are the future for exploratory work.  
<p>
This image is NASA's Image of the Day for 4 Jan 10 and is
quite poignant.
<p>
<b>Image Caption</b>
<p>
Click on the image for a larger version.  You can see the caption text that I wrote about
in a <a
href="http://www.nickcoleman.org/axs/ax.pl?http://www.nickcoleman.org/blog/index.cgi/nasaiod!200912210830!unix,nasa,image">previous post</a>.
]]></content:encoded>
<wfw:commentRss>http://www.nickcoleman.org/blog/index.cgi?post=nasaspiritrestingplace%21201001051737%21nasa%2Cscience%2Cimage/feed/</wfw:commentRss>
</item>
<item>
<title>Adding a caption to NASA's Image of the Day
</title>
<link>http://www.nickcoleman.org/blog/index.cgi?post=nasaiod%21200912210830%21unix%2Cnasa%2Cimage</link>
<comments>http://www.nickcoleman.org/blog/index.cgi?post=nasaiod%21200912210830%21unix%2Cnasa%2Cimage#comments</comments>
<pubDate>Mon, 21 Dec 2009 08:30:00 -0700</pubDate>
<dc:creator>Nick</dc:creator>
<category>unix</category>
<category>nasa</category>
<category>image</category>
<guid isPermaLink="true">http://www.nickcoleman.org/blog/index.cgi?post=nasaiod%21200912210830%21unix%2Cnasa%2Cimage/</guid>
<description><![CDATA[ 
 [...]]]></description>
<content:encoded><![CDATA[
<p>
I recently <a
href="http://www.nickcoleman.org/axs/ax.pl?http://www.nickcoleman.org/blog/index.cgi/textimage!200912200832!unix,image">wrote</a>
about converting text to an image, and gave a brief example using image
magick. To recap, here's the command-line:
<div class="code">convert -fill white -background '#007a7a' -gravity "West" -size 300x50 
            caption:"address@domain.toplevel" email.jpg</div>
<p>
One very useful way of using this text-to-image feature is to add a caption to
an image.  We will go through this and use NASA's Image of the Day as an
example.  (In actuality, image of the working week give or take a day.  No image on the
weekend, I'm afraid.)
<p>
If you're not familiar with it, NASA's Image of the Day is a high-scale photo
released by NASA's PR department, usually chosen for its stunning imagery or
its relevence to a science mission.  It's been going for years and is a bit of
an institution among the astronomy and science set.
<p>
The image used to be available on it's own page, along with some explanatory text and photo
credits below.  Having its own page meant that you could store a simple
bookmark, which would never change, to view it every day.
<p>
Before long, people were automatically downloading the image using wget
or an ftp script and putting it on their desktop.  A nice new photo every day.
<p>
Nowadays, in the curse of multimedia everywhere, there is no consistent link.
You have to visit NASA's multimedia gallery and scroll through the list of
images to see the latest.  Each image has its own URI, and there is no link
to that entity previously known as "the image of the day".
<p>
However, NASA does provide an RSS feed that contains a link to the latest
image and a caption.  That's great, we can use the contents of the feed both to pull down the image and
to overlay the caption.
<p>
One of image magick's very useful features is its ability to work on several
layers at once.  We will use that feature to create a caption on one layer using
the same technique as in my previous post, and we add the image itself to
another layer.  Then flatten the layers, resize the image to suit our desktop,
and save it.  Presto, we have a nice new desktop image every day.
<p>
Here is a sample of bash code (easily alterable to any command-line, including
DOS):
<p>
<div class="code">
 # Get the rss file that contains the direct link to the image.
 # It is always  #lg_image_of_the_day.rss #.  lg_ means large, there are
 # other sizes too: see the NASA website section on feeds.
wget -N http://www.nasa.gov/rss/lg_image_of_the_day.rss
<p>
 # Parse it to get the actual image URI, and use tail to get the
 # last line.
 # Search for the text "url" and grab what follows.
image_url=$(sed '{s/^.*image\/jpeg \" url=\"\(.*\)\"\/> <\/item><\/channel>
                .*/\1/;}' lg_image_of_the_day.rss | tail -n 1)
<p>
 # Get the image itself.
wget -N $image_url
<br />... various techniques to calculate resizing, both for the desktop
    and for the aspect ratio.
    I'll post them if people are interested...<br />
 # Parse the rss to extract the caption (in XML tag &lt;description&gt;) and
 # save it. This is searching for the tag and getting everything after, up
 # to some arbitrary text limit, here the photo credit.  I had to set a
 # limit as sometimes the text runs for several hundred characters.
 # An alternative method would be just to grab a certain number
 # of characters.
sed 's%.*<description>\(.*\)\(Photo\|Image\) Credit.*%\1%' \ 
lg_image_of_the_day.rss | tail -n 1 > NasaIod.txt
<p>
 # And finally convert the text to an image, overlay it on the photo image
 # and save it.  Saving it to a non-layer format flattens the 
 # layers automatically.
convert \
    \( -fill white -background '#0008'  -gravity NorthWest -size \
                $width caption:"@NasaIod.txt" \) \
    \(  $image $resize \) \
    +swap -gravity South -composite image.jpg
</div>
The first set of parantheses creates one layer and the second set a
second layer.
<p>
The interesting part in the last statement is the
<code>caption:"@NasaIod.txt"</code>.  This reads a file containing text, which
we created previously when we parsed the rss.
<p>
I'll quickly go through the image magick options(the 'convert' command which
forms part of the image magick suite of programs).  
<li>We put the text into the
first layer rather than the second, then '+swap' them so the text is on the
top layer.  There is a reason for this, but I can't remember it (so shoot me).
I seem to recall that, if the text layer is placed on top of the photo layer,
it resizes to fit, making it too large.  
<li>'-gravity' places the smaller text layer at the bottom (South) of the
larger photo layer.
<li>'-composite' merges the two layers.
<p>
I haven't gone into too much detail on the rest of the script, assuming you understand sed and some
bash.  I'll explain it further if anyone requests it.
<p>
I have put this entire process into a script that completely automates it. It can
handle tall narrow images, adjusting the caption width to take 
aspect-ratio into account.  I run it with cron every morning and have a nice
new desktop image most days.
<p>
And, the NASA images are simply stunning!
]]></content:encoded>
<wfw:commentRss>http://www.nickcoleman.org/blog/index.cgi?post=nasaiod%21200912210830%21unix%2Cnasa%2Cimage/feed/</wfw:commentRss>
</item>
</channel>
</rss>

