def check_for_soliton(img_id):
pm = io.PathManager(img_id)<EOL>try:<EOL><INDENT>ringcube = RingCube(pm.cubepath)<EOL><DEDENT>except FileNotFoundError:<EOL><INDENT>ringcube = RingCube(pm.undestriped)<EOL><DEDENT>polys = create_polynoms()<EOL>minrad = ringcube.minrad.to(u.km)<EOL>maxrad = ringcube.maxrad.to(u.km)<EOL>delta_years = get_year_since_resonance(ringcube)<EOL>soliton_radii = {}<EOL>for k, p in polys.items():<EOL><INDENT>current_r = p(delta_years) * u.km<EOL>if minrad < current_r < maxrad:<EOL><INDENT>soliton_radii[k] = current_r<EOL><DEDENT><DEDENT>return soliton_radii if soliton_radii else None<EOL>
Workhorse function.

    Creates the polynom.
    Calculates radius constraints from attributes in `ringcube` object.

    Parameters
    ----------
    ringcube : pyciss.ringcube.RingCube
        A containter class for a ring-projected ISS image file.

    Returns
    -------
    dict
        Dictionary with all solitons found. Reason why it is a dict is
        that it could be more than one in one image.