Skip to content

Commit

Permalink
Merge pull request #333 from fact-project/gain_service
Browse files Browse the repository at this point in the history
Gain service
  • Loading branch information
maxnoe authored Mar 1, 2018
2 parents af23c23 + 3beb84b commit 502807e
Show file tree
Hide file tree
Showing 32 changed files with 266 additions and 68 deletions.
4 changes: 3 additions & 1 deletion examples/27s.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
<!-- Pathes to the input files -->
<property name="infile" value="classpath:/testDataFile.fits.gz" />
<property name="drsfile" value="classpath:/testDrsFile.drs.fits.gz" />
<property name="integralGainFile" value="classpath:/default/gain_sorted_20131127.csv" />

<property name="pixelDelayFile" value="classpath:/default/delays_lightpulser_20150217.csv" />

<service id="calibService" class="fact.calibrationservice.ConstantCalibService" />
<service id="gainService" class="fact.gainservice.GainService" />

<stream id="fact" class="fact.io.hdureader.FITSStream" url="${infile}"/>

Expand Down
2 changes: 1 addition & 1 deletion examples/apply_model.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<property name="infile" value="classpath:/testDataFile.fits.gz" />
<property name="drsfile" value="classpath:/testDrsFile.drs.fits.gz" />

<property name="integralGainFile" value="classpath:/default/gain_sorted_20131127.csv" />
<property name="pixelDelayFile" value="classpath:/default/delays_lightpulser_20150217.csv" />

<property name="outfile" value="file:/home/fabian/testoutfile.txt" />
Expand All @@ -14,6 +13,7 @@
<service id="auxService" class="fact.auxservice.AuxFileService" auxFolder="${auxFolder}" />

<service id="calibService" class="fact.calibrationservice.ConstantCalibService" />
<service id="gainService" class="fact.gainservice.GainService" />

<!--In case you want to analyze .zfits files.-->
<!-- <stream id="fact" class="fact.io.hdureader.FITSStream" url="${infile}"/> -->
Expand Down
2 changes: 1 addition & 1 deletion examples/fellwalker_example.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<property name="drsfile" value="classpath:/testMcDrsFile.drs.fits.gz" />
<property name="auxFolder" value="file:src/main/resources/aux/" />

<property name="integralGainFile" value="classpath:/default/defaultIntegralGains.csv" />
<property name="pixelDelayFile" value="classpath:/default/delays_zero.csv" />

<property name="outfile" value="file:/home/fabian/testoutfile_mc.txt" />

<service id="calibService" class="fact.calibrationservice.ConstantCalibService" />
<service id="auxService" class="fact.auxservice.AuxFileService" auxFolder="${auxFolder}" />
<service id="gainService" class="fact.gainservice.GainService" />

<stream id="fact" class="fact.io.hdureader.FITSStream" url="${infile}"/>

Expand Down
2 changes: 1 addition & 1 deletion examples/forErna/std_analysis_erna_observations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

<property name="aux_source" value="file:./2015.sqlite" />

<property name="integralGainFile" value="classpath:/default/gain_sorted_20131127.csv" />
<property name="pixelDelayFile" value="classpath:/default/delays_lightpulser_20150217.csv" />

<service id="auxService" class="fact.auxservice.SqliteService" url="${aux_source}" />
<service id="calibService" class="fact.calibrationservice.ConstantCalibService" />
<service id="gainService" class="fact.gainservice.GainService" />

<!-- Has to be a FactFileListMultiStream in order to work on tasks from gridmap and the executor script.-->
<stream id="fact" class="fact.io.FactFileListMultiStream" url="${input}">
Expand Down
2 changes: 1 addition & 1 deletion examples/forErna/std_analysis_erna_simulations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

<property name="auxFolder" value="file:src/main/resources/aux/" />

<property name="integralGainFile" value="classpath:/default/defaultIntegralGains.csv" />
<property name="pixelDelayFile" value="classpath:/default/delays_zero.csv" />

<service id="calibService" class="fact.calibrationservice.ConstantCalibService" />
<service id="auxService" class="fact.auxservice.AuxFileService" auxFolder="${auxFolder}" />
<service id="gainService" class="fact.gainservice.GainService" />

<!-- Has to be a FactFileListMultiStream in order to work on tasks from gridmap and the executor script.-->
<stream id="fact" class="fact.io.FactFileListMultiStream" url="${input}">
Expand Down
2 changes: 1 addition & 1 deletion examples/mc_viewer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<property name="auxFolder" value="file:src/main/resources/aux/" />

<property name="pixelDelayFile" value="classpath:/default/delays_zero.csv" />
<property name="integralGainFile" value="classpath:/default/defaultIntegralGains.csv" />

<!-- The calibration service delivers aux data to the processors -->
<service id="calibService" class="fact.calibrationservice.ConstantCalibService" />
<service id="gainService" class="fact.gainservice.GainService" />
<service id="auxService" class="fact.auxservice.AuxFileService" auxFolder="${auxFolder}" />

<!-- Name of the stream and url to the input file -->
Expand Down
3 changes: 2 additions & 1 deletion examples/measure_performance.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@

<property name="infile" value="classpath:/testDataFile.fits.gz" />
<property name="drsfile" value="classpath:/testDrsFile.drs.fits.gz" />
<property name="integralGainFile" value="classpath:/default/gain_sorted_20131127.csv" />

<property name="pixelDelayFile" value="classpath:/default/delays_lightpulser_20150217.csv" />

<service id="auxService" class="fact.auxservice.AuxFileService" auxFolder="file:src/main/resources/aux/" />
<service id="calibService" class="fact.calibrationservice.ConstantCalibService" />
<service id="gainService" class="fact.gainservice.GainService" />

<stream id="fact" class="fact.io.hdureader.FITSStream" url="${infile}"/>

Expand Down
2 changes: 1 addition & 1 deletion examples/save_dl1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<property name="drsfile" value="" />
<property name="outfile" value="" />

<property name="integralGainFile" value="classpath:/default/gain_sorted_20131127.csv" />
<property name="pixelDelayFile" value="classpath:/default/delays_lightpulser_20150217.csv" />

<service id="calibService" class="fact.calibrationservice.ConstantCalibService" />
<service id="gainService" class="fact.gainservice.GainService" />

<stream id="fact" class="fact.io.hdureader.FITSStream" url="${infile}"/>

Expand Down
2 changes: 1 addition & 1 deletion examples/stdAnalysis.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<property name="drsfile" value="classpath:/testDrsFile.drs.fits.gz" />
<property name="auxFolder" value="file:src/main/resources/aux/" />

<property name="integralGainFile" value="classpath:/default/gain_sorted_20131127.csv" />
<property name="pixelDelayFile" value="classpath:/default/delays_lightpulser_20150217.csv" />

<property name="outfile" value="file:test.fits" />

<service id="auxService" class="fact.auxservice.AuxFileService" auxFolder="${auxFolder}" />
<service id="calibService" class="fact.calibrationservice.ConstantCalibService" />
<service id="gainService" class="fact.gainservice.GainService" />

<stream id="fact" class="fact.io.hdureader.FITSStream" url="${infile}"/>

Expand Down
3 changes: 2 additions & 1 deletion examples/studies/closedShutterGainCalibration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
<!-- Pathes to the input files -->
<property name="infile" value="classpath:/testDataFile.fits.gz" />
<property name="drsfile" value="classpath:/testDrsFile.drs.fits.gz" />
<property name="integralGainFile" value="classpath:/default/gain_sorted_20131127.csv" />

<property name="pixelDelayFile" value="classpath:/default/delays_lightpulser_20150217.csv" />

<service id="auxService" class="fact.auxservice.AuxFileService" auxFolder="file:src/main/resources/aux/" />
<service id="calibService" class="fact.calibrationservice.ConstantCalibService" />
<service id="gainService" class="fact.gainservice.GainService" />

