def matrix_pars(segname) :
    """Returns the matrix sensor parameters from its string-name, ex: MTRX:512:512:54:54
    """
    fields = segname.split(':')
    if len(fields)<5 :
        raise IOError('Matrix-sensor specification %s has less than 4 numeric fields' % segname)

    rows, cols, psize_row, psize_col = int(fields[1]), int(fields[2]), float(fields[3]), float(fields[4])
    #print 'matrix sensor %s parameters:' % (segname), rows, cols, psize_row, psize_col
    return rows, cols, psize_row, psize_col