endrov.typeLineage.expression
Class ExpUtil

java.lang.Object
  extended by endrov.typeLineage.expression.ExpUtil

public class ExpUtil
extends java.lang.Object

Util functions to mess around with expression levels


Constructor Summary
ExpUtil()
           
 
Method Summary
static java.util.TreeMap<EvDecimal,Tuple<java.lang.Double,java.lang.Double>> calculateCorrectExposureChange20100709(EvContainer imset, EvChannel ch, Lineage lin, java.lang.String expName, java.util.SortedSet<EvDecimal> frames, java.util.Map<EvDecimal,java.lang.Double> bg)
          Correct for background etc.
static void clearExp(Lineage lin, java.lang.String expName)
           
static void correctBG2(Lineage lin, java.lang.String expName, java.util.SortedSet<EvDecimal> frames, java.util.SortedMap<EvDecimal,java.lang.Double> bgsignal)
          Correct for background etc.
static void correctExposureChange(java.util.TreeMap<EvDecimal,Tuple<java.lang.Double,java.lang.Double>> corrections, EvDecimal frame, double[] sig)
          Correct for background etc.
static void correctExposureChange(java.util.TreeMap<EvDecimal,Tuple<java.lang.Double,java.lang.Double>> corrections, Lineage lin, java.lang.String expName)
          Correct for background etc.
static java.lang.Double getSignalMax(java.util.Collection<double[][][]> sig)
          Get maximum value for expression
static java.lang.Double getSignalMax(Lineage lin, java.lang.String expName)
          Get maximum value for expression
static java.lang.Double getSignalMin(java.util.Collection<double[][][]> sig)
          Get minimum value for expression
static java.lang.Double getSignalMin(Lineage lin, java.lang.String expName)
          Get minimum value for expression
static boolean isNumber(java.lang.String s)
           
static Tuple<java.lang.String,java.lang.String> nameDateFromOSTName(java.lang.String n)
           
static void normalizeSignal(double[] sig, double max, double min, double normalizedVal)
           
static void normalizeSignal(Lineage lin, java.lang.String expName, double max, double min, double normalizedVal)
          Normalize expression such that maximum is 1.0
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpUtil

public ExpUtil()
Method Detail

correctBG2

public static void correctBG2(Lineage lin,
                              java.lang.String expName,
                              java.util.SortedSet<EvDecimal> frames,
                              java.util.SortedMap<EvDecimal,java.lang.Double> bgsignal)
Correct for background etc. Signal has already been divided by exposure time. Try to keep bg signal constant? **this does not work well**. in fact, background is almost constant


calculateCorrectExposureChange20100709

public static java.util.TreeMap<EvDecimal,Tuple<java.lang.Double,java.lang.Double>> calculateCorrectExposureChange20100709(EvContainer imset,
                                                                                                                           EvChannel ch,
                                                                                                                           Lineage lin,
                                                                                                                           java.lang.String expName,
                                                                                                                           java.util.SortedSet<EvDecimal> frames,
                                                                                                                           java.util.Map<EvDecimal,java.lang.Double> bg)
Correct for background etc. Return table of correction values so it can be applied again. Will be used for non-AP


correctExposureChange

public static void correctExposureChange(java.util.TreeMap<EvDecimal,Tuple<java.lang.Double,java.lang.Double>> corrections,
                                         Lineage lin,
                                         java.lang.String expName)
Correct for background etc. Use given table of corrections


correctExposureChange

public static void correctExposureChange(java.util.TreeMap<EvDecimal,Tuple<java.lang.Double,java.lang.Double>> corrections,
                                         EvDecimal frame,
                                         double[] sig)
Correct for background etc. Use given table of corrections


clearExp

public static void clearExp(Lineage lin,
                            java.lang.String expName)

normalizeSignal

public static void normalizeSignal(Lineage lin,
                                   java.lang.String expName,
                                   double max,
                                   double min,
                                   double normalizedVal)
Normalize expression such that maximum is 1.0


normalizeSignal

public static void normalizeSignal(double[] sig,
                                   double max,
                                   double min,
                                   double normalizedVal)

getSignalMax

public static java.lang.Double getSignalMax(Lineage lin,
                                            java.lang.String expName)
Get maximum value for expression


getSignalMax

public static java.lang.Double getSignalMax(java.util.Collection<double[][][]> sig)
Get maximum value for expression


getSignalMin

public static java.lang.Double getSignalMin(Lineage lin,
                                            java.lang.String expName)
Get minimum value for expression


getSignalMin

public static java.lang.Double getSignalMin(java.util.Collection<double[][][]> sig)
Get minimum value for expression


nameDateFromOSTName

public static Tuple<java.lang.String,java.lang.String> nameDateFromOSTName(java.lang.String n)

isNumber

public static boolean isNumber(java.lang.String s)