<!-- Open Shutter Data: -->
<!-- <property name="data" value="/local/data/kgray/test/20130104_095.fits.gz" /> -->
Expand Down
3 changes: 2 additions & 1 deletion examples/studies/extractionTest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
<!-- Pathes to the input files -->
<property name="infile" value="classpath:/testMcFile.fits.gz" />
<property name="drsfile" value="classpath:/testMcDrsFile.drs.fits.gz" />
<property name="integralGainFile" value="classpath:/default/defaultIntegralGains.csv" />

<property name="pixelDelayFile" value="classpath:/default/delays_zero.csv" />

<service id="calibService" class="fact.calibrationservice.ConstantCalibService" />
<service id="gainService" class="fact.gainservice.GainService" />

<!-- Name of the stream and url to the input file -->
<stream id="fact" class="fact.io.hdureader.FITSStream" url="${infile}" />
Expand Down
2 changes: 1 addition & 1 deletion examples/studies/jumpStudy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- Pathes to the input files -->
<property name="infile" value="classpath:/testDataFile.fits.gz" />
<property name="drsfile" value="classpath:/testDrsFile.drs.fits.gz" />
<property name="integralGainFile" value="classpath:/default/gain_sorted_20131127.csv" />

<property name="pixelDelayFile" value="classpath:/default/delays_lightpulser_20150217.csv" />
<service id="auxService" class="fact.auxservice.AuxFileService" auxFolder="file:src/main/resources/aux/" />
<!-- Name des Streams und pfad zu dem Daten-File -->
Expand Down
2 changes: 1 addition & 1 deletion examples/studies/muon_fitting.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
<property name="drsfile" value="classpath:/testMcDrsFile.drs.fits.gz" />
<property name="auxFolder" value="file:src/main/resources/aux/" />

<property name="integralGainFile" value="classpath:/default/defaultIntegralGains.csv" />
<property name="pixelDelayFile" value="classpath:/default/delays_zero.csv" />

<service id="calibService" class="fact.calibrationservice.ConstantCalibService" />
<service id="auxService" class="fact.auxservice.AuxFileService" auxFolder="${auxFolder}" />
<service id="gainService" class="fact.gainservice.GainService" />

<!-- Name of the stream and url to the input file -->
<stream id="fact" class="fact.io.hdureader.FITSStream" url="${infile}"/>
Expand Down
2 changes: 1 addition & 1 deletion examples/studies/muon_identification.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<property name="infile" value="classpath:/testDataFile.fits.gz" />
<property name="drsfile" value="classpath:/testDrsFile.drs.fits.gz" />

<property name="integralGainFile" value="classpath:/default/gain_sorted_20131127.csv" />
<property name="pixelDelayFile" value="classpath:/default/delays_lightpulser_20150217.csv" />
<property name="auxpath" value="file:src/main/resources/aux/" />

<service id="auxService" class="fact.auxservice.AuxFileService" auxFolder="${auxpath}" />
<service id="calibService" class="fact.calibrationservice.ConstantCalibService" />
<service id="gainService" class="fact.gainservice.GainService" />

<property name="outfile" value="facttools.json" />

Expand Down
5 changes: 3 additions & 2 deletions examples/studies/pedestalNsbStudy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
<!-- Pathes to the input files -->
<property name="infile" value="classpath:/testDataFile.fits.gz" />
<property name="drsfile" value="classpath:/testDrsFile.drs.fits.gz" />
<property name="integralGainFile" value="classpath:/default/gain_sorted_20131127.csv" />

