def fix_nonload_cmds(nl_cmds):
    """
    Convert non-load commands commands dict format from Chandra.cmd_states
    to the values/structure needed here.  A typical value is shown below:
    {'cmd': u'SIMTRANS',               # Needs to be 'type'
    'date': u'2017:066:00:24:22.025',
    'id': 371228,                      # Store as params['nonload_id'] for provenence
    'msid': None,                      # Goes into params
    'params': {u'POS': -99616},
    'scs': None,                       # Set to 0
    'step': None,                      # Set to 0
    'time': 605233531.20899999,        # Ignored
    'timeline_id': None,               # Set to 0
    'tlmsid': None,                    # 'None' if None
    'vcdu': None},                     # Set to -1
    """
    new_cmds = []
    for cmd in nl_cmds:
        new_cmd = {}
        new_cmd['date'] = str(cmd['date'])
        new_cmd['type'] = str(cmd['cmd'])
        new_cmd['tlmsid'] = str(cmd['tlmsid'])
        for key in ('scs', 'step', 'timeline_id'):
            new_cmd[key] = 0
        new_cmd['vcdu'] = -1

        new_cmd['params'] = {}
        new_cmd['params']['nonload_id'] = int(cmd['id'])
        if cmd['msid'] is not None:
            new_cmd['params']['msid'] = str(cmd['msid'])

        # De-numpy (otherwise unpickling on PY3 has problems).
        if 'params' in cmd:
            params = new_cmd['params']
            for key, val in cmd['params'].items():
                key = str(key)
                try:
                    val = val.item()
                except AttributeError:
                    pass
                params[key] = val

        new_cmds.append(new_cmd)

    return new_cmds