Code to analyze SD tray production