<property name="pixelDelayFile" value="classpath:/default/delays_lightpulser_20150217.csv" />
<service id="auxService" class="fact.auxservice.AuxFileService" auxFolder="file:src/main/resources/aux/" />
<service id="calibService" class="fact.calibrationservice.ConstantCalibService" />
<service id="gainService" class="fact.gainservice.GainService" />
<!-- Name des Streams und pfad zu dem Daten-File -->
<stream id="fact" class="fact.io.hdureader.FITSStream" url="${infile}" limit="3" />
<!-- Beschreibung des zu bearbeitenden Prozesses und zu welchem Stream dieser gehört -->
Expand All @@ -17,7 +18,7 @@
<!--<fact.datacorrection.PatchJumpRemoval dataKey="DataCalibrated" outputKey="DataCalibrated" prevEventsKey="prevEvents" startCellKey="StartCellData" jumpLimit="2.0" />-->
<fact.datacorrection.RemoveSpikes dataKey="DataCalibrated" outputKey="DataCalibrated" startCellKey="StartCellData" leftBorder="6" spikeLimit="20" topSlopeLimit="16" maxSpikeLength="4" />
<fact.datacorrection.InterpolateTimeSeries calibService="calibService" interpolateTimeLine="True" dataKey="DataCalibrated" dataOutputKey="DataCalibrated" />
<fact.extraction.BasicExtraction dataKey="DataCalibrated" outputKeyMaxAmplPos="maxPos" outputKeyPhotonCharge="photoncharge" url="${integralGainFile}" startSearchWindow="${BasicExtraction.startSearchWindow}"
<fact.extraction.BasicExtraction dataKey="DataCalibrated" outputKeyMaxAmplPos="maxPos" outputKeyPhotonCharge="photoncharge" gainService="gainService" startSearchWindow="${BasicExtraction.startSearchWindow}"
rangeSearchWindow="${BasicExtraction.rangeSearchWindow}" rangeHalfHeightWindow="25" />
<fact.extraction.RisingEdgeForPositions dataKey="DataCalibrated" amplitudePositionsKey="maxPos" outputKey="arrivalTimePos" maxSlopesKey="maxSlopesPos" />
<fact.extraction.RisingEdgePolynomFit dataKey="DataCalibrated" risingEdgeKey="arrivalTimePos" outputKey="arrivalTime" numberOfPoints="11" maxSlopesKey="maxSlopes" />
Expand Down
2 changes: 1 addition & 1 deletion examples/studies/pedestalStudies.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<property name="infile" value="classpath:/testDataFile.fits.gz" />
<property name="drsfile" value="classpath:/testDrsFile.drs.fits.gz" />

<property name="integralGainFile" value="classpath:/default/gain_sorted_20131127.csv" />
<service id="gainService" class="fact.gainservice.GainService" />
<property name="pixelDelayFile" value="classpath:/default/delays_lightpulser_20150217.csv" />

<!-- Name of the stream and url to the input file -->
Expand Down
2 changes: 1 addition & 1 deletion examples/studies/simulations_pass4.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<property name="infile" value="classpath:/ceres_output/18000/00018000.000_D_MonteCarlo018_Events.fits.gz" />
<property name="drsfile" value="classpath:/testMcDrsFile.drs.fits.gz" />

<property name="integralGainFile" value="classpath:/default/defaultIntegralGains.csv" />
<service id="gainService" class="fact.gainservice.GainService" />
<property name="pixelDelayFile" value="classpath:/default/delays_zero.csv" />

<property name="out_path_basename" value="test_ceres" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<property name="infile" value="classpath:/testDataFile.fits.gz" />
<property name="drsfile" value="classpath:/testDrsFile.drs.fits.gz" />

<property name="integralGainFile" value="classpath:/default/gain_sorted_20131127.csv" />
<property name="pixelDelayFile" value="classpath:/default/delays_lightpulser_20150217.csv" />

<property name="output" value="file:testoutfile.json" />
Expand All @@ -14,6 +13,7 @@
<service id="auxService" class="fact.auxservice.AuxFileService" auxFolder="${auxFolder}" />

<service id="calibService" class="fact.calibrationservice.ConstantCalibService" />
<service id="gainService" class="fact.gainservice.GainService" />

