use of org.vcell.vmicro.op.RunFakeSimOp 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.RunFakeSimOp in project vcell by virtualcell.
the class RunFakeSim method compute0.
@Override
protected void compute0(TaskContext context, final ClientTaskStatusSupport clientTaskStatusSupport) throws Exception {
// set input
Simulation sim = context.getData(simulation_2D);
Double max_intensity = context.getData(maxIntensity);
Double bleachLockingBegin = context.getData(bleachBlackoutBeginTime);
Double bleachLockoutEnd = context.getData(bleachBlackoutEndTime);
Boolean hasNoise = context.getData(bNoise);
// do op
RunFakeSimOp op = new RunFakeSimOp();
ImageTimeSeries<UShortImage> solution = op.runRefSimulation(context.getLocalWorkspace(), sim, max_intensity, bleachLockingBegin, bleachLockoutEnd, hasNoise, clientTaskStatusSupport);
// set output
context.setData(simTimeSeries, solution);
}
use of org.vcell.vmicro.op.RunFakeSimOp 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.RunFakeSimOp 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