def METHOD_NAME(self, db, name, cur):
    """Checks whether dependencies are ready"""
    log  = get_logger()
    # look for the state of psf with same night,band,spectro
    props = self.name_split(name)
    cmd = "select state from psf where night={} and band='{}' and spec={}".format(props["night"],props["band"],props["spec"])
    cur.execute(cmd)
    states = np.array([ x for (x,) in cur.fetchall() ])
    log.debug("states={}".format(states))
    # psfnight ready if all psf from the night have been processed, and at least one is done (failures are allowed)
    n_done   = np.sum(states==task_state_to_int["done"])
    n_failed = np.sum(states==task_state_to_int["failed"])
    ready    = (n_done > 0) & ( (n_done + n_failed) == states.size )
    if ready :
        self.state_set(db=db,name=name,state="ready",cur=cur)