A methodology for sorting haploid and diploid corn seed using terahertz time domain spectroscopy and machine learning