I think align_image_stack and enfuse are my new best friends.
Wednesday, August 26, 2009
Thursday, February 26, 2009
XML, DOM, JAVA
One of those things that I never bother remembering the exact details of, but end up having to look up on the internet all the time.
Note to self: XML, DOM, JAVA
Taken from this guys site: http://www.genedavis.com/library/xml/java_dom_xml_creation.jsp
Also a bit from here: http://www.java-tips.org/java-se-tips/javax.xml.parsers/how-to-read-xml-file-in-java.html
// get dom doc
DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = dbfac.newDocumentBuilder();
Document doc = docBuilder.newDocument();
// Document doc = docBuilder.parse(new File(inputFilename));
// -- insert building dom here
// get dom transformer
TransformerFactory transfac = TransformerFactory.newInstance();
Transformer trans = transfac.newTransformer();
// make dom into something useful
FileWriter fw = new FileWriter(new File(outputFilename));
StreamResult result = new StreamResult(fw);
DOMSource source = new DOMSource(doc);
trans.transform(source, result);
Note to self: XML, DOM, JAVA
Taken from this guys site: http://www.genedavis.com/library/xml/java_dom_xml_creation.jsp
Also a bit from here: http://www.java-tips.org/java-se-tips/javax.xml.parsers/how-to-read-xml-file-in-java.html
// get dom doc
DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = dbfac.newDocumentBuilder();
Document doc = docBuilder.newDocument();
// Document doc = docBuilder.parse(new File(inputFilename));
// -- insert building dom here
// get dom transformer
TransformerFactory transfac = TransformerFactory.newInstance();
Transformer trans = transfac.newTransformer();
// make dom into something useful
FileWriter fw = new FileWriter(new File(outputFilename));
StreamResult result = new StreamResult(fw);
DOMSource source = new DOMSource(doc);
trans.transform(source, result);
Friday, September 05, 2008
WindowsXP on HP dv2716ca
XP can be installed and run on "Vista only" HP machines - at least on the dv2716ca - I have done so.
I don't like Vista. I gave it a fair chance, it was so bad - that I moved away from Microsoft completely, to Ubuntu. Ubuntu is a dream compared to Vista. I like XP - but lets face it, it's dying (or being killed). The future is Linux, Tiger and Vista. I'm not going to hold onto XP, the reality is, that if Microsoft doesn't move forward, and doesn't kill XP - they will lose to Mac and GNU.
I don't like Vista. I gave it a fair chance, it was so bad - that I moved away from Microsoft completely, to Ubuntu. Ubuntu is a dream compared to Vista. I like XP - but lets face it, it's dying (or being killed). The future is Linux, Tiger and Vista. I'm not going to hold onto XP, the reality is, that if Microsoft doesn't move forward, and doesn't kill XP - they will lose to Mac and GNU.
What follows, is a brief description of what is needed to get an HP Pavilion dv2716ca to boot Vista, XP and Ubuntu. The same should go for most dv2700.
I should put in here - HP does NOT recommend you do this. You probably will lose all support, and for all I know your warranty to. For that matter - don't hold me responsible if your computer is completely useless after doing all of this. Put on you adventure hat!
Install Ubuntu.
Your old XP code won't work, because it doesn't have the right drivers. If you slipstream it on Vista, your CD key might stop working. So you need to slipstream a XP install CD on an XP machine.
I don't have another XP machine, so I installed VirtualBox OSE on Ubuntu, and installed a copy of XP there.
You can do it manually, or the easy way, use nLite
I found my SATA drivers on the HP site, but they are on the Intel site also. (Intel Matrix Storage Manager - sp38088.exe)
Install XP and get back Ubuntu and Vista
XP will now work, but Vista and Ubuntu have disappeared.
There are a few million different ways to do this. Ubuntu is easy, but you need to fix Vista first, that's just how it goes. There are lots of places on the net that say how - I'm not going to repeat - Google it!
Getting Ubuntu back is easy also, I'm not going to pretend I know what bootloader you are using - so you have to figure that out. I used grub. Basically boot up Ubuntu with your live cd and Google it.
Install drivers
This the tricky bit. I spent a few hours using lspci on linux to identify drivers, and try them on XP. ALL the drivers are there. Mostly on the Intel site, and on the HP site. The only trick was the card reader - that took lots of searching.
The only thing I haven't been able to get to work thus far - is the sound. Well - it works, but plugging in the headphones doesn't mute the built in speakers.
I should put in here - HP does NOT recommend you do this. You probably will lose all support, and for all I know your warranty to. For that matter - don't hold me responsible if your computer is completely useless after doing all of this. Put on you adventure hat!
Install Ubuntu.
- Resize your Vista partition. I booted into knoppix and used gparted. Sizes are up to you. Make a NTFS partition for your XP install, and leave the rest of the space unallocated, for your Ubuntu install. I created a 5 gig XP partition, it's enough for XP and nothing else, because I'll be installing my software on my Vista drive, and on a removable hard drive.
- Install Ubuntu.
Your old XP code won't work, because it doesn't have the right drivers. If you slipstream it on Vista, your CD key might stop working. So you need to slipstream a XP install CD on an XP machine.
I don't have another XP machine, so I installed VirtualBox OSE on Ubuntu, and installed a copy of XP there.
You can do it manually, or the easy way, use nLite
I found my SATA drivers on the HP site, but they are on the Intel site also. (Intel Matrix Storage Manager - sp38088.exe)
Install XP and get back Ubuntu and Vista
XP will now work, but Vista and Ubuntu have disappeared.
There are a few million different ways to do this. Ubuntu is easy, but you need to fix Vista first, that's just how it goes. There are lots of places on the net that say how - I'm not going to repeat - Google it!
Getting Ubuntu back is easy also, I'm not going to pretend I know what bootloader you are using - so you have to figure that out. I used grub. Basically boot up Ubuntu with your live cd and Google it.
Install drivers
This the tricky bit. I spent a few hours using lspci on linux to identify drivers, and try them on XP. ALL the drivers are there. Mostly on the Intel site, and on the HP site. The only trick was the card reader - that took lots of searching.
The only thing I haven't been able to get to work thus far - is the sound. Well - it works, but plugging in the headphones doesn't mute the built in speakers.
Wednesday, August 20, 2008
Sony Walkman (NWZ-B105F) on Ubuntu
Every now and then Ubuntu isn't quite as user friendly as I'd like it to be - and I have to learn something new about linux.
This time, my dandy new Sony Walkman (NWZ-B105F) doesn't get auto-deteced when I plug it in. (It's being discontinued, so it's going for cheap at the sony store in Calgary)
Thanks to http://ubuntu-virginia.ubuntuforums.org/showthread.php?t=866297 - it's not a problem - just use pmount to mount a device accessible by any user.
where is my walkman?
sudo fdisk -l
mount it!
pmount /dev/sdb1 /media/Walkman
Done! Ubuntu pops up with a link on my desktop to unmount it - but it doesn't work - so I have to do:
sudo umount /media/Walkman
ALTERNATIVELY!!!
Go to the Sony site, and download the new firmware. Then it just works. :)

