Monthly Archives: April 2013

Marine Biology : Criteria to Define Extinction Risk in Marine Fishes by J. A. Musick in 1999

The marine module we’re doing at the moment in the CB class is one of the most stimulating and well taught modules we’ve had yet. Our lecturer set us up by getting us thinking about the differences between marine and terrestrial ecosystems, and we’re currently looking at how inappropriate it is to use IUCN red listed criteria to work out conservation priorities for marine fish. This is a summary of the paper written by Musick in 1999 on Criteria to Define Extinction Risk in Marine Fishes.

  • The World Conservation Union (IUCN) = Species extinction = vulnerable  (20% decline in 10 years or 3 generations or whichever is longer), endangered (50%), critically endangered (80%)
  • U.S. Endangered Species Act = Distinct Population Segment (DPS) or Evolutionarily significant Unit (ESU) = a population or a group of populations that (1) is substantially reproductively isolated from other conspecific units and (2) represents an important component in the evolutionary legacy of the species.
  • 1996: IUCN workshop to find new criteria to assess extinction risk, based on: A. population reduction; B. small distribution and decline; C. small population size and decline; D. very small or restricted population size; E. quantitative population analysis (Population Viability Analysis or other), most fish falling under A
  • BUT, a 50% reduction usually leads to maximum sustainable yield (MSY) in many fisheries, and most fishery management plans call for an 80% reduction in biomass in order to maximise yield
  • Critical questions: How much decline can happen ‘sustainably’ (i.e., with uncertain/difficult recovery)? What is the minimum viable population size and how do we work this out (biological reference points)?
  • Problems: lack of knowledge about critical minimum population size and depensation is the most vexing problem in assessing extinction risk in marine fishes, then assessing uncertainty (variability) in estimating vital rates and other population parameters is the second most vexing problem.
  • late-maturing, long-lived animals have low intrinsic rates of increase => low resilience to extraordinary mortality
  • Fishery maintenance based on compensation: higher rates of population growth at lower abundance because of reduced intraspecific competition. But there is also Depensation, Allee effect, i.e., rate of recovery is slower for things that are more greatly reduced.

American Fisheries Society will use the following criteria to evaluate the risk of extinction among marine fishes taking into account the context of the biology of the DPS under consideration: Rarity, Specialization in Habitat Requirements,
Endemicity or Small Range, and Population Decline (which is evaluated according to the productivity or resilience of the Distinct Population Segment). Productivity is worked out by taking into account 1) the intrinsic rate of increase, r, (expressed as an instantaneous or annual percentage); the von Bertalanffy growth coefficient, k; fecundity, (Fec); age at maturity, (Tmat); and maximum age(Tmax).

Note that reef fish need a different approach altogether (Marine Protected Areas / no-take zones)

Fixed navigation (scrolling to content headings)

I used http://www.distractedbysquirrels.com/blog/one-page-layout-with-fixed-navigation-and-jquery/ as a foundation for a fixed navigation/scrolling type page, and modified it so it was a bit nicer and more adaptable, like this:

$(document).ready(function() {
	// Parameters
	var navOffset 	= 15,
		scrollSpeed = 500;
		animationSpeed = 100;
		cssClass = 'scrollNavOn';
		minTop = $('#content').offset().top,
		maxTop = $('#content').height() + minTop - $('#navigation').height();	
		
	// Place navigation
	var currentScroll = $(window).scrollTop();
	$('#navigation').css({'top' : minTop});
	
	// Align navigation after loading while scrolling through the content
	if( currentScroll > minTop && currentScroll < maxTop ) 
		$('#navigation').css({'top' : navOffset + 'px'});	
	
	// Adjust navigation top to content top and end of content
	if( currentScroll <= minTop ) 
		$('#navigation').css({'top' : minTop - currentScroll});
	if( currentScroll >= maxTop ) 
		$('#navigation').css({'top' : maxTop - currentScroll});
	
	// Get section positions to use later
	var sections = [];
	$('.scroller-sections').each(function() {
		sections.push([$(this).attr('id'), Math.floor($(this).offset().top)]);
		var currentSection = $(this);		
	});
	
	// Set the click functionality for the nav
	$("#scroller-navigation li:not(.notsection)").each(function(index) {
		$(this).click(function (event) {
			event.preventDefault();
			var targetOffset = sections[index][1] - navOffset;
			$('html,body').animate({scrollTop:targetOffset}, scrollSpeed);
		});
	});

	// On scroll highlight the correct nav item
	newNavIndex = 0;
	$(window).scroll(function() {
		// Current scroll
		var winScroll = $(window).scrollTop();
		
		// Align navigation to window scroll while scrolling through content
		if( winScroll > minTop && winScroll < maxTop )
			$('#scroller-navigation').css({'top' : navOffset + 'px'});
			
		// Adjust navigation top to content top and end
		if( winScroll <= minTop ) 
			$('#scroller-navigation').css({'top' : minTop - winScroll});
		if( winScroll >= maxTop ) 
			$('#scroller-navigation').css({'top' : maxTop - winScroll});
		
		// Iterate through the different sections and work out which nav element to highlight
		for(var i = 0; i < sections.length; i++) {
			// Work out which section we are on - get the top of our current section and the top of the next section
			var lowerLimit = sections[i][1] - navOffset
			var upperLimit = $(document).height(); // If we are on the last section  set upperlimit to be document height
			if(i < sections.length - 1) 
				upperLimit = sections[i + 1][1];

			// Run through each section height and see whether it's between the upper and lower limits, and also whether we've scrolled down to the end of the document
			if(	((winScroll + navOffset) < upperLimit && (winScroll + navOffset) > lowerLimit) || 
				(i == sections.length - 1 && (winScroll + $(window).height() == $(document).height()))	) {
				// $('#scroller-navigation li:nth-child(' + (i + 1) + ')').css({'font-weight' : 'bold'});

				$('#scroller-navigation li:nth-child(' + (i + 1) + ')').addClass(cssClass, animationSpeed);
				$("#scroller-navigation li:not(.notsection)").each(function(index) {
					if(i != index)
						$(this).removeClass(cssClass, animationSpeed/2);
				});				
			}
		}
	});		
});

