Search in sources :

Example 11 with FRAPModel

use of cbit.vcell.microscopy.FRAPModel in project vcell by virtualcell.

the class ModelTypesDescriptor method aboutToDisplayPanel.

public void aboutToDisplayPanel() {
    FRAPStudy fStudy = batchRunWorkspace.getWorkingFrapStudy();
    // if there are models selected and saved, load the model types. otherwise, apply default(diffusion with one component is selected).
    if (fStudy.getModels() != null && fStudy.getModels().length > 0 && fStudy.getSelectedModels().size() > 0) {
        modelTypesPanel.clearAllSelected();
        FRAPModel[] models = fStudy.getModels();
        if (models[FRAPModel.IDX_MODEL_DIFF_ONE_COMPONENT] != null) {
            modelTypesPanel.setDiffOneSelected(true);
        }
        if (models[FRAPModel.IDX_MODEL_DIFF_TWO_COMPONENTS] != null) {
            modelTypesPanel.setDiffTwoSelected(true);
        }
        if (models[FRAPModel.IDX_MODEL_REACTION_OFF_RATE] != null) {
            modelTypesPanel.setReactionOffRateSelected(true);
        }
    } else // new frap document
    {
        modelTypesPanel.clearAllSelected();
        modelTypesPanel.setDiffOneSelected(true);
    }
}
Also used : FRAPStudy(cbit.vcell.microscopy.FRAPStudy) FRAPModel(cbit.vcell.microscopy.FRAPModel)

Example 12 with FRAPModel

use of cbit.vcell.microscopy.FRAPModel 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 13 with FRAPModel

use of cbit.vcell.microscopy.FRAPModel 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)

Aggregations

FRAPModel (cbit.vcell.microscopy.FRAPModel)13 FRAPStudy (cbit.vcell.microscopy.FRAPStudy)7 Parameter (cbit.vcell.opt.Parameter)6 AsynchClientTask (cbit.vcell.client.task.AsynchClientTask)4 Hashtable (java.util.Hashtable)4 ArrayList (java.util.ArrayList)3 FRAPOptData (cbit.vcell.microscopy.FRAPOptData)2 FRAPOptFunctions (cbit.vcell.microscopy.FRAPOptFunctions)2 LocalWorkspace (cbit.vcell.microscopy.LocalWorkspace)1 MicroscopyXmlReader (cbit.vcell.microscopy.MicroscopyXmlReader)1 DataSource (cbit.vcell.modelopt.DataSource)1 ReferenceData (cbit.vcell.opt.ReferenceData)1 ODESolverResultSet (cbit.vcell.solver.ode.ODESolverResultSet)1 Dimension (java.awt.Dimension)1 Point (java.awt.Point)1 File (java.io.File)1 ConfidenceInterval (org.vcell.optimization.ConfidenceInterval)1 ProfileData (org.vcell.optimization.ProfileData)1 DescriptiveStatistics (org.vcell.util.DescriptiveStatistics)1 Wizard (org.vcell.wizard.Wizard)1