public class DrsCalibration extends Object implements stream.StatefulProcessor
Modifier and Type | Field and Description |
---|---|
String |
drsFileOutputKey |
URL |
drsFileURL |
String |
drsKey |
String |
outputKey |
boolean |
reverse |
String |
startCellKey |
String |
url |
Constructor and Description |
---|
DrsCalibration() |
Modifier and Type | Method and Description |
---|---|
double[] |
applyDrsCalibration(double[] data,
double[] destination,
short[] startCellVector) |
void |
finish() |
void |
init(stream.ProcessContext processContext) |
protected void |
loadDrsData(URL in)
This method reads the DRS calibration values from the given data source.
|
stream.Data |
process(stream.Data data) |
void |
resetState() |
double[] |
reverseDrsCalibration(double[] data,
double[] destination,
short[] startCellVector)
Reverses the drsCalibration performed in applyDrsCalibration.
|
@Parameter(required=false, description="The data key that will hold the resulting data array.") public String outputKey
@Parameter(required=false, description="A URL to the DRS calibration data (in FITS formats)", defaultValue="Null. Will try to find path to drsFile from the stream.") public String url
@Parameter(required=false, description="Key to the StartCellData.") public String startCellKey
public URL drsFileURL
@Parameter(required=false, description="The name of the key that holds the drs filename.", defaultValue="@drsFile") public String drsKey
@Parameter(required=false, description="Whether to reverse the process.", defaultValue="false") public boolean reverse
@Parameter(required=false, description="output key for the used drs file") public String drsFileOutputKey
protected void loadDrsData(URL in)
That item/row in turn is expected to contain a set of variables, e.g. the BaselineMean, BaselineRms,...
in
- sourceurl to be loadedpublic stream.Data process(stream.Data data)
process
in interface stream.Processor
Processor.process(stream.Data)
public double[] applyDrsCalibration(double[] data, double[] destination, short[] startCellVector)
public double[] reverseDrsCalibration(double[] data, double[] destination, short[] startCellVector)
data
- The calibrated data the decalibrate.destination
- If given use this as the destination array otherwise a new one is created.startCellVector
- The array containing the start cells used to know which calibration constants to use.public void init(stream.ProcessContext processContext) throws Exception
init
in interface stream.StatefulProcessor
Exception
public void resetState() throws Exception
resetState
in interface stream.StatefulProcessor
Exception
Copyright © 2019. All rights reserved.