Repairing a Petzl Tikka XP2 headlamp

Headlamp wouldn’t turn on, and there is damn little info out on how to open the #$@! things. I figured it out, and to pay my karma for other projects, I documented what worked for me.

So my trusty old Petzl Tikka XP2 stopped working. The top button got loose and became a flap, then even pushing the micro button directly, it wouldn’t turn on.

The first order of business is how to open the damn thing. I began by opening up the headlamp to get access to the batteries. It hinges at the bottom, some minor side force and the headband back of the lamp will pop off cleanly.

Then came the screw problem. Once you remove the back of the headlamp, and then the batteries, you’ll see two tiny screws. Those are not Philips, they are Torx screws. Specifically they are Torx T5 screws. So I had to buy a set of Torx screwdrivers off Amazon. $12 right there, but I will use them for other project.

Unscrew those two screws. Once they are out, the electronics still won’t come out of the shell. You will have to unclip the two plastic clips at the top of the battery area near the switch. Use a small screwdriver, and very little force.

It popped out with some gentle tugging. Once the electronics was out, I examined the case. The little front diffuser door popped off, but I’ll deal with that later. To fix the red button I used superglue to seal up the red rubber button to the case so it was water tight again. Then I clicked on the PCB micro switch button to see if I could figure out what was wrong.

This button had become corroded and was sprayed for 1-2 seconds with Contact cleaner to fix it. Avoid having the cleaner hit the CREE LED.

It turned on once but that was it. As a wild guess, I assumed a corroded contactor so I sprayed some electric contact cleaner on it typically used for scratchy potietiometers.

I clicked the button over and over and…nothing. So I kept clicking then it turned on….click, click, click, click..and off. The more I clicked, the more reliable it became. Finally each click turned it on and off. Maybe 100 clicks before the contact cleaner had kicked in.

Finally, it was working! So I reversed the steps, put in the diffuser door (not sure what worked but it got back in place) snapped the electronics back in, screwed in the T5 Torx screws, and bam! Working again.

Wear 3x Magnifiers for examining tiny components. It makes it easier!


Medieval Venison Sausage from 1533

Source: Das Kochbuch der Sabina Welserin (c. 1553)

(Apparently one of the first cookbooks published by a woman. )

Weltt jr gútt prattwirst machen

So nempt 4 pfúnd schweinis vnnd 4 pfúnd rinderis, das last klainhacken, nempt darnach 2 pfúnd speck darúnder vnnd hackts anainander vnnd vngeferlich 3 seidlen wasser giest daran, thiet aúch saltz, pfeffer daran, wie jrs geren est, oder wan jr geren kreúter darin megt haben/ múgt jr nemen ain wenig ain salua vnnd ain wenig maseron, so habt jr gút brattwirst/.

“If you would make good bratwurst”If you would make good bratwurst

Take four pounds of pork and four pounds of beef and chop it finely. After that mix with it two pounds of bacon and chop it together and pour approximately one quart of water on it. Also add salt and pepper thereto, however you like to eat it, or if you would like to have some good herbs, you could take some sage and some marjoram, then you have good bratwurst.”

10OCT23 – Here are my notes and addendums:

So she basically says 8 parts meat, equal pork and beef, and 2 parts fat. Which is in the traditional 20-30% fat range needed for good sausage. So that checks out. Then she adds a little water which is normal to help the bind of the sausage, so that checks. Salt, pepper, yep, that is all normal. Sage and marjoram, that checks but she doesn’t give the ratio on any of this. Going off of my experience 1.5%-2.5% is appropriate for salt content for modern taste pallets. 1.8-2.0% is more my preference. However, I suspect it was made with much higher salt content. In history, I’ve seen roman recipe as high at 10%! This is quite salty and unpalatable, but it would preserve and would likely be shelf stable and hung all year at room temp. However, it would have to be soaked to be used, or added to a large pot of stew and the salt would diffuse.

But I ran with 2% salt and no curing salt #1 (Prague powder #1/Sodium nitrate) to stay true as possible. This prevented me from smoking it due to food safety. I split it 50/50 pork and venison and added in pork fat to balance out the venison. She doesn’t mention the requirement to kneed the mince to make it tacky for a good bind, but you must do that. Kneed until it is sticky that a small ball of mince in your hand clings to your glove.

