Search in sources :

Example 41 with Parameter

use of cbit.vcell.opt.Parameter in project vcell by virtualcell.

the class EstParams_OneDiffComponentDescriptor method aboutToDisplayPanel.

public void aboutToDisplayPanel() {
    FRAPStudy fStudy = frapWorkspace.getWorkingFrapStudy();
    Parameter[] params = fStudy.getModels()[FRAPModel.IDX_MODEL_DIFF_ONE_COMPONENT].getModelParameters();
    try {
        if (params == null) {
            params = FRAPModel.getInitialParameters(fStudy.getFrapData(), FRAPModel.MODEL_TYPE_ARRAY[FRAPModel.IDX_MODEL_DIFF_ONE_COMPONENT], fStudy.getStartingIndexForRecovery());
        }
        ((EstParams_OneDiffComponentPanel) getPanelComponent()).setData(fStudy.getFrapOptData(), fStudy.getFrapData(), params, fStudy.getFrapData().getImageDataset().getImageTimeStamps(), fStudy.getStartingIndexForRecovery(), fStudy.getSelectedROIsForErrorCalculation());
    } catch (Exception ex) {
        ex.printStackTrace(System.out);
        DialogUtils.showErrorDialog((getPanelComponent()), "Error getting parameters for diffusion with one diffusing component model.");
    }
}
Also used : FRAPStudy(cbit.vcell.microscopy.FRAPStudy) Parameter(cbit.vcell.opt.Parameter)

Example 42 with Parameter

use of cbit.vcell.opt.Parameter in project vcell by virtualcell.

the class EstParams_OneDiffComponentDescriptor method preNextProcess.

// save model parameters
public ArrayList<AsynchClientTask> preNextProcess() {
    // create AsynchClientTask arraylist
    ArrayList<AsynchClientTask> taskArrayList = new ArrayList<AsynchClientTask>();
    AsynchClientTask saveParametersTask = new AsynchClientTask("", AsynchClientTask.TASKTYPE_NONSWING_BLOCKING) {

        public void run(Hashtable<String, Object> hashTable) throws Exception {
            Parameter[] params = ((EstParams_OneDiffComponentPanel) getPanelComponent()).getCurrentParameters();
            FRAPModel frapModel = getFrapWorkspace().getWorkingFrapStudy().getFrapModel(FRAPModel.IDX_MODEL_DIFF_ONE_COMPONENT);
            frapModel.setModelParameters(params);
            frapModel.setData(((EstParams_OneDiffComponentPanel) getPanelComponent()).getCurrentEstimationResults());
        }
    };
    taskArrayList.add(saveParametersTask);
    return taskArrayList;
}
Also used : AsynchClientTask(cbit.vcell.client.task.AsynchClientTask) Hashtable(java.util.Hashtable) ArrayList(java.util.ArrayList) Parameter(cbit.vcell.opt.Parameter) FRAPModel(cbit.vcell.microscopy.FRAPModel)

Example 43 with Parameter

use of cbit.vcell.opt.Parameter in project vcell by virtualcell.

the class EstParams_ReacBindingDescriptor method saveModelParameters.

private void saveModelParameters() {
    Parameter[] params = ((EstParams_ReacBindingPanel) getPanelComponent()).getCurrentParameters();
    FRAPModel frapModel = getFrapWorkspace().getWorkingFrapStudy().getFrapModel(FRAPModel.IDX_MODEL_DIFF_BINDING);
    frapModel.setModelParameters(params);
    frapModel.setData(((EstParams_ReacBindingPanel) getPanelComponent()).getCurrentSimResults());
    frapModel.setTimepoints(((EstParams_ReacBindingPanel) getPanelComponent()).getCurrentRawSimTimePoints());
}
Also used : Parameter(cbit.vcell.opt.Parameter) FRAPModel(cbit.vcell.microscopy.FRAPModel)

Example 44 with Parameter

use of cbit.vcell.opt.Parameter in project vcell by virtualcell.

the class FRAPReacOffRateParametersPanel method createParameterArray.

private static Parameter[] createParameterArray(double bwmRate, double a, double offRate) {
    Parameter[] params = null;
    Parameter bwmRateParam = new Parameter(FRAPModel.MODEL_PARAMETER_NAMES[FRAPModel.INDEX_BLEACH_MONITOR_RATE], FRAPModel.REF_BLEACH_WHILE_MONITOR_PARAM.getLowerBound(), FRAPModel.REF_BLEACH_WHILE_MONITOR_PARAM.getUpperBound(), FRAPModel.REF_BLEACH_WHILE_MONITOR_PARAM.getScale(), bwmRate);
    Parameter AParam = new Parameter(FRAPModel.MODEL_PARAMETER_NAMES[FRAPModel.INDEX_BINDING_SITE_CONCENTRATION], FRAPModel.REF_BS_CONCENTRATION_OR_A.getLowerBound(), FRAPModel.REF_BS_CONCENTRATION_OR_A.getUpperBound(), FRAPModel.REF_BS_CONCENTRATION_OR_A.getScale(), a);
    Parameter offRateParam = new Parameter(FRAPModel.MODEL_PARAMETER_NAMES[FRAPModel.INDEX_OFF_RATE], FRAPModel.REF_REACTION_OFF_RATE.getLowerBound(), FRAPModel.REF_REACTION_OFF_RATE.getUpperBound(), FRAPModel.REF_REACTION_OFF_RATE.getScale(), offRate);
    params = new Parameter[FRAPModel.NUM_MODEL_PARAMETERS_REACTION_OFF_RATE];
    params[FRAPModel.INDEX_BLEACH_MONITOR_RATE] = bwmRateParam;
    params[FRAPModel.INDEX_BINDING_SITE_CONCENTRATION] = AParam;
    params[FRAPModel.INDEX_OFF_RATE] = offRateParam;
    return params;
}
Also used : Parameter(cbit.vcell.opt.Parameter)

Example 45 with Parameter

use of cbit.vcell.opt.Parameter in project vcell by virtualcell.

the class NonGUIFRAPTest method createParameterArray.

private static Parameter[] createParameterArray(double freeDiffRate, double freeFraction, double monitorBleachRate, double complexDifffRate, double complexFraction, double immFraction, double bsConc, double onRate, double offRate) {
    Parameter[] params = null;
    Parameter freeDiff = new cbit.vcell.opt.Parameter(STR_FREE_DIFF_RATE, FRAPModel.REF_DIFFUSION_RATE_PARAM.getLowerBound(), FRAPModel.REF_DIFFUSION_RATE_PARAM.getUpperBound(), FRAPModel.REF_DIFFUSION_RATE_PARAM.getScale(), freeDiffRate);
    Parameter freeFrac = new cbit.vcell.opt.Parameter(STR_FREE_FRACTION, FRAPModel.REF_MOBILE_FRACTION_PARAM.getLowerBound(), FRAPModel.REF_MOBILE_FRACTION_PARAM.getUpperBound(), FRAPModel.REF_MOBILE_FRACTION_PARAM.getScale(), freeFraction);
    Parameter bleachWhileMonitoringRate = new cbit.vcell.opt.Parameter(STR_BLEACH_MONITOR_RATE, FRAPModel.REF_BLEACH_WHILE_MONITOR_PARAM.getLowerBound(), FRAPModel.REF_BLEACH_WHILE_MONITOR_PARAM.getUpperBound(), FRAPModel.REF_BLEACH_WHILE_MONITOR_PARAM.getScale(), monitorBleachRate);
    Parameter complexdiff = new Parameter(STR_COMPLEX_DIFF_RATE, FRAPModel.REF_DIFFUSION_RATE_PARAM.getLowerBound(), FRAPModel.REF_DIFFUSION_RATE_PARAM.getUpperBound(), FRAPModel.REF_DIFFUSION_RATE_PARAM.getScale(), complexDifffRate);
    Parameter complexFrac = new Parameter(STR_COMPLEX_FRACTION, FRAPModel.REF_MOBILE_FRACTION_PARAM.getLowerBound(), FRAPModel.REF_MOBILE_FRACTION_PARAM.getUpperBound(), FRAPModel.REF_MOBILE_FRACTION_PARAM.getScale(), complexFraction);
    Parameter immFrac = new Parameter(STR_IMMOBILE_FRACTION, FRAPModel.REF_MOBILE_FRACTION_PARAM.getLowerBound(), FRAPModel.REF_MOBILE_FRACTION_PARAM.getUpperBound(), FRAPModel.REF_MOBILE_FRACTION_PARAM.getScale(), immFraction);
    Parameter bsConcentration = new Parameter(STR_BINDING_SITE_CONCENTRATION, 0, 1, 1, bsConc);
    Parameter onReacRate = new Parameter(STR_ON_RATE, 0, 1e6, 1, onRate);
    Parameter offReacRate = new Parameter(STR_OFF_RATE, 0, 1e6, 1, offRate);
    params = new Parameter[] { freeDiff, freeFrac, bleachWhileMonitoringRate, complexdiff, complexFrac, immFrac, bsConcentration, onReacRate, offReacRate };
    return params;
}
Also used : Parameter(cbit.vcell.opt.Parameter)

Aggregations

Parameter (cbit.vcell.opt.Parameter)59 FRAPStudy (cbit.vcell.microscopy.FRAPStudy)11 Hashtable (java.util.Hashtable)10 AsynchClientTask (cbit.vcell.client.task.AsynchClientTask)9 ProfileDataElement (org.vcell.optimization.ProfileDataElement)8 Expression (cbit.vcell.parser.Expression)7 File (java.io.File)7 FRAPModel (cbit.vcell.microscopy.FRAPModel)6 ProfileData (org.vcell.optimization.ProfileData)6 OptimizationResultSet (cbit.vcell.opt.OptimizationResultSet)5 Element (org.jdom.Element)5 OptSolverResultSet (cbit.vcell.opt.OptSolverResultSet)4 OptimizationSpec (cbit.vcell.opt.OptimizationSpec)4 SimpleReferenceData (cbit.vcell.opt.SimpleReferenceData)4 ArrayList (java.util.ArrayList)4 ROI (cbit.vcell.VirtualMicroscopy.ROI)3 Dimension (java.awt.Dimension)3 Plot2D (cbit.plot.Plot2D)2 PlotData (cbit.plot.PlotData)2 BioModel (cbit.vcell.biomodel.BioModel)2