use of org.vcell.vmicro.op.Generate2DExpModel_GaussianBleachOp in project vcell by virtualcell.
the class Generate2DExpModel_GaussianBleach 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_GaussianBleachOp op = new Generate2DExpModel_GaussianBleachOp();
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);
}
use of org.vcell.vmicro.op.Generate2DExpModel_GaussianBleachOp in project vcell by virtualcell.
the class KenworthyParticleTest method generateFakeData.
private static ImageTimeSeries<UShortImage> generateFakeData(LocalWorkspace localWorkspace, ClientTaskStatusSupport progressListener) throws Exception {
//
// technical simulation parameters
//
double deltaX = 0.3;
double outputTimeStep = 0.3;
//
// circular 2D cell geometry
//
double cellRadius = 50.0;
String extracellularName = "ec";
String cytosolName = "cytosol";
//
// bleaching experimental protocol
//
double bleachRadius = 1.5;
double bleachDuration = 0.003;
double bleachRate = 500.0;
double postbleachDelay = 0.001;
double postbleachDuration = 25.0;
double psfSigma = 0.01;
//
// underlying physiological model
//
double primaryDiffusionRate = 2.0;
double primaryFraction = 1.0;
double bleachMonitorRate = 0.0000005;
double secondaryDiffusionRate = 0.0;
double secondaryFraction = 0.0;
//
// generate corresponding BioModel with Application and Simulation ready for simulation.
//
Context context = new Context() {
@Override
public User getDefaultOwner() {
return LocalWorkspace.getDefaultOwner();
}
@Override
public KeyValue createNewKeyValue() {
return LocalWorkspace.createNewKeyValue();
}
};
GeneratedModelResults results = new Generate2DExpModel_GaussianBleachOp().generateModel(deltaX, bleachRadius, cellRadius, bleachDuration, bleachRate, postbleachDelay, postbleachDuration, psfSigma, outputTimeStep, primaryDiffusionRate, primaryFraction, bleachMonitorRate, secondaryDiffusionRate, secondaryFraction, extracellularName, cytosolName, context);
Simulation simulation = results.simulation_2D;
double bleachBlackoutStartTime = results.bleachBlackoutBeginTime;
double bleachBlackoutStopTime = results.bleachBlackoutEndTime;
//
// run simulation to get simulated fluorescence (with noise)
//
boolean hasNoise = true;
double maxIntensity = 60000.0;
ImageTimeSeries<UShortImage> simulatedFluorescence = new RunFakeSimOp().runRefSimulation(localWorkspace, simulation, maxIntensity, bleachBlackoutStartTime, bleachBlackoutStopTime, hasNoise, progressListener);
return simulatedFluorescence;
}
use of org.vcell.vmicro.op.Generate2DExpModel_GaussianBleachOp in project vcell by virtualcell.
the class KenworthyWorkflowTest method generateFakeData.
private static ImageTimeSeries<UShortImage> generateFakeData(LocalWorkspace localWorkspace, ClientTaskStatusSupport progressListener) throws Exception {
//
// technical simulation parameters
//
double deltaX = 0.3;
double outputTimeStep = 0.3;
//
// circular 2D cell geometry
//
double cellRadius = 50.0;
String extracellularName = "ec";
String cytosolName = "cytosol";
//
// bleaching experimental protocol
//
double bleachRadius = 1.5;
double bleachDuration = 0.003;
double bleachRate = 500.0;
double postbleachDelay = 0.001;
double postbleachDuration = 25.0;
double psfSigma = 0.01;
//
// underlying physiological model
//
double primaryDiffusionRate = 2.0;
double primaryFraction = 1.0;
double bleachMonitorRate = 0.0000005;
double secondaryDiffusionRate = 0.0;
double secondaryFraction = 0.0;
//
// generate corresponding BioModel with Application and Simulation ready for simulation.
//
Context context = new Context() {
@Override
public User getDefaultOwner() {
return LocalWorkspace.getDefaultOwner();
}
@Override
public KeyValue createNewKeyValue() {
return LocalWorkspace.createNewKeyValue();
}
};
GeneratedModelResults results = new Generate2DExpModel_GaussianBleachOp().generateModel(deltaX, bleachRadius, cellRadius, bleachDuration, bleachRate, postbleachDelay, postbleachDuration, psfSigma, outputTimeStep, primaryDiffusionRate, primaryFraction, bleachMonitorRate, secondaryDiffusionRate, secondaryFraction, extracellularName, cytosolName, context);
Simulation simulation = results.simulation_2D;
double bleachBlackoutStartTime = results.bleachBlackoutBeginTime;
double bleachBlackoutStopTime = results.bleachBlackoutEndTime;
//
// run simulation to get simulated fluorescence (with noise)
//
boolean hasNoise = true;
double maxIntensity = 60000.0;
ImageTimeSeries<UShortImage> simulatedFluorescence = new RunFakeSimOp().runRefSimulation(localWorkspace, simulation, maxIntensity, bleachBlackoutStartTime, bleachBlackoutStopTime, hasNoise, progressListener);
return simulatedFluorescence;
}
use of org.vcell.vmicro.op.Generate2DExpModel_GaussianBleachOp in project vcell by virtualcell.
the class PhotoactivationExperimentTest method generateFakeData.
private static ImageTimeSeries<UShortImage> generateFakeData(LocalWorkspace localWorkspace, ClientTaskStatusSupport progressListener) throws Exception {
//
// technical simulation parameters
//
double deltaX = 0.3;
double outputTimeStep = 0.3;
//
// circular 2D cell geometry
//
double cellRadius = 50.0;
String extracellularName = "ec";
String cytosolName = "cytosol";
//
// bleaching experimental protocol
//
double bleachRadius = 1.5;
double bleachDuration = 0.003;
double bleachRate = 500.0;
double postbleachDelay = 0.001;
double postbleachDuration = 25.0;
double psfSigma = 0.01;
//
// underlying physiological model
//
double primaryDiffusionRate = 2.0;
double primaryFraction = 1.0;
double bleachMonitorRate = 0.0000005;
double secondaryDiffusionRate = 0.0;
double secondaryFraction = 0.0;
//
// generate corresponding BioModel with Application and Simulation ready for simulation.
//
Context context = new Context() {
@Override
public User getDefaultOwner() {
return LocalWorkspace.getDefaultOwner();
}
@Override
public KeyValue createNewKeyValue() {
return LocalWorkspace.createNewKeyValue();
}
};
GeneratedModelResults results = new Generate2DExpModel_GaussianBleachOp().generateModel(deltaX, bleachRadius, cellRadius, bleachDuration, bleachRate, postbleachDelay, postbleachDuration, psfSigma, outputTimeStep, primaryDiffusionRate, primaryFraction, bleachMonitorRate, secondaryDiffusionRate, secondaryFraction, extracellularName, cytosolName, context);
Simulation simulation = results.simulation_2D;
double bleachBlackoutStartTime = results.bleachBlackoutBeginTime;
double bleachBlackoutStopTime = results.bleachBlackoutEndTime;
//
// run simulation to get simulated fluorescence (with noise)
//
boolean hasNoise = true;
double maxIntensity = 60000.0;
ImageTimeSeries<UShortImage> simulatedFluorescence = new RunFakeSimOp().runRefSimulation(localWorkspace, simulation, maxIntensity, bleachBlackoutStartTime, bleachBlackoutStopTime, hasNoise, progressListener);
return simulatedFluorescence;
}
Aggregations