Substitute Venison for beef. Use a 25% fat ratio, 2.0% salt, 0.25% pepper, 0.25% Sage, 0.25% marjoram. Optional- You must use 0.25% Cure #1 if you are going to smoke it because of anaerobic conditions induces risk of botulism.

I’ve made 9 types of sausage, and I have to say this is a good sausage! I will recommend it. Simple – just salt, pepper, marjoram, sage. It has passed the test of time, 5 centuries!


Rolling percent rank using R

A quest for the uncomputable it seems. I’ve lost 4 hours trying to solve this problem.

I am loading a stock ticker, and the object class is xts/zoo. I thought I’d model the percent rank problem like I did for a simple moving average:

VXX$VXX_30day_SMA<-zoo::rollmean(VXX$VXX.Adjusted, k=30, align="right")

But that didn’t work as there is no roll_perc_rank function. So I went to use rollapply with a function like:

VXX$VXX_vol_22day_pct_rank<-zoo::rollapply(VXX$VXX.Volume, width=22, FUN = percent_rank, align='left', fill = NA)

Which uses the dply::percent_rank function, but that didn’t work.

What finally worked was TTR::runPercentRank

VXX$VXX_vol_220day_pct_rank<-runPercentRank(VXX$VXX.Volume, n = 220, cumulative = FALSE, exact.multiplier = 0.5)

Since the internet doesn’t have a good page to solve this issue, I wanted to post on it. Be sure to load the TTR library first!


Ideas for building structures for cabins at Renaissance Faires

There is a strong market for lodging before a faire, be it die hard rennies, families, or handicap attendees.

But what structures works? Balance of cost, speed of construction, labor input, materials, and cooling costs for summer.

For housing for groups, you need 55sq ft per bunk bed. So 200sq ft for 6 people, 800sq ft for 26 people.

Grubenhause that is sunken into the earth provides some cooling, resistance to high winds, and look authentic.
Another Grubenhaus.
A Saxon house, but the thatch is too dangerous.

Masonry structures are more expensive, but cool, quiet, stormproof, and low maintenance

My shed of requirement. about $9k including an overkill foundation for $2,500

Earthbag houses are cost effective but more labor.


Grotesques added to Shed of Requirement

The ‘Gargoyles’ are added. But they are really called grotesques given that they do not channel rain water. I’ve used oxide paint for the bases to match. There are 4 Grotesques, each is different from the others. The smallest is in the back where there is little light. I tell people they all were the same size when I installed them.

In other good news, the water that was getting into the shed has been fixed. It was mainly splash water hitting the door and running down and trapped inside instead off away from the structure. The next heavy rain should confirm that.

Catalan vaulted stone shed.

Current TEXAS SEIR forecast. 90 days to peak.

Rt=1.2 iCFR=0.7 SEIR model

Updates on the Shed of Requirement

So the wife said I could build a shed. I began in 2016. I’ve added a vent and used a Dubrovnik style chimney in order to let moisture out when it rains. Plus, I’ve restained the door and strengthened the Attic flooring.


Building Covid 19 tool to help forecast hospital beds

What a frilling week. Market turmoil, oil crashes, and Covid arrived to come kick our asses. I chose to not sit idly by as a spectator, and instead forge a weapon (web app) that will help hospitals around the world predict the wave IN THEIR AREA and tell them how many beds they need and if they will be swamped.

It needs to predict when the wave arrives, and how many of each type of beds will be needed. Standard, ICU, and Critical. Plus, as the data for Covid gets better, the user can change the inputs easily on the webpage.

I haven’t named it officially yet, maybe call it COBE Tool – COvid Bed Estimator Tool. I will put in in Shiny at hosted.

Early results show what will happen if Covid19 burns without social distancing. 72% of America catches it.

Tools used : R, with packages Epimdr, Desolve, Shiny. The core code for generating the S E I R table is below.