What have I been up to?? Nothing much... Last thing of note was going to Saskatchamawoozle.
This time, my dandy new Sony Walkman (NWZ-B105F) doesn't get auto-deteced when I plug it in. (It's being discontinued, so it's going for cheap at the sony store in Calgary)
Thanks to http://ubuntu-virginia.ubuntuforums.org/showthread.php?t=866297 - it's not a problem - just use pmount to mount a device accessible by any user.
where is my walkman?
sudo fdisk -l
mount it!
pmount /dev/sdb1 /media/Walkman
Done! Ubuntu pops up with a link on my desktop to unmount it - but it doesn't work - so I have to do:
sudo umount /media/Walkman
ALTERNATIVELY!!!
Go to the Sony site, and download the new firmware. Then it just works. :)
What have I been up to?? Nothing much... Last thing of note was going to Saskatchamawoozle.
Wednesday, May 14, 2008
Open Office - Outline Numbering (Springtime in Canada!)
I've been a MS Word user for way too long. So much so, that I struggle to use Open Office some days.
So. Lesson for today - when you want to have outline headings (e.g. something that looks like:)
1 Heading 1
1.1 Heading 2
1.1.1 Heading 3
1.2 Heading 2
1.2.1 Heading 3
You have to go Tools -> Outline Numbering -> then modify every damn heading to show the appropriate amount of sub levels etc.
It's springtime in Canada!!!! (Translated for people from real countries: This means, it snows less, and when it does snow, it gets mushy real fast)
Spring in Alberta(Calgary): "Fear not! That snow will be gone in a few days!"

