def _get_signal_space(S, NP, verbose=False, threshold=None, NSIG=None,<EOL>criteria='<STR_LIT>'):
from .criteria import aic_eigen, mdl_eigen<EOL>if NSIG is None:<EOL><INDENT>if threshold is None:<EOL><INDENT>logging.debug('<STR_LIT>')<EOL>if criteria == '<STR_LIT>':<EOL><INDENT>aic = aic_eigen(S, NP*<NUM_LIT:2>)<EOL><DEDENT>elif criteria == '<STR_LIT>':<EOL><INDENT>aic = mdl_eigen(S, NP*<NUM_LIT:2>)<EOL><DEDENT>NSIG = np.argmin(aic) + <NUM_LIT:1><EOL>logging.debug('<STR_LIT>', NSIG, '<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>logging.debug('<STR_LIT>')<EOL>m = threshold * min(S)<EOL>new_s = S[np.where(S>m)]<EOL>NSIG = len(new_s)<EOL>logging.debug('<STR_LIT>', NSIG)<EOL>if NSIG == <NUM_LIT:0>:<EOL><INDENT>NSIG = <NUM_LIT:1><EOL><DEDENT><DEDENT><DEDENT>return NSIG<EOL>
todo