times = seq(0, 450, by=1)
#paras = c(mu = 0, N = 1, beta = 1000, sigma = 365/15, gamma = 365/5)
sigma<- 1/5 # this is     The rate at which an exposed person becomes infective. Inverse of 
gamma<-1/15 #  The rate at which an exposed person becomes resistant (recovers)
paras = c(mu = 0, N = 1, beta = .1173, sigma = sigma, gamma = gamma)
start = c(S=(.999) , E=0, I=.001, R = 0.0)
#start = c(S=0.06, E=0, I=0.001, R = 0.939)
out=ode(y=start, times=times, func=seirmod, parms=paras)
#init       <- c(S = 1-1e-6, I = 1e-6, R = 0.0)
#parameters <- c(beta = 1.4247, gamma = 0.14286)
#out <- ode(y = init, times = times, func = sir, parms = parameters)
out <-

CoVid19 forecasting cumulative cases

I do a bit of competition forecasting. Almanis, Good Judgement Open, and the Hybrid Forecasting Challenge. Some are open, some you must be invited. I’ve found that I’m good at battlefield casualties and epidemiology. Here are my thoughts on CoVid19, and the chances of having greater than 100k cumulative cases by 20MAR20

Finally the Markets are realizing CoVid19 will affect the economy.

Instantaneous forecast from yesterdays increase is 20 days left *1753 new yesterday +85403=~ 120,000 cases.

The instantaneous estimate is no longer trending down, Containment is generally working in China, but CoVid19 has now gone into the wild in other countries. I think there will be no hope of <100k by 20MAR20
But the numbers are increasing more linearly than geometrically.

The real numbers for WHO cases over the last 4 weeks are:

85403 (SitRep Day 40) – not a full week
80239 (SitRep Day 36),
73332 (SitRep Day 29)
43103 (SitRep 22),
20630 (SitRep 15)

Extrapolated weekly estimate is 85403-77794 * 3 weeks left = ~108,000
This shows signs of slowing that the Chinese fight to drop Ro is working. From the model below, I show Ro to be ~1.1 to 1.2 where last week I thought it to be 1.7 roughly.

However, now that is is wild in other countries who aren’t prepared for the Draconian methods China executed. I expect the Ro to begin to rise again.

There is a slim chance to think CoVid-19 will stay below 100k cases as I’m beginning to believe the virus is currently ‘contained’ in China. Also possible is if you believe other countries will systemically under report for political ends. Iran clearly is not reporting real numbers at this time.

Of new concern is the finding previously unknown clusters, even in the USA. Of note is this is a secondary infection not primary from travelers from China. That reinforces my thinking that many second and third world countries have wild clusters established and will begin to spread fast. They may not detect them in time to add to 20MAR WHO report.

I recommend folks follow Dr Campbell on Youtube to get his input, as he has foreign health workers with first hand accounts in Iran emailing him. Those accounts reveal hundreds to thousands infected.

Another great resource is or their mobile friendly version

The quarantine’s goal is to drop the Ro number from ~2.3 down to less than 1 hopefully, but more likely 1.2 IMHO so we need to adapt that to our numbers.

My assumptions are :
1) too late for containment
2) Wild clusters are undetected in many other countries
3) Iran’s clusters are far worse than feared.
4) The reported cases will increase quasi-geometrically perhaps linearly but not exponential until 20MAR20
5) The new post quarantine Ro is still above 1.1 and below 1.5

Raw data collected via Tencent on the official numbers is
yea, its in Simplified Chinese.
-edit- English translate

An excellent model that lets you adjust inputs is here:
(using Ro ~ 1.2 ‘ Effective reproductive number with control’ fits the data best)

I encourage all to play with that model, as it shows the case load with default Ro vs post quarantine Ro and the real cases reported. More on that model here:

In all, the infections are showing to grow steadily. If CoVid-19 establishes in South America we may get to 200k quickly, not so sure if it is just the Middle East. The model now shows we’ll hit 100k, but it looks like more likely end at 120k by 20MAR.

I still think we’ll hit 100k cases by March 10.

Probability of <100k by 20MAR20 is 5%. Probability of 100k-200k by 20MAR20 is 92%, Over 200k is 3%


An Atlatl

So I’m an archer not an Atlatl guy. But since it is just a stick that throws a stick, I cut a branch, carved it up, then promptly obsessed about finding good dart material. For Texas, broad leaf ligustrum is the solution. It grows straight after copicing. I have a mott of Ligustrum in my yard so I harvested some 1/2″ poles 5 feet long and made the darts.

Atlatl v1.0