Code and notes on data reduction and analysis of Gemini NIRI data