BTM analysis codes