<stream id="fact" class="fact.io.hdureader.FITSStream" url="${infile}"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<property name="infile" value="classpath:/testDataFile.fits.gz" />
<property name="drsfile" value="classpath:/testDrsFile.drs.fits.gz" />

<property name="integralGainFile" value="classpath:/default/gain_sorted_20131127.csv" />
<property name="pixelDelayFile" value="classpath:/default/delays_lightpulser_20150217.csv" />

<property name="output" value="file:testoutfile.json" />
Expand All @@ -14,6 +13,7 @@
<service id="auxService" class="fact.auxservice.AuxFileService" auxFolder="${auxFolder}" />

<service id="calibService" class="fact.calibrationservice.ConstantCalibService" />
<service id="gainService" class="fact.gainservice.GainService" />

<stream id="fact" class="fact.io.hdureader.FITSStream" url="${infile}"/>

Expand Down
9 changes: 6 additions & 3 deletions examples/studies/test_saturated_pulses.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
<!-- Pathes to the input files -->
<property name="infile" value="classpath:/testMcFile.fits.gz" />
<property name="drsfile" value="classpath:/testMcDrsFile.drs.fits.gz" />
<property name="integralGainFile" value="classpath:/default/defaultIntegralGains.csv" />

<!-- Name of the stream and url to the input file -->
<stream id="fact" class="fact.io.hdureader.FITSStream" url="${infile}" />

<service id="gainService" class="fact.gainservice.GainService" />

<!-- Description of the process and the corresponding stream -->
<process id="2" input="fact">
<!--<stream.flow.Skip condition="%{data.EventNum} &lt; 0" />-->
Expand All @@ -19,15 +22,15 @@
<!--badChidIds="863,868,297,927,80,873,1093,1094,527,528,721,722"-->
<!--/>-->
<stream.flow.Skip condition="%{data.TriggerType} != 4" />
<fact.extraction.BasicExtraction dataKey="DataCalibrated" outputKeyMaxAmplPos="maxPos" outputKeyPhotonCharge="photoncharge" url="${integralGainFile}" startSearchWindow="${BasicExtraction.startSearchWindow}"
<fact.extraction.BasicExtraction dataKey="DataCalibrated" outputKeyMaxAmplPos="maxPos" outputKeyPhotonCharge="photoncharge" gainService="gainService" startSearchWindow="${BasicExtraction.startSearchWindow}"
rangeSearchWindow="${BasicExtraction.rangeSearchWindow}" rangeHalfHeightWindow="25" />
<fact.extraction.EstimateBaseline dataKey="DataCalibrated" outputKey="baseline" firstSlice="10" range="40" />
<fact.extraction.RisingEdgeForPositions dataKey="DataCalibrated" amplitudePositionsKey="maxPos" outputKey="arrivalTimePos" maxSlopesKey="maxSlopesPos" />
<fact.extraction.RisingEdgePolynomFit dataKey="DataCalibrated" risingEdgeKey="arrivalTimePos" outputKey="arrivalTime" numberOfPoints="11" maxSlopesKey="maxSlopes" />
<fact.extraction.TimeOverThreshold dataKey="DataCalibrated" outputKey="timeOverThreshold" firstSliceOverThresholdOutputKey="arrivalTimeTOT" positionsKey="maxPos" threshold="1800" thresholdOutputKey="thresholdForToT" />
<fact.extraction.TimeOverThreshold dataKey="DataCalibrated" outputKey="timeOverThreshold1000" firstSliceOverThresholdOutputKey="arrivalTimeTOT1000" positionsKey="maxPos" threshold="1000" thresholdOutputKey="thresholdForToT1000" />
<fact.datacorrection.CorrectSaturation dataKey="DataCalibrated" outputKey="DataNoSat" totKey="timeOverThreshold" firstSliceOverThresholdKey="arrivalTimeTOT" threshold="1800" maxPosKey="maxPos" baselineKey="baseline" />
<fact.extraction.BasicExtraction dataKey="DataNoSat" outputKeyMaxAmplPos="maxPosNoSat" outputKeyPhotonCharge="phChargeNoSat" url="${integralGainFile}" startSearchWindow="${BasicExtraction.startSearchWindow}"
<fact.extraction.BasicExtraction dataKey="DataNoSat" outputKeyMaxAmplPos="maxPosNoSat" outputKeyPhotonCharge="phChargeNoSat" gainService="gainService" startSearchWindow="${BasicExtraction.startSearchWindow}"
rangeSearchWindow="${BasicExtraction.rangeSearchWindow}" rangeHalfHeightWindow="25" />
<fact.extraction.PhotonChargeTimeOverThreshold timeOverThresholdKey="timeOverThreshold" thresholdKey="thresholdForToT" outputKey="photonchargeSaturated" />
<fact.extraction.PhotonChargeTimeOverThreshold timeOverThresholdKey="timeOverThreshold1000" thresholdKey="thresholdForToT1000" outputKey="photonchargeSaturated1000" />
Expand Down
3 changes: 2 additions & 1 deletion examples/viewer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
<!-- Pathes to the input files -->
<property name="infile" value="classpath:/testDataFile.fits.gz" />
<property name="drsfile" value="classpath:/testDrsFile.drs.fits.gz" />
<property name="integralGainFile" value="classpath:/default/gain_sorted_20131127.csv" />

