public class JitParser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected float |
badnessLimit
From configuration the max badness before a point is ignored
|
protected int |
boxcarLength
From configuration, the number of points to use in the running median
|
static java.util.Properties |
CCD_PAIRS
ccd pairings ir-red and bg-red
|
static java.lang.String[] |
COLOR_CCD_NAMES
Names of the color CCDs
|
protected PIRL.Configuration.Configuration |
config
Our configuration
|
protected float |
excludeLimit
From configuration, the max diff from median before a point is ignored
|
static java.lang.String |
ID
CVS ID
|
Constructor and Description |
---|
JitParser()
Create a new instance of JitParser with the default configuration
|
JitParser(java.lang.String conf)
Create a new instance of JitParser with a particular configuration
|
Modifier and Type | Method and Description |
---|---|
protected static boolean |
foundMatch(java.util.Map<java.lang.String,java.lang.String> map)
Determines if enough data has been collected in a ControlPoint group
to evaluate it.
|
static java.util.Set<CCD> |
getAvailableColorCCDs(Observation observation)
Obtains the set of color CCDs that were available for jitter
registration.
|
JitData |
getJitData(CCD ccd)
Analyze the data for a particular CCD.
|
static void |
main(java.lang.String... args) |
java.util.Map<CCD,JitData> |
parse(Observation observation)
Analyze all of the data for an observation.
|
protected void |
parseCNetPVL(java.io.File file,
JitData data)
Parse Control File
|
protected void |
parseFlatTab(java.io.File file,
JitData data)
Parse Flat File
|
protected void |
parseRegDefs(java.io.File file,
JitData data)
Parse registration definition file for jitter parameters.
|
static void |
smooth(JitData data,
int boxcarLength,
float excludeLimit)
Perform 'boxcar smoothing' algorithm on a set of jitter data.
|
protected void |
writeCNetPVL(java.io.File file,
JitData data)
Writes a new Control Net (overwrites the existing file), setting points
to
ignore unless they are in the accepted series
TODO finish and test
|
public static final java.lang.String ID
public static final java.lang.String[] COLOR_CCD_NAMES
public static final java.util.Properties CCD_PAIRS
protected float excludeLimit
protected float badnessLimit
protected int boxcarLength
protected PIRL.Configuration.Configuration config
public JitParser() throws java.lang.Exception
java.lang.Exception
- Invalid config filepublic JitParser(java.lang.String conf) throws java.lang.Exception
conf
- Path to config filejava.lang.Exception
- PVL parameters could not be loadedpublic static java.util.Set<CCD> getAvailableColorCCDs(Observation observation) throws Invalid_Argument_Exception, java.io.IOException
observation
- The observation to parsejava.io.IOException
- Jitreg source file could not be openedInvalid_Argument_Exception
- Bad Product_IDs in source filepublic java.util.Map<CCD,JitData> parse(Observation observation) throws Invalid_Argument_Exception, java.io.IOException
observation
- The observation to parseInvalid_Argument_Exception
- Bad observation IDjava.io.IOException
- Files could not be parsedpublic JitData getJitData(CCD ccd) throws Invalid_Argument_Exception, java.io.IOException
ccd
- The CCD for which to parse data filesInvalid_Argument_Exception
- Bad observation IDjava.io.IOException
- Files could not be parsedprotected void parseRegDefs(java.io.File file, JitData data) throws java.io.IOException
file
- File object of .pvl file to be parseddata
- The jitter data we are collectingjava.io.IOException
- File is not in expected format or could not be parsedprotected void parseFlatTab(java.io.File file, JitData data) throws java.io.IOException
file
- The jitter output flat filedata
- The jitter data we are collectingjava.io.IOException
- File could not be openedprotected static final boolean foundMatch(java.util.Map<java.lang.String,java.lang.String> map)
protected void parseCNetPVL(java.io.File file, JitData data) throws java.io.IOException
file
- Jitter output control netdata
- The jitter data we are collectingjava.io.IOException
- File could not be openedpublic static void smooth(JitData data, int boxcarLength, float excludeLimit)
data
- The collected databoxcarLength
- Number of points to use in smoothing at each pointexcludeLimit
- Values with an offset greater than this will be
rejectedprotected void writeCNetPVL(java.io.File file, JitData data) throws java.io.IOException, PIRL.PVL.PVL_Exception
file
- The control net file for a CCDdata
- The smoothed jitter data for that CCDjava.io.IOException
- Could not write to filePIRL.PVL.PVL_Exception
- Existing file not in expected formatpublic static void main(java.lang.String... args) throws java.lang.Exception
java.lang.Exception
Copyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona