コード例 #1
0
ファイル: mtypes.py プロジェクト: ChandraCXC/sherpa-samp
def spectrum_fit_confidence(private_key, sender_id, msg_id, mtype, params,
                            extra):
    """
    spectrum_fit_confidence



    """
    try:
        info("spectrum_fit_confidence()")
        ui = SherpaSession()

        try:
            ui.set_method(params["method"])

        except Exception, e:
            reply_error(msg_id, sedexceptions.MethodException, e, mtype)
            return

        try:
            ui.set_data(params["datasets"])

        except Exception, e:
            reply_error(msg_id, sedexceptions.DataException, e, mtype)
            return
コード例 #2
0
ファイル: mtypes.py プロジェクト: ChandraCXC/sherpa-samp
def spectrum_fit_fit(private_key, sender_id, msg_id, mtype, params, extra):
    """
    spectrum_fit_fit


    """
    try:
        info("spectrum_fit_fit()")
        ui = SherpaSession()

        info("ui session _sources: " + str(ui.session._sources))
        info("ui session _models: " + str(ui.session._models))
        info("ui session _model_components: " + str(ui.session._model_components))
        info("ui session _data: " + str(ui.session._data))

        try:
            ui.set_method(params["method"])

        except Exception, e:
            reply_error(msg_id, sedexceptions.MethodException, e, mtype)
            return

        try:
            ui.set_data(params["datasets"])

        except Exception, e:
            reply_error(msg_id, sedexceptions.DataException, e, mtype)
            return
コード例 #3
0
def spectrum_fit_confidence(private_key, sender_id, msg_id, mtype, params,
                            extra):
    """
    spectrum_fit_confidence



    """
    try:
        info("spectrum_fit_confidence()")
        ui = SherpaSession()

        try:
            ui.set_method(params["method"])

        except Exception, e:
            reply_error(msg_id, sedexceptions.MethodException, e, mtype)
            return

        try:
            ui.set_data(params["datasets"])

        except Exception, e:
            reply_error(msg_id, sedexceptions.DataException, e, mtype)
            return
コード例 #4
0
def spectrum_fit_fit(private_key, sender_id, msg_id, mtype, params, extra):
    """
    spectrum_fit_fit


    """
    try:
        info("spectrum_fit_fit()")
        ui = SherpaSession()

        info("ui session _sources: " + str(ui.session._sources))
        info("ui session _models: " + str(ui.session._models))
        info("ui session _model_components: " +
             str(ui.session._model_components))
        info("ui session _data: " + str(ui.session._data))

        try:
            ui.set_method(params["method"])

        except Exception, e:
            reply_error(msg_id, sedexceptions.MethodException, e, mtype)
            return

        try:
            ui.set_data(params["datasets"])

        except Exception, e:
            reply_error(msg_id, sedexceptions.DataException, e, mtype)
            return
コード例 #5
0
ファイル: mtypes.py プロジェクト: ChandraCXC/sherpa-samp
def spectrum_fit_set_method(private_key, sender_id, msg_id, mtype, params,
                            extra):
    """
    spectrum_fit_set_method

    
    """
    try:
        info("spectrum_fit_set_method()")
        ui = SherpaSession()

        try:
            ui.set_method(params["method"])

        except Exception, e:
            reply_error(msg_id, sedexceptions.MethodException, e, mtype)
            return

        reply_success(msg_id, mtype)
コード例 #6
0
def spectrum_fit_set_method(private_key, sender_id, msg_id, mtype, params,
                            extra):
    """
    spectrum_fit_set_method

    
    """
    try:
        info("spectrum_fit_set_method()")
        ui = SherpaSession()

        try:
            ui.set_method(params["method"])

        except Exception, e:
            reply_error(msg_id, sedexceptions.MethodException, e, mtype)
            return

        reply_success(msg_id, mtype)