subroutine siamgen write SIAM header record for instrument <inst> in (list of instruments) get boresight matrix for instrument <inst> validity check of matrix write SIAM matrix for <inst> endfor end subroutine siamgen