.. java:import:: ch.epfl.leb.sass.models.photophysics StateSystem .. java:import:: ch.epfl.leb.sass.models.emitters.internal AbstractEmitter .. java:import:: ch.epfl.leb.sass.utils RNG .. java:import:: ch.epfl.leb.sass.models.psfs PSFBuilder .. java:import:: ch.epfl.leb.sass.models.fluorophores Fluorophore .. java:import:: ch.epfl.leb.sass.models.illuminations Illumination .. java:import:: ch.epfl.leb.sass.logging Listener .. java:import:: ch.epfl.leb.sass.logging WrongMessageTypeException .. java:import:: ch.epfl.leb.sass.logging.internal FluorophoreStateTransition .. java:import:: ch.epfl.leb.sass.utils Constants .. java:import:: com.google.gson Gson .. java:import:: com.google.gson GsonBuilder .. java:import:: com.google.gson JsonElement .. java:import:: com.google.gson JsonPrimitive .. java:import:: com.google.gson JsonObject .. java:import:: com.google.gson JsonSerializationContext .. java:import:: com.google.gson JsonSerializer .. java:import:: java.lang.reflect Type .. java:import:: java.util Random .. java:import:: java.util ArrayList .. java:import:: java.util.logging Level .. java:import:: java.util.logging Logger PhysicalFluorophore =================== .. java:package:: ch.epfl.leb.sass.models.fluorophores.internal :noindex: .. java:type:: public class PhysicalFluorophore extends AbstractEmitter implements Fluorophore A general fluorescent molecule which emits light. This class directly implements the methods of Observables, rather than extending AbstractObservable, because Java does not support multiple inheritance. TODO: IMPLEMENT TESTS FOR THIS CLASS. :author: Marcel Stefko, Kyle M. Douglass Constructors ------------ PhysicalFluorophore ^^^^^^^^^^^^^^^^^^^ .. java:constructor:: public PhysicalFluorophore(PSFBuilder psfBuilder, Illumination illumination, double quantumYield, double extinctionCoefficient, double secondsPerFrame, StateSystem stateSystem, int startState, double x, double y, double z) :outertype: PhysicalFluorophore Initialize fluorophore and calculate its pattern on camera :param psfBuilder: The Builder for calculating microscope PSFs. :param illumination: The illumination at the fluorophore. :param quantumYield: The fluorophore's quantumYield. :param extinctionCoefficient: The fluorophore's extinction coefficient. :param secondsPerFrame: The length of a frame's exposure time in seconds. :param stateSystem: Internal state system for this fluorophore :param startState: Initial state number :param x: x-position in pixels :param y: y-position in pixels :param z: z-position in pixels Methods ------- addListener ^^^^^^^^^^^ .. java:method:: @Override public void addListener(Listener listener) :outertype: PhysicalFluorophore Adds a new listener to the list of subscribed listeners. deleteListener ^^^^^^^^^^^^^^ .. java:method:: @Override public void deleteListener(Listener listener) :outertype: PhysicalFluorophore Deletes a listener from the list of subscribed listeners. getCurrentState ^^^^^^^^^^^^^^^ .. java:method:: public int getCurrentState() :outertype: PhysicalFluorophore Returns the id of the fluorophore state system's current state. :return: The id of the current state of the fluorophore's state system. getExtinctionCoefficient ^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public double getExtinctionCoefficient() :outertype: PhysicalFluorophore Returns the fluorophore extinction coefficient. :return: The fluorophore's extinction coefficient. getIllumination ^^^^^^^^^^^^^^^ .. java:method:: public Illumination getIllumination() :outertype: PhysicalFluorophore Returns the fluorophore's illumination profile. :return: The fluorophore's illumination profile. getIlluminationListener ^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override public Listener getIlluminationListener() :outertype: PhysicalFluorophore Returns the Listener that is attached to the illumination profile. :return: The illumination Listener. getOnTimeThisFrame ^^^^^^^^^^^^^^^^^^ .. java:method:: public double getOnTimeThisFrame() :outertype: PhysicalFluorophore Returns the time spent in the emitting state during the previous frame. This time is the proportion of the frame's duration; 1 corresponds to having spent the entirety of the frame in the emitting state. :return: The time spent in the emitting state. getPhotonsThisFrame ^^^^^^^^^^^^^^^^^^^ .. java:method:: public double getPhotonsThisFrame() :outertype: PhysicalFluorophore Returns the number of photons emitted during the previous frame. :return: The number of photons emitted during the previous frame. getQuantumYield ^^^^^^^^^^^^^^^ .. java:method:: public double getQuantumYield() :outertype: PhysicalFluorophore Returns the fluorophore's quantum yield. :return: The fluorophore's quantum yield. getSecondsPerFrame ^^^^^^^^^^^^^^^^^^ .. java:method:: public double getSecondsPerFrame() :outertype: PhysicalFluorophore Returns the length of a camera exposure in seconds. :return: The length of a camera exposure in seconds. getSignal ^^^^^^^^^ .. java:method:: public double getSignal() :outertype: PhysicalFluorophore Returns the fluorophore's number of photons per frame. :return: The number of photons per frame emitted by the fluorophore. getX ^^^^ .. java:method:: public double getX() :outertype: PhysicalFluorophore Return the x-position of the fluorophore. :return: The fluorophore's x-position. getY ^^^^ .. java:method:: public double getY() :outertype: PhysicalFluorophore Return the y-position of the fluorophore. :return: The fluorophore's y-position. getZ ^^^^ .. java:method:: public double getZ() :outertype: PhysicalFluorophore Return the z-position of the fluorophore. :return: The fluorophore's z-position. isBleached ^^^^^^^^^^ .. java:method:: public boolean isBleached() :outertype: PhysicalFluorophore Informs if this emitter switched into the irreversible bleached state. :return: boolean, true if emitter is bleached isOn ^^^^ .. java:method:: public boolean isOn() :outertype: PhysicalFluorophore Returns the current state of the emitter (on or off), but does not inform if this emitter is also bleached! :return: true-emitter is on, false-emitter is off nextExponential ^^^^^^^^^^^^^^^ .. java:method:: protected final double nextExponential(double mean) :outertype: PhysicalFluorophore Sample an random number from an exponential distribution :param mean: mean of the distribution :return: random number from this distribution notifyListeners ^^^^^^^^^^^^^^^ .. java:method:: @Override public void notifyListeners() :outertype: PhysicalFluorophore Notifies all subscribed listeners to a change in the Observable's state. This method should only be called if setChanged() has been called. notifyListeners ^^^^^^^^^^^^^^^ .. java:method:: @Override public void notifyListeners(Object data) :outertype: PhysicalFluorophore Notifies all subscribed listeners of a state change and pushes the data. :param data: The data object to push to the listeners. recalculateLifetimes ^^^^^^^^^^^^^^^^^^^^ .. java:method:: @Override public void recalculateLifetimes(double laserPower) :outertype: PhysicalFluorophore Recalculates the lifetimes of this emitter based on current laser power. :param laserPower: current laser power setChanged ^^^^^^^^^^ .. java:method:: @Override public void setChanged() :outertype: PhysicalFluorophore Indicates that the state of this Observable has been changed. simulateBrightness ^^^^^^^^^^^^^^^^^^ .. java:method:: @Override protected double simulateBrightness() :outertype: PhysicalFluorophore toJson ^^^^^^ .. java:method:: @Override public JsonElement toJson() :outertype: PhysicalFluorophore Returns the fluorophore's properties as a JSON string. :return: The properties of the fluorophore as a JSON string.