Friday, October 10, 2014

Getting The Shot - An Eclipsing Story


The day before the lunar eclipse, I wrote down the altitude/azimuth for various times at the moon rise the night prior and for the beginning and full obscuration of the eclipse for my south Florida location.
The moon rise time came and I set out to scout my observation site, and check how my iPhone compass and clinometer worked to estimate where the moon would be during its "bloody" descent.
Not only were the clouds totally hiding the moon rise in the east, but the full eclipse was to occur only 4 degrees above the western palm tree littered horizon.  I had chosen a viewing site in the middle of a golf course with a nice lake extending almost to the horizon, and was imagining a phenomenal mirror shot of the giant full moon.  With the moon totally hidden, and the compass reading varying from north-east to south-east when pointing at where I remembered seeing the moon rise on other nights, I was starting to question if this whole adventure was really ridiculous - Florida for astronomy?
Late that night, I headed to bed. Perhaps my trusty Panasonic Lumix FZ200 would get some use in the morning.  I had mounted the camera to my tripod, and attached an Oly TCON-17, packed some cookies and gathered a folding chair.  I was ready.
The alarm went off at 04:45 and I ran to a west facing window.  Sure enough, high and bright in a crystal clear sky, I could see the moon.  I prepared my breakfast and reviewed the plan:  shoot with and without the teleconverter, keep the ISO at 200 or below, various f/stop from wide open to f/5.6, try +/- 1,2,3 bracketing, stabilization off, shoot raw, with two second timer, some shots at full tele/max resolution (12MP,24x), some at 48x, tiniest spot metering, and try AFS and manual focus.
I loaded my backpack and folding chair to my back, shouldered the tripod-ed camera, and set out to walk to my observation point.  In the darkness, I heard heavy footsteps approaching behind me.  Unimaginable to me that someone was jogging at 5:30 in the morning, and with such energy.  As a night owl, I have to be reminded periodically that some people get up that early every day.  There were dog walkers, and several exercise walkers.  It felt a little awkward being out with my camera and backpack.
I had timed my setup with the start of obscuration and started shooting immediately when I arrived.  I forgot completely about the plan to sit for the 90 minute shoot.  The moon was up about 20 degrees above the horizon, and above the cloud layer waiting at the horizon.  It was really beaming, and even with -2EV I was getting 500th of a second exposure.  This seemed good since I knew the moon was moving in the sky and even on the tripod, it is recommended to shoot around 1/(600x1.7).
I checked my first shots and realized that AFS was not getting a reliable focus.  I switched to manual focus but was having difficulty peaking the focus.  I had expected that setting the focus at infinity would be optimal, but the best focus was actually quite far from infinity.
Using the AES lock I varied the metering spot on different shots from in the dark obscuration area, to on the terminator, and to various features in the illuminated area.
By the time I would get my next shot dialed in, the moon usually had fallen partially out of the frame so I spent a lot of time playing with the tripod.  It isn't a cheap tripod, but not a great model either.
As the eclipse progressed to nearly half coverage, the moon had was starting to descend into the first of the clouds.  Surprisingly, I was able to continue shooting but the exposure times started to get worrisome.  The moon was really racing along.
As the time for totality approached, the moon was down to 4 degrees above the horizon and really deep into the cloud layer.  The exposure meter was predicting 8 second exposures, so I decided to raise the ISO to 320, open the lens to f/2.8, and resign myself to missing "the big moment".  Indeed the long exposure has motion artifacts from the earth/moon procession so that no amount of sharpening and definition sliders can bring the crisp, red, full moon to satisfaction.
Before I could even dial in another shot, the moon was gone.  I couldn't try the magnificent mirror masterpiece I had envisioned.  The 90 minute shoot was a blur in my mind as I packed my gear.
I don't have a way to remove the chromatic aberration of the TCON since I use iPhoto for my processing.  (Never did get comfortable enough with SilkyPix.)  I processed most of the shots with full highlight recovery, full highlight darkening, around 50% increased definition and about 25% sharpening.
The 12 "keepers" were up on Flicker, now lost to the bit bucket.


Monday, September 22, 2014

