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.");
}
}
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;
}
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());
}
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;
}
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;
}
Aggregations