Spring in Ontario(Toronto): "Fear no longer homeless bum! No longer need you hide in the caverns the welfare state has provided for your life of drug abuse and mental instability! The streets belong to you now!"

Spring in Quebec(Gatineau): "Flower while you still can buddy! The camera don't show it, but I'm standing in snow!"
So. Lesson for today - when you want to have outline headings (e.g. something that looks like:)
1 Heading 1
1.1 Heading 2
1.1.1 Heading 3
1.2 Heading 2
1.2.1 Heading 3
You have to go Tools -> Outline Numbering -> then modify every damn heading to show the appropriate amount of sub levels etc.
It's springtime in Canada!!!! (Translated for people from real countries: This means, it snows less, and when it does snow, it gets mushy real fast)
Spring in Alberta(Calgary): "Fear not! That snow will be gone in a few days!"
Spring in Ontario(Toronto): "Fear no longer homeless bum! No longer need you hide in the caverns the welfare state has provided for your life of drug abuse and mental instability! The streets belong to you now!"
Spring in Quebec(Gatineau): "Flower while you still can buddy! The camera don't show it, but I'm standing in snow!"
Tuesday, October 30, 2007
.NET - unsigned assemblies
Jyothish did some puzzle sovling - we had a unsigned .NET assembly, that we had to pull into unmanaged JNI code so we could call it from Java.
Problem was - you need signed assemblies to do it. The answer:
>sn -k Key.snk
>ildasm /out:MyHelper.il MyHelper.dll
>ilasm MyHelper.il /KEY=key.snk /DLL /OUTPUT=MyHelper.dll
The output can now be added to the global cache, and you can have a party
Problem was - you need signed assemblies to do it. The answer:
>sn -k Key.snk
>ildasm /out:MyHelper.il MyHelper.dll
>ilasm MyHelper.il /KEY=key.snk /DLL /OUTPUT=MyHelper.dll
The output can now be added to the global cache, and you can have a party
Wednesday, September 12, 2007
JAAS
Hard lesson learnt, playing with JAAS & Tomcat.
When using basic authentication:
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
it is NOT possible to log out programatically. You have to close the browser.
session.invalidate() will do NOTHING!!
I'm not missing anything. It's just not possible. The browser keeps the credentials in memory, and keeps re-submitting it. So calling invalidate serves no purpose, as the very next thing you try, will just end up with you being logged in again.
When using basic authentication:
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
it is NOT possible to log out programatically. You have to close the browser.
session.invalidate() will do NOTHING!!
I'm not missing anything. It's just not possible. The browser keeps the credentials in memory, and keeps re-submitting it. So calling invalidate serves no purpose, as the very next thing you try, will just end up with you being logged in again.
Sunday, September 02, 2007
Oracle - TOP N Queries
If I forget how to do Oracle TopN queries ONE more time - I swear - pig will pay!
"SELECT *
FROM (SELECT * FROM my_table ORDER BY col_name_1 DESC)
WHERE ROWNUM < N - http://orafaq.com/faq/how_does_one_select_the_top_n_rows_from_a_table
Saturday, March 03, 2007
Total Lunar Eclipse
The Event:
From time to time, the Universe puts on an AMAZING show. All one has to do, is pitch up. The 3rd of March, 2007 - was such a day. The event. A total Lunar eclipse.
Preparation:
Preparation for such events is VITAL. I packed my 8 inch Newtonian telescope, I charged and packed my Celestron power pack for the scope. I charged batteries for my Sony DSC-V1, and Canon 300D. I purchased ISO400 and ISO100 film, for my old school SLR. I packed a tripod. I purchased a Logitech Quickcam Pro 5000, and modified it by removing it's lens. I downloaded, installed, and tested remote capture software for the Canon. I experimented with the Quickcam Pro capture software, and made more adjustments to my modified webcam.
Getting there:
I drove to the other side of town, where I could have an unobstructed view of the celestial marvel about to unravel. I started unpacking my equipment, and settled into a good position.
Show time:
As the moon contacted the umbra - it started raining.
The payoff:
From time to time, the Universe puts on an AMAZING show. All one has to do, is pitch up. The 3rd of March, 2007 - was such a day. The event. A total Lunar eclipse.
Preparation:
Preparation for such events is VITAL. I packed my 8 inch Newtonian telescope, I charged and packed my Celestron power pack for the scope. I charged batteries for my Sony DSC-V1, and Canon 300D. I purchased ISO400 and ISO100 film, for my old school SLR. I packed a tripod. I purchased a Logitech Quickcam Pro 5000, and modified it by removing it's lens. I downloaded, installed, and tested remote capture software for the Canon. I experimented with the Quickcam Pro capture software, and made more adjustments to my modified webcam.
Getting there:
I drove to the other side of town, where I could have an unobstructed view of the celestial marvel about to unravel. I started unpacking my equipment, and settled into a good position.
Show time:
As the moon contacted the umbra - it started raining.
The payoff:
Tuesday, February 13, 2007
Saturn @ Opposition / Canon 300D vs. Labtech Webcam vs. JPL Spacecraft
Saturn is glorious.
My skills as astro-photographer, do not do him justice. He's at opposition right now. The Cassini division in the ring jumps out at you. Several bands crossing the surface of the planet can be seen as well.
It's glorious.
From left to right: Webcam (8 inch newtonian, stacked frames), Canon (8 inch newtonian, 2 layered images), JPL (Cassini-Huygens spacecraft, 4.5cm telescope)