With HTML like this:

<html> 
  <head> Add your CSS and JS here </head> 
  <body> 
    <div id="wrapper"> 
      <div id="sidebar"> 
        <ul id="scroller-navigation"> 
          <li>List your nav items here</li> 
        </ul> 
      </div> 
      <div id="content"> 
        <div class="scroller-sections" id="uniqueid"> 
          <h2>Heading</h2> 
          <p>Content</p> 
        </div> 
      </div> 
    </div> 
  </body> 
</html>

What someone really needs to do now is automatically build the <li>s based on how many h2s (or whatever, that should be passed in as a parameter I guess) there are in the text and set the nav up automatically.

Bastion, Tales of Monkey Island and Okami

I’ve been having a video gaming spurt lately, partly because SOMEONE is obsessed with mario kart wii (and if I play any more mario kart I might explode… or turn into a plumber on a bike, one of the two.).

First was Bastion, which made having my wisdom teeth out almost worthwhile. It has a fantastic storyline and I really loved the narrator and the music and the atmosphere and the gameplay. In fact, atmospherically, it’s one of the most memorable games I’ve played I think. And generally it was a whole load of fun to play.

I played the first episode of Tales of Monkey Island, which is doing a pretty decent job of filling the illustrious footsteps of the former games, but isn’t quite as funny to me. The others were madder somehow, you know? Somehow when games get bigger, I don’t know, maybe it’s because more money and effort is invested in them or something, but they tend to take less chances on crazy humour, which is what made Monkey Island for me.

And now I’m playing Okami, which I LOVE. No shortage of madness there, as the guy who posted this youtube video http://www.youtube.com/watch?v=bT1nnFIgAgw says, what’s more fun than watching an old guy with an orange on his head breakdance? Hurrah for Japan! I also really like the fact that the wolf you play as is a Lady Wolf, not a Dude Wolf, and a lot of the main characters are Ladies (and pretty damn cool Ladies too). I think there aren’t enough female protagonists in the gaming world.

I realise that I’m generally pretty positive in my gaming reviews, but I think it’s because I research games really really carefully before I play them, because I just can’t be bothered spending all that time and money if I don’t know if I’ll like them or not – books and tv series and films I can be a bit less picky about trying, cus they don’t take up that much time or money and nearly no mental effort is expended with them. My MSc is sort of draining my brain at the moment, so I’m feeling particularly lazy about thinking type stuff. In fact this post only exists because I’m procrastinating, trying to put finishing my essay off.

Howards End – E. M. Forster

“Yes, I think the apostle spoons could have gone as rent,” said Margaret.  Seeing that her aunt did not understand, she added: “You remember ‘rent.’ It was one of father’s words–Rent to the ideal, to his own faith in human nature.  You remember how he would trust strangers, and if they fooled him he would say, ‘It’s better to be fooled than to be suspicious’–that the confidence trick is the work of man, but the want-of-confidence-trick is the work of the devil.”

Not too sure about the ending of this one… I seem to have read a few books recently where characters drop dead for no discernible reason at the end of the book. At least it is not as silly as The Black Tulip I suppose.

Python script for Vortex

Vortex is used on the Conservation Biology MSc course at UCT to simulate the extinction process of a species stochastically. Its user interface in managing/renaming different scenarios isn’t great, and I was a bit lazy and ended up with a single vortex project file containing a huge number of scenarios that were redundant for my project. I certainly wasn’t going to create them all again from scratch, so I manually removed the chunks in my .vpj pertaining to the simulations I no longer wanted, and wrote a quick script which would fix all of the numbering and references throughout the .vpj program using Python and regex. I hope this will help someone else:

import re
btm = open('C:/yourpathto/vortexproject.vpj', 'r')
i = 0
outputdata = []

# Iterate through all of the scenario notes, keeping track of what number we are on and changing numbers as necessary
for line in btm:
 match = re.match('^\[(\d\d?\d?) Scenario Notes\]$', line)
 if match:
   i = i + 1
 match = re.search('^\[\d\d?\d?\d? ', line)
 if match:
   line = re.sub('^\[\d\d?\d?\d? ','[' + str(i) + ' ', line)
 outputdata.append(line)

# Create a new file to output the data
outputfile = open('C:/replacementvortexproject.vpj', 'w')
# Loop through each line in outputdata and add it to the new file
for line in outputdata:
  outputfile.write(line.lstrip('\r\n'))
# Close the file and print to screen to know the program has ended
btm.close()
outputfile.close()
print 'Finished'