<property name="pixelDelayFile" value="classpath:/default/delays_lightpulser_20150217.csv" />
<property name="auxFolder" value="file:src/main/resources/aux/" />

<service id="auxService" class="fact.auxservice.AuxFileService" auxFolder="${auxFolder}" />
<service id="calibService" class="fact.calibrationservice.ConstantCalibService" />
<service id="gainService" class="fact.gainservice.GainService" />

<stream id="fact" class="fact.io.hdureader.FITSStream" url="${infile}"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,20 @@ public void init() {
config20141115.notUsablePixels.addAll(brokenDrsBoard20142015);

// in the night of 2015-01-08, two pixels were broken additionally (729 & 750)
HardwareConfiguration config20150108 = new HardwareConfiguration(ZonedDateTime.of(2015, 01, 8, 12, 0, 0, 0, ZoneOffset.UTC));
HardwareConfiguration config20150108 = new HardwareConfiguration(ZonedDateTime.of(2015, 1, 8, 12, 0, 0, 0, ZoneOffset.UTC));
config20150108.badPixels.addAll(badPixelsFromBeginning);
config20150108.badPixels.addById(729);
config20150108.badPixels.addById(750);
config20150108.notUsablePixels.addAll(brokenDrsBoard20142015);

// On 2015-01-09, pixel 729 recovered
HardwareConfiguration config20150109 = new HardwareConfiguration(ZonedDateTime.of(2015, 01, 9, 12, 0, 0, 0, ZoneOffset.UTC));
HardwareConfiguration config20150109 = new HardwareConfiguration(ZonedDateTime.of(2015, 1, 9, 12, 0, 0, 0, ZoneOffset.UTC));
config20150109.badPixels.addAll(badPixelsFromBeginning);
config20150109.badPixels.addById(750);
config20150109.notUsablePixels.addAll(brokenDrsBoard20142015);

// On 2015-01-31, pixel 750 recovered
HardwareConfiguration config20150131 = new HardwareConfiguration(ZonedDateTime.of(2015, 01, 31, 12, 0, 0, 0, ZoneOffset.UTC));
HardwareConfiguration config20150131 = new HardwareConfiguration(ZonedDateTime.of(2015, 1, 31, 12, 0, 0, 0, ZoneOffset.UTC));
config20150131.badPixels.addAll(badPixelsFromBeginning);
config20150131.notUsablePixels.addAll(brokenDrsBoard20142015);

Expand Down
Loading

0 comments on commit 502807e

Please sign in to comment.