In my defense, I might have a bigger aperture than JPL's toy.... but I don't have as good a CCD, and I'm looking from Centurion, whereas they get to go in orbit!!!
My skills as astro-photographer, do not do him justice. He's at opposition right now. The Cassini division in the ring jumps out at you. Several bands crossing the surface of the planet can be seen as well.
It's glorious.
From left to right: Webcam (8 inch newtonian, stacked frames), Canon (8 inch newtonian, 2 layered images), JPL (Cassini-Huygens spacecraft, 4.5cm telescope)



In my defense, I might have a bigger aperture than JPL's toy.... but I don't have as good a CCD, and I'm looking from Centurion, whereas they get to go in orbit!!!
Sunday, January 21, 2007
Saturn - I need better equipment
I must be doing something wrong. Naah. I blame the equipment. I thought I was messing up the focus, so I spent a lot of time practicing. In the end, I think the Canon is to blame. I suspect it's the shutter causes everything to vibrate. Can I be sure? Only one way to find out.... a decent CCD camera.... Sigh.... that costs money. Compared to what you see with the naked eye - this picture is up to sh#t.
Caz keeps on asking for a photo of the telescope, so here goes. ;)
Friday, January 19, 2007
Amateur Astronomy in Pretoria
So - as luck would have it - there was no rain! And very few clouds. I got word that the Amateur Astronomy Society of Pretoria would be setting up at CBC.
I got to see the comet a second time. Photo below taken at ISO 100, f9, 10 second exposure. Using CANON EOS 300D.

Too a photo of people standing around their telescopes. ISO 800, f2.8, 30 second exposure. Sony DSC-V1. Wasn't planning it that way - but you can see the Southern Cross rising.
I got to see the comet a second time. Photo below taken at ISO 100, f9, 10 second exposure. Using CANON EOS 300D.
Too a photo of people standing around their telescopes. ISO 800, f2.8, 30 second exposure. Sony DSC-V1. Wasn't planning it that way - but you can see the Southern Cross rising.
Monday, January 08, 2007
Long exposre - v.s. Layering
Saturday, January 06, 2007
Astrophotography - layering
So this weekend, I started getting a feel for my 8" without the moon interfering, and a few kilometers away from the worst city lights.
Equipment again: 8" Newtonian & Canon 300D (you can see from the Tarantula photo - that the Canon introduces a lot of garbage... will have to see what we can do about that)
---
m42
---
I started of with good old Orion again. 10 second exposure at ISO1600. No star trails! Amazing - considering that polar alignment consisted of me guessing the general direction of South!
I've gotten rid of the shakes - Canon has some nice software for taking photos via USB - so you don't have to touch the shutter.
---
ngc2070
---
Went on to something much cooler - the Tarantula Nebula (ngc2070) - which was cool, because as a bonus I got a globular star cluster in as well! (ngc2100)
For Tarantula, I tried out taking multiple exposures, and overlaying them. What you see - are 5 exposures, 4 seconds each, at ISO 1600. I couldn't take longer than that - because my polar alignment was too bad.
Equipment again: 8" Newtonian & Canon 300D (you can see from the Tarantula photo - that the Canon introduces a lot of garbage... will have to see what we can do about that)
---
m42
---
I've gotten rid of the shakes - Canon has some nice software for taking photos via USB - so you don't have to touch the shutter.
---
ngc2070
---
Went on to something much cooler - the Tarantula Nebula (ngc2070) - which was cool, because as a bonus I got a globular star cluster in as well! (ngc2100)

