Search in sources :

Example 1 with Generate2DExpModel_UniformBleachOp

use of org.vcell.vmicro.op.Generate2DExpModel_UniformBleachOp in project vcell by virtualcell.

the class Generate2DExpModel_UniformBleach method compute0.

@Override
protected void compute0(final TaskContext context, final ClientTaskStatusSupport clientTaskStatusSupport) throws Exception {
    // get input
    double deltaX = context.getData(this.deltaX);
    double bleachRadius = context.getData(this.bleachRadius);
    double cellRadius = context.getData(this.cellRadius);
    double bleachDuration = context.getData(this.bleachDuration);
    double bleachRate = context.getData(this.bleachRate);
    double postbleachDelay = context.getData(this.postbleachDelay);
    double postbleachDuration = context.getData(this.postbleachDuration);
    double psfSigma = context.getData(this.psfSigma);
    double outputTimeStep = context.getData(this.outputTimeStep);
    double primaryDiffusionRate = context.getData(this.primaryDiffusionRate);
    double primaryFraction = context.getData(this.primaryFraction);
    double bleachMonitorRate = context.getData(this.bleachMonitorRate);
    double secondaryDiffusionRate = context.getData(this.secondaryDiffusionRate);
    double secondaryFraction = context.getData(this.secondaryFraction);
    String extracellularName = context.getData(this.extracellularName);
    String cytosolName = context.getData(this.cytosolName);
    // isolate from Workflow
    Context modelGenerationContext = new Context() {

        @Override
        public User getDefaultOwner() {
            return context.getDefaultOwner();
        }

        @Override
        public KeyValue createNewKeyValue() {
            return context.createNewKeyValue();
        }
    };
    // do op
    Generate2DExpModel_UniformBleachOp op = new Generate2DExpModel_UniformBleachOp();
    GeneratedModelResults results = op.generateModel(deltaX, bleachRadius, cellRadius, bleachDuration, bleachRate, postbleachDelay, postbleachDuration, psfSigma, outputTimeStep, primaryDiffusionRate, primaryFraction, bleachMonitorRate, secondaryDiffusionRate, secondaryFraction, extracellularName, cytosolName, modelGenerationContext);
    // set output
    context.setData(this.bioModel_2D, results.bioModel_2D);
    context.setData(this.simulation_2D, results.simulation_2D);
    context.setData(this.bleachBlackoutBeginTime, results.bleachBlackoutBeginTime);
    context.setData(this.bleachBlackoutEndTime, results.bleachBlackoutEndTime);
}
Also used : Context(org.vcell.vmicro.op.Generate2DExpModelOpAbstract.Context) TaskContext(org.vcell.workflow.TaskContext) GeneratedModelResults(org.vcell.vmicro.op.Generate2DExpModelOpAbstract.GeneratedModelResults) Generate2DExpModel_UniformBleachOp(org.vcell.vmicro.op.Generate2DExpModel_UniformBleachOp)

Aggregations

Context (org.vcell.vmicro.op.Generate2DExpModelOpAbstract.Context)1 GeneratedModelResults (org.vcell.vmicro.op.Generate2DExpModelOpAbstract.GeneratedModelResults)1 Generate2DExpModel_UniformBleachOp (org.vcell.vmicro.op.Generate2DExpModel_UniformBleachOp)1 TaskContext (org.vcell.workflow.TaskContext)1