def scans(auth, label=None, scan_ids=None, project=None, experiment=None):
if experiment and (label or project):<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>if experiment:<EOL><INDENT>label,project = experiment.label,experiment.project<EOL><DEDENT>aid = accession(auth, label, project)<EOL>path = '<STR_LIT>'<EOL>params = {<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT:U+002C>'.join(scans.columns.keys())<EOL>}<EOL>params['<STR_LIT>'] = aid<EOL>_,result = _get(auth, path, '<STR_LIT>', autobox=True, params=params)<EOL>for result in result['<STR_LIT>']['<STR_LIT>']:<EOL><INDENT>if scan_ids == None or result['<STR_LIT>'] in scan_ids:<EOL><INDENT>data = dict()<EOL>for k,v in iter(scans.columns.items()):<EOL><INDENT>data[v] = result[k]<EOL><DEDENT>yield data<EOL><DEDENT><DEDENT>
Get scan information for a MR Session as a sequence of dictionaries.

Example:
    >>> import yaxil
    >>> import json
    >>> auth = yaxil.XnatAuth(url='...', username='...', password='...')
    >>> for scan in yaxil.scans2(auth, 'AB1234C'):
    ...     print(json.dumps(scan, indent=2))

:param auth: XNAT authentication object
:type auth: :mod:`yaxil.XnatAuth`
:param label: XNAT MR Session label
:type label: str
:param scan_ids: Scan numbers to return
:type scan_ids: list
:param project: XNAT MR Session project
:type project: str
:param experiment: YAXIL Experiment
:type experiment: :mod:`yaxil.Experiment`
:returns: Generator of scan data dictionaries
:rtype: dict