For Tarantula, I tried out taking multiple exposures, and overlaying them. What you see - are 5 exposures, 4 seconds each, at ISO 1600. I couldn't take longer than that - because my polar alignment was too bad.
Thursday, January 04, 2007
A problem with XSL transformations in Java 1.5
If you are like me, you probably tried to use javax.xml.transform.dom.DOMSource as your XSLT source, and your XML source.
If you are like me - you spent hours and hours, trying to figure out why your XML wasn't being transformed.
I don't know why. But you HAVE to use javax.xml.transform.stream.StreamSource.
Making the code:
// get the files
File xsdFile = new File("xsd/xml.xml");
File xslFile = new File("xsd/xsl.xsl");
// turn them into stream sources
StreamSource xsltSource = new StreamSource(xslFile);
StreamSource xsdSource = new StreamSource(xsdFile);
// get transformation stuff
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer(xsltSource);
// set up for sending the output to screen
StreamResult scrResult = new StreamResult(System.out);
// transform
transformer.transform(xsdSource, scrResult);
If you are like me - you spent hours and hours, trying to figure out why your XML wasn't being transformed.
I don't know why. But you HAVE to use javax.xml.transform.stream.StreamSource.
Making the code:
// get the files
File xsdFile = new File("xsd/xml.xml");
File xslFile = new File("xsd/xsl.xsl");
// turn them into stream sources
StreamSource xsltSource = new StreamSource(xslFile);
StreamSource xsdSource = new StreamSource(xsdFile);
// get transformation stuff
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer(xsltSource);
// set up for sending the output to screen
StreamResult scrResult = new StreamResult(System.out);
// transform
transformer.transform(xsdSource, scrResult);
Tuesday, January 02, 2007
My first deep space foto
This is my very first (and I mean that literally) photo of a deep space object (something not in our solar system) taken through a telescope.
It's the Orion Nebula (M42/NGC1976). Seeing as my scope isn't aligned at the least - I'm pretty impressed. Just as luck would have it - there's a meteor streaking by as well!
Equipment: Canon 300D, 8 Inch Newtonian
Exposure: 30 seconds, ISO 1600
The picture was actually horribly overexposed (there's a full moon out) so I had to touch it up a bit.
I also finally have a semi decent photo of the moon!
Friday, December 29, 2006
It's called "prime focus"
I'm still battling with clouds!!! I have yet to take a single photo, without a cloud obscuring my vision!
Getting a handle on the webcam settings!
Best thing this far, is "prime focus". Which basically means - you have no secondary lens, only a primary. It seems to work rather well! Registax certainly likes it a lot more.
There is of course some minor touching up being done (unsharp mask, change to b&w - and dropping images down to 320x240 from 640x480)
Getting a handle on the webcam settings!
Best thing this far, is "prime focus". Which basically means - you have no secondary lens, only a primary. It seems to work rather well! Registax certainly likes it a lot more.There is of course some minor touching up being done (unsharp mask, change to b&w - and dropping images down to 320x240 from 640x480)
Wednesday, December 27, 2006
Getting better already....
I've been reading up on astrophotography a bit.Modified my logitech webcam to have a bit of a nicer fit. Used framestacking with Registax
It also helped that it wasn't AS cloudy. But I'm still taking photos through clouds.
Tuesday, December 26, 2006
First time!
Not much to look at. But this is my first photo, taken with a webcam. With this, I now officially have become a webcam astrophotographer.For the technically inclined, it was taken with a crappy 4" newtonian telescope, with the moon low on the horizon, and partially obscured by clouds. (It's been raining for weeks!) I still have to find the exact specs of the webcam...
I'm still waiting for my kick ass celestron to be delivered, so I got frustrated, and starting playing with toys that I can hook up to it.
Saturday, November 12, 2005
Digital vs. Analog

Finally got round to developing the pictures I took with my Olympus.
Given the amount of photos I took with digital - vs analog, and given the amount of them that came out good - analog feels like it still has the edge for me.
That said - out with the old, in with the digital!!!
Subscribe to:
Posts (Atom)