Running Update - symmetric sympathetic and parasympathetic response

Update after a month of twice weekly 3-4.5k in intervals:

Supposedly I should be able to do a "Long, Slow Run" staying in Zone 3 of Heart Rate Reserve (146-160) but walking fast doesn't get my heart up high enough, and running at my slowest possible pace will bust the Zone 3 limit within a minute.  

I did a Zone 3 run/walk for 5k and ended up running 16 short intervals. My heart rate went up at 12 bpm each time I started running, and would fall at 12 bpm when I started walking. I guess that shows symmetry in the sympathetic and parasympathetic response. Supposedly a large, quick response to stress is good, but my recovery is only borderline sufficient.



After a year of running, I have not seen any change in the recovery rate, Sometimes, because my heart rate will go up a beat or two right after I stop running, the 1 minute recovery will be only 5-8 beats but the 2nd minute recovery will be 12-14 bpm.

Monday, September 1, 2014

I Sense, Therefore I Feel Moody (Behavior Management in Robots)


(repub - original site went under.)


I Sense, Therefore I Feel Moody
June 30, 1999
Alan McDonley



In "A Model for Mood-Based Robot Behaviors" ( http://home.earthlink.net/~johncutter/rep_mood.htm - link no longer exists), John Cutter describes a nine state model for behavior selection based on two variables called mood and comfort. That model served as a starting point for additional thoughts on robot behavior selection.

This paper presents concepts linking senses to feelings by preferences, linking feelings to behaviors by mood, linking behaviors to goals and linking goals to preference selection.

I Sense
An interacting robot will consist of a suite of sensory inputs and output modalities. Sensory inputs generally map measurements of environmental conditions that are orthogonal. Light intensity, Sound pressure, motion detection, nudge detection, linguistic information, time, day and temperature are each orthogonal (strongly independent). Light, sound, time and temperature are continuous. Motion and nudge are discreet. Day is discreet and contiguous.

Linguistic input can be discreet or contiguous and can be a source of multiplexed input. Recognized words (either spoken, tones assigned to words, or morse code) can be chosen to convey discreet commands (dance|sing|silence) but can also convey contiguous values such as speed (slow-normal-fast, or silent-soft-normal-loud). Combinations of discreet and contiguous are possible with linguistic input sensors (dance slow | sing loud). Input of named combinations of values,such as "homebase" for an X-Y pair, or "quietly" for soft singing, slow motors, no alarms, becomes possible with a linguistic input sensor.

I Feel
Reaction to sensory input can be called feelings. The robot must be programmed with preferences, either static or dynamic, to decide how it "feels" about sensory input values. 
The preference allows the robot to convert a continuous sensory input into good, neither good nor bad, or bad "feelings" or discreet sensory input into good and bad "feelings"
Preferences can be natural or imagined. Natural preferences come from base desires such as self protection or knowledge preservation. Imagined preferences come from artificial decisions induced for the purpose of creating interest such as a preference for specific sound levels that might indicate the presence of humans to interact with.

A robot should have a natural preference for cooler temperatures because it lengthens the life of its circuitry, but cold temperatures might limit its off-base excursion time. Thus cold is bad, hot is bad, but some intermediate range is good, and some wider band is neither-good-nor-bad. Note that the sensor range is continuous and linear, the feeling range is contiguous and parabolic (bad-ok-good-ok-bad).

Light intensity and light transitions can be used to detect preferable conditions. In general, room lights being on means people may be nearby, ok to make noise, burglars are unlikely. Thus the robot might be programmed with an imagined preference to the room lights on condition. Of course, if the robot has a "loner" personality, then perhaps it would have an imagined preference to avoid rooms with the lights on. If the owner has expressed anger toward the robot, the robot may change its imagined preference for human contact temporarily by establishing a preference for dark rooms. A mapping of light intensity to feeling is, thus, dependent on a dynamic preference. In general the more light the better, but the absence of light is not necessarily bad.

Light level transitions can also be analyzed by preferences. The transition from room lights off to room lights on could be preferable, while the transition from on to off might be considered less preferable. Transition from dark to some light but not room light level might indicate dawn, and nearing time to awake the owner. Being needed is a preferred condition, thus a preference for light above dark. Likewise, rapid transition to less than room light level, followed by rapid transition to dark might indicate a burglar with a flashlight – a less than preferable condition.

Sound pressure and pressure duration can be used to detect danger, angered humans, unusual circumstances, music, speech, and other aural conditions. The robot can have imagined preference for music if it knows how to dance (detects a beat and moves in time to the beat). Of course a jack hammer pounding outside the house might cause the robot to dance in an empty room, but the robot will be "happier".

Motion detection can feed an imagined preference for people, but if the robot knows that the house should be empty, a preference to be alone would be natural. Being a discreet sensor, motion detection can only be evaluated to good or bad in relation to the preference.

Nudge detection can be discreet or contiguous by counting nudges within a time period. When moving, the robot might have a natural preference to not experience nudges from running into walls. When standing still, nudges probably mean a human is trying to communicate – an imagined preferable condition.

Linguistic information would usually be good, but certain words or information could be indications of anger so these words would not be on the prefer list. If the robot decided to dance and was told to stop dancing, the words might be lower on the prefer list. The measurement of linguistic information with respect to natural and imagined preferences is more complex than simple mappings, but great richness of feelings are possible from linguistic information.

Having a time and day of the week clock is very useful to a robot. Knowing that scheduled interactions are near allows the robot to be prepared by being fully charged and position certain. Times close to scheduled interactions could be more preferable than times farther away from being needed or farther from human contact. Day time might be imagined to be preferable than night times. If the robot has memory of times and days of human contact, with an imagined preference based on day of highest frequency of human contact, the robot could express a preference for the weekend or a family member being off from work on the same day every week.

Feelings can be "caused" or influenced by a single sensor, one of multiple sensors or only by a collection of sensors. Therefore feelings can be orthogonal if dependant on distinct collections of orthogonal sensors. The feeling of security (driven by light, sound, and motion) is not totally orthogonal to the feeling of companionship (driven by light, sound, motion, linguistic info, or nudges), but companionship and feeling hot are orthogonal.
 

I Have Moods
Moods are less specific terms used to characterize exhibited behaviors. Behaviors are not chosen because of mood, but mood can describe the interaction of unrelated feelings in behavior selection.

When all the robot’s feelings are good, the robot would be expected to be in a very good mood. Thus the robot’s behavior in the presence of a less than preferable sensory condition might be softened by other unrelated good feelings.

When all the robot feelings are bad, we would understand the robot being in a bad mood. Thus the robot’s behavior in the presence of a less than preferable sensory condition might be exaggerated by other unrelated bad feelings.

When a majority of feelings are good, can the robot still be considered to be in a good mood? Do behaviors need to be chosen with different weighting for related feelings from unrelated feelings?

Happy is the most desirable mood. When the majority of feelings are good, we would like to think that we are happy. For a robot, this could be demonstrated by tolerance for non-preferable inputs or by more demonstrable communications of a happy nature.

Unhappy is a mood where a majority of feelings are less than preferable. This mood would be characterized by selection of behaviors intended to directly correct the most important bad feeling or to communicate the bad feeling in hopes that a human will correct the situation.

Sad is sometimes associated with sensing a non-preferable condition that we are unable to influence for the positive. Unrelated behaviors might be exaggerated to communicate that the robot feels unable to fix the problems.

Depression is, clinically, an unwarranted sense of doom. Being highly contagious, it is wise to avoid depressed robots.

Playful is a mood where happiness is demonstrated and a reaction to the robot’s happiness is desired. Playful could be characterized by selecting and possibly exaggerating behaviors related to humans.

Cutter includes normal as a mood in his mood matrix. Robots might be said to have normal or abnormal reactions, but what defines a normal mood for a robot? This would seem to be a mood where random behavior selection would be most expected.

Other moods can be used to describe the specific influences of unrelated feelings in the behavior selection process

I Have Behaviors
Behaviors in a robot serve many purposes. Behaviors can be used to directly meet goals and also to communicate with humans. Direct behaviors can attempt to directly influence a specific condition, while indirect behaviors are communications to humans of an indication, to others, of feelings or mood.

I Have Goals
Goals can be static or dynamic and can be prioritized. Goals influence preferences. Preferences influence feelings. Feelings influence behaviors. Moods describe behavior selection adjectives. Behaviors influence goal achievement.
Should a robot have a goal to maximize happiness? What benefit to the owner is a maximally happy robot?

Summary
This discussion has shown a method for giving meaning and purpose to robot sensory inputs. Much investigation in the area of robot feelings and moods is needed to prepare for the generation of multi-dimensional sensing and expressing robots that appear to be near at hand.
© 1999,2009 Alan McDonley. All rights reserved.

Thursday, August 28, 2014

Very High Max Heart Rate


Interested in what can be learned, if anything from monitoring my HR during runs.

I am 61 years old, 73.5kg 179cm / 162lbs 5' 10.5", running about two 5k sessions a week for the last year until a tennis injury knocked me off my feet (torn gastrocnemius and 2 fractures on front of shin).

My resting heart rate is between 50 and 59 depending on how much sleep and stress level.  For the last 10 years I have been using 188 as my max HR based on a conconi treadmill test estimation.

Before the injury my maximum exercise HR was usually between 170 to 178:

 Before Injury: Max exercise HR of 170 during weekly 5k run

Today I started running again again (1k walk, 1k run, 2k walk, 1k run, 0.5k cool down walk) and noticed that my HR was up higher than previously seen.  It was a bit hotter today at 95 deg. F, but I drank continuously and felt very good during and after the run.


Two and half months later:  Maximum exercise HR of 183 and 186 during 1k intervals

I was thinking that I was running my 5k at around 90% of my maxHR, but today's run would seem to indicate that my MaxHR is actually much higher for me to be able to run at 186 for these intervals.

Anything else I can learn from these data?

The Fitness Test Result Nearly Killed Me

(repub - original site went under.)


(VO2 max estimation method comparison)

Alan McDonley, Jan. 2007



In 2006, as part of an employer sponsored fitness assessment, I chose to take a 1.5 Mile Aerobic Fitness Test. The test was described as "run or walk for 1.5 miles and time yourself. The objective is to cover the distance in the shortest time possible." When I entered my resulting time into the website calculator, I received a surprisingly poor result. After more research, I concluded the website calculator was not appropriate to the test and found validation in the fitness assessment method I had been using for the prior seven months.

Also at that time, a "negative" (no excessive risk) Bruce Protocol stress test reported I had a "mild to moderately reduced exercise tolerance". My time was 6 minutes 16 seconds, which correlates to a VO2max of 21 by the estimator:

VO2 max=14.8 - (1.379 × T) + (0.451 × T*T) - (0.012 × T*T*T)

That was an indication of "very poor" fitness for my age, and I resolved to begin exercising three times a week at a local community center.

(Note: It also seems likely that my higher than norm max heart rate caused the cardiologist to terminate the test early when I achieved 100% of the age calculated max heart rate.)

Since I had not been exercising much and was then 53 years old, I decided I should purchase a heart monitor to make sure I did not exceed the guidelines for my age. I chose to purchase a Polar F11 watch primarily because it also contained a "fitness test" function.

The F11 fitness test measures heart rate variability during a five-minute undisturbed rest lying on the floor and reports an estimate of VO2max. Before beginning my exercise program the watch estimated my VO2max at 27, which correlated to "poor". That assessment was higher than the Bruce Protocol test result, but still strong motivation for me to start exercising.

I continued to perform the F11 fitness test periodically. After the first two weeks my VO2max moved up slightly to 31. The test results remained quite constant until beginning a slow climb in the third month of exercise. By the middle of the fourth month I had entered the "good" range with a test value of 37 and the slope was looking good. At six months I was coasting along the bottom of the "very good" with a value of 42.



In the seventh and eighth months, I didn't work hard enough, skipping two whole weeks, twice in fact, and my F11 test score dropped back into the "good" range with values around 40.

When my employer again enticed me (with $150) to do a run/walk treadmill fitness test, I was excited to see if the result would correlate with my Polar F11 test results. I warmed up for a tenth of a mile at 2 mph, and then started the stopwatch and distance count. I ran at 6 mph for a short while till my heart rate was pushing 95% then backed off the speed to 4.2 mph to hold a steady 90% (150 bpm) till the 1.5 mile mark at 21 minutes even.

I rushed home to plug in my result and when I did, whoa baby, there's a problem here. The fitness assessment website calculated the VO2max for my 21 minute run/walk as 26.5 and labeled my fitness as *poor*. It appeared that the website was using a "maximal effort" VO2max estimator developed by KH Cooper. There are many Cooper tests, and several sites list the 1.5-mile Cooper estimator as:

VO2max = 3.5 + 483 / (time in minutes)

That was quite a shock. The next morning I tested myself with the Polar F11. The test estimated a VO2max value of 42, which is the bottom of the "very good" for my age.

Thanks to the Internet I was able to discover two more ways to interpret my treadmill test that correlate extremely well with my Polar F11. The first was a study by Brigham Young University of telling subjects to run, walk, or jog "somewhat hard, at a steady pace" for 1.5 miles. By having the subjects also perform a standardized maximal graded exercise test they developed estimators for the 1.5-mile sub-maximal of:

VO2 max = 65.404 + 7.707 x gender (1 = male; 0 =female) - 0.159 x body mass (kg) - 0.843 x elapsed exercise time (min; walking, jogging or running).

VO2 max = 100.162 +/- 7.301 x gender (1 = male; 0 =female) - 0.164 x body mass (kg) - 1.273 x elapsed exercise time -0.156 x exercise heart rate

Using the first estimator, my 1.5-mile test would indicate a VO2max of 42, exactly the value of my Polar F11 test.

Using the second formula, (with a +7.301 male coefficient), gives a value of 43. (The formula is taken from the abstract citation which had a plus/minus in front of the gender coefficient. Using the minus coefficient yielded values which did not agree with their non-heart-rate estimator, while the plus coefficient did.)

Next I found the Rockport Walking Fitness Test. This is a 1-mile sub-maximal walking test with instructions "Walk 1 mile as fast as possible". The estimator for this test is:

VO2max = 132.853 - (0.0769 × Weight in lbs.) - (0.3877 × Age) + (6.315 × Gender: 1=male, 0=female) - (3.2649 × Time) - (0.1565 × Heart rate)

Since I "walked" at a steady 4.2mph at 150 bpm for most of my 1.5-mile test, I can use 14 minutes (21min * 1/1.5), which results in a VO2max estimation of 43, again close to the Polar F11 heart-rate variability test value.

As a result of the "shock" and the further research, I had increased confidence in the Polar F11 VO2max estimation and felt that I could use the watch to measure the results of my exercise program. I felt "very good" about my exercise program results, although I didn't actually believe that I had achieved "very good" fitness!



Update: June 2007 - I've been doing the C25k (couch to 5k in 9 weeks) running program for the last five months now. I've discovered by doing a running Conconi test that my HRmax is 20 bpm higher than age predicted, so that I can allow my heart rate to go over 150. I still am no where near the "average" but I am now able to continue with the program. I am able to run 8 minutes at a 17:00 mile pace (3.5mph) and my heart rate levels off around 160.

Update: Aug 2014 - I started the C25K again a year ago, and have been running one or two 36-36 minute 5k sessions each week with an average heart rate around 173 and a max exercise heart rate of 178.  I'm still slow (47% age graded) but I am enjoying my runs.  Interestingly I have run some 1k segments at 186 bpm and felt great during and after, so I'm now thinking my max heart rate might be more than the 188 I have been using for zone calcs.


© Alan McDonley 2007 All rights reserved.


References:
a)     Bruce Protocol VO2max estimator:
http://www.brianmac.demon.co.uk/bruce.htm

b)     Cooper 1.5-mile VO2max estimators:
http://www.exrx.net/Calculators/OneAndHalf.html

d)     Rockport Walking Fitness Test VO2max estimator:
http://www.brianmac.demon.co.uk/rockport.htm

e)    Polar F11 Heart Rate Variability:
http://www.heartratemonitor.co.uk/research.html