|
|
Apple crisp. I normally don't like sweet smells, but this incense isn't as sweet as I had expected. Doesn't quite smell like baking apple crisp, but I do enjoy it. I've added 2 additional sizes to my standard image gallery: 3600x3600 and full-size. This significantly increases the size needed by each photo, but seemed necessary. My current camera shoots frames at 5184x3456 (18 MP). With the previous max size of 1800x1800 just didn't deliver the detail my camera can give. So the additional sizes should take care of that. The down side of the additional sizes is the footprint taken by my gallery. Storage for 18 pictures went from 18 MB to 130 MB. That isn't really a problem though. The Micro-Dragon has a 500 GB hard drive with 405 of that space free.
|
|
|
|
Our heatwave continues. Rodney House (our house here in Madison) has central air conditioning, but it is struggling with these temperatures. The air conditioner runs almost continuously during the day. To assist, I went around the house and moved items away from heating vents and returns, and then placed fans by them to help pull the air into the rest of the room. That helped, so it is livable in the house.
|
|
|
|
I've been on an LED lighting kick lately. I've used dimmable compact fluorescent bulbs in my desk lamps for a couple of years now, and I've never been happy with them. Most of the bulbs I have tried have a poor range they can be dimmer, or flicker when dimmed. Then one good bulb I had died. Compact fluorescent bulbs are suppose to last 10 years, but I've never had one come close. So I decided to visit my favorite home improvement store and look at some lighting options. On sale were dimmable LED bulbs. Although they were still twice the price of dimmable CFL the price was low enough to give them a shot. I picked up one 8 watt 3000K bulb made by Sylvania. I was immediately pleased. The bulb dims the full range without flicker, and the color is fine. I liked the bulb so much, I went back and bought a second bulb to replace the remaining dimmable CFL I had. But this got me thinking... One item I wanted create with my setup in Madison was the illuminated under-bench lighting system I use to have in my setup at Park Place. This original setup used four 25 watt tube lamps under the benches connected to a dimmer. This gave my area a very warm feeling that I've yet to be able to replicate. At the Garage I tried using halogen under cabinet lighting, but they ran hot and concentrated the light too much. For my Madison setup, I looked into many options during my initial build: LED, halogen, thin fluorescent tubes, and incandescent. I settled on incandescent rope light for cost, but even with it's 300 watts of power consumption it didn't produce enough light to be all that useful. A couple weeks ago I tried using a 3100 K LED fixture I bought. Although it said it wasn't dimmable, it clearly was. The LEDs were fed from a bridge rectifier--no transformer, and no voltage regulator. That means there is just a load resister and the LEDs are driven from the 0-170 volts of the rectified voltage. There isn't even a capacitor to clean up the ripple (therefore, these LEDs flicker at 60 Hz). I found the "warm" color of 3100 K too cool. So I would have to find something else. Something I have wanted to investigate for awhile has been LED reels. These are flexible printed circuit-board populated with LEDs. The price when I first started looking into them was about $50 for 15 feet, which was far more than I wanted to spend. In addition these reels require 12 volts and I would have to have a power supply and PWM dimmer to do what I wanted. The other day I was looking again and the price had dropped to $15 for 15 feet. I don't know the details about why the price is so low (you can still find LED reels listed for $70), but this was now an economical option to investigate. Since the 3100 K LED fixture I bought was too cool, I ordered the warmest color I could, 2700 K. When the reel arrived I got to break out the soldering iron. I used some speaker wire and soon had a 36" strip of LEDs mounted above my display shelve. A single row using this light was brighter than the three rows of rope light. And this single row draws all of 5 watts. The illumination is good, but the color isn't what I had hoped for. While it is a warmer color it has too much green. I'm considering adding a row of red or amber LEDs to warm the color up further. For now, however, I am pleased with the results.
|
|
|
My gallery rewrite project is the first time I have used jQuery, and now I hardly know how I use to live without it. I have always found Javascript a tricky language because of what it takes to make projects work the same in different browsers. jQuery helps with this, although I have found some things that do not work across all browsers). One item that takes some getting use to is the heavy use of anonymous functions (sometimes called Lambda functions). Almost everything in jQuery gets a callback function, and a completely legitimate (and useful) way of implementing these functions are by using anonymous functions. Although these parts of the code are separate function calls, they are coded and look as if they are inline. This is both good and bad. It's good because you do not have to break the code into several smaller functions that are all declared by themselves. So relevant code is located close together. However, because the callbacks can be asynchronous one must be careful to understand the the linear look to the code may be deceiving. For example, some of the AJAX functionality of jQuery allows a callback function to be defined after the data has been returned. Using an anonymous function for the callback makes the code look as though all of that code will run sequentially. However, the code after the anonymous function will run first, because the AJAX call will not run the callback function until the server has returned data. This is similar to writing threaded code and one must understand how things can get out of synchronization. One thing that makes this consideration easier is that Javascript is single-threaded, and test-and-set semaphores are not required. Writing the scripts has been greatly aided by a Firefox plug-in called Firebug. This debugger does a really good job of providing a powerful tool to developers. The only downfall of this plug-in is that sometimes simple syntax errors, such as missing a coma in function parameters will cause an entire Javascript file not to be included at all. This may have something to do with how Firefox parses the script, but the complete lack of any feedback can be a pain. But the benifits of this tool far out weight it's shortcomings.
|
|
|
|
For the last several days I've been working on rewriting my image gallery interface. This is work long over due—my current setup is so 200x. Seriously though, a lot has changed in PHP, Javascript, and HTML since I first wrote those scripts. Those were also the scripts that taught me PHP and MySQL. I wanted to go back and do things a little cleaner. The first things I started with is was the PHP scripts that query the database. PHP 5 added a wonderful class interface, and I have long wanted a good project I could implement in it. The database for an image gallery is laid out into 3 main categories: pictures, galleries, and gallery groups. Gallery groups contains sets of galleries, and galleries contain sets of pictures. There are more tables than this, but these categories are perfect demarcations for classes. The first class I implemented is a child of 'mysqli'. I overloaded the 'query' function to throw an exception when the query fails. It also has the names of tables found in the gallery. Table names have a unique name appended to the front so multiple galleries can be assigned to a single database. The next class I call a database field. It is an abstract class that has two major functions: get attribute and set attribute. These are driven by two internal function: fetch from database, and push to database. It needs a database, the name of the table, and an id for the record each instance will represent. Now when a record is to be read or written, this class handles the database side of life. In this way, the child class only needs to know basics about the table it works with. Each of my gallery implementation could have different table layouts for pictures. In the main gallery on DrQue.net pictures have information about the ISO, lens, f-stop, ext. Other galleries have other settings. This I did not want to matter at this level—the classes should be able to represent themselves without knowing all the details about what they will contain. So the get/set attribute interface allows the class to be mostly ignorant of the table layout—there are just a few key fields required to make the gallery run. Everything else is optional and handled at a lower-level, such as the scripts that will build HTML from the gallery data. The child classes of the database field are then pictures, galleries, and gallery groups. A gallery group has the ability to retrieve an array of galleries, and a gallery an array of pictures. But neither class cares if the table has an entry for the name of the gallery group/gallery. They only need the ID field for the record their instance represents. This system allows a lot of flexibility while remaining very simple. The largest class, the picture class, is currently only 200 lines of code, and several of those lines are comments. On the implementation side, things have been very smooth. Although I have a lot of aesthetic work to do yet the gallery view is completely functional requiring no rework to this class system. The picture today is one I took in the early morning hours. I tried some more High Dynamic Range (HDR) work, this time outside under the stars. There were two problems with this shoot: wind, and the Earth's rotational speed. Both of these caused my images not to align completely, resulting in strange artifacts when I applied the HDR process. As for the wind, I can simply try again on a calm day. But the star field movement because of the Earth's rotation isn't anything I can work around. So interesting pictures, but not the greatest.
|
|
|
It has been a long time since I updated any of the information on me work area, so I decided to make a page about my current setup in Madison called the Kobold's Cave. Pictured is my primary work area in the Kobold's Cave. This is actually the first time I have used High Dynamic Range (HDR) imaging. Since this work area has fairly extreme contrast this shot was a good candidate. The image is comprised of 9 images, from -6 to +2 F-stops.
|
|
|
The other day I received an e-mail with questions about my least-square regression PHP class. I haven't touched this implementation since I wrote it for an article on least-square regression in June of 2009, so it's time for a demo. The original implementation used Cramer's Rule to solve the resulting system of equations. I wrote in May of 2011 an article about a faster method for doing this. So I decided to implement that method and then make a demo to show how the regression curve fits data. This demo has a number of black points that can be moved around to form a polynomial curve. The thin red line in the center represents the true polynomial curve. The blue dots represent data points along the true curve with random error introduced. The scatter and concentration of the error can be controlled with the two sliders. The higher the concentration value, the closer the error will fall toward the curve. The scatter magnitude controls how much it is possible for the error to deviate from the true data. The data with the random errors is then used as input to the least-square regression function, and the output of that function is displayed in green. So the green curve should match closely the red curve. What this simulation shows is the ability of the regression function to recover polynomial coefficients from a signal with a fairly low signal-to-noise ratio with pretty good accuracy. The function must assume the data is from a polynomial of a specific degree. The real-world applications are probably limited, but surely exist—especially with lower degree polynomials. From experimentation, it seems that curves that have higher curvature are reconstructed the best. That is, curve that change a lot do better than curves that are fairly flat. The fit of the curve is being measured with residual sum of squares. The lower this value, the closer to the regression curve is to the actual curve with zero being perfect. In this graph, values below 0.5 are pretty good fits, and values below 0.01 put the true curve (in red) in the regression curve (green). I updated the least-square regression PHP class page with the new version of the class, added some documentation, and some examples. If one person found this class useful, maybe more people will as well.
|
|
|
|
|
|