Skip to content

Commit

Permalink
Merge pull request #129 from fact-project/fixSourceTrafo
Browse files Browse the repository at this point in the history
Merge fixSourceTrafo in Master, new Version 0.14.0
  • Loading branch information
ftemme committed May 3, 2016
2 parents ffc5395 + 1800d71 commit c8e27bb
Show file tree
Hide file tree
Showing 6 changed files with 305 additions and 223 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
#Changelog for the fact-tools

## Version 0.14.0 -- 03.05.2016

* Bug fix for the calculation of the source position (and position of stars in the camera):
* There was an arcsin in the calculation of the az of a given ra/dec coordinate, causing the calculated az to be in -90 to 90 degree.
* This was not a problem for Crab Nebula data (or at least for most of it, so that a clear signal could be achieved) but for Mrk 421 data. For this data, there was no signal of the source visible.
* New calculation formulas are now implemented, which are using the atan2 method for this.
* The new calculated coordinate transformation were checked against python implementation and also checked by Max Ahnen, who could clearly see a signal of Mrk 421 after the bugfix.
* Corresponding tests were adapted.
* There is now also an example file for the erna std analysis (this is work in progress)


## Version 0.13.3 -- 06.04.2016

* new Processor: `fact.ApplyModel` which applies a .pmml model to data in the data item. The model can be written with SciKit learn.
Expand Down
98 changes: 98 additions & 0 deletions examples/forErna/std_analysis_erna.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<container>
<!--
This Process contains the standard analysis for FACT, with modifications to be used with the SGE/TORQUE cluster
execution tool ERNA (Easy RuN Access) https://github.com/fact-project/erna
-->
<properties url="classpath:/default/settings.properties" />

<property name="db" 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="${db}" />
<service id="calibService" class="fact.calibrationservice.ConstantCalibService" />

<!-- 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}">
<stream class="fact.io.zfits.ZFitsStream" id="_" />
</stream>

<process id="1" input="fact">
<!-- prevEventAndSkip: -->
<!-- PreviousEventInfo, Skip(no Data Trigger) -->
<include url="classpath:/default/data/prevEventAndSkip.xml" />
<!-- Output: Data -->

<!-- Calibration: -->
<fact.datacorrection.DrsCalibration
key="Data"
outputKey="DataCalibrated"
/>
<fact.datacorrection.PatchJumpRemoval
dataKey="DataCalibrated"
outputKey="DataCalibrated"
prevEventsKey="prevEvents"
startCellKey="StartCellData"
jumpLimit="${patchJumpRemoval_jumpLimit}"
/>
<fact.datacorrection.RemoveSpikes
dataKey="DataCalibrated"
outputKey="DataCalibrated"
startCellKey="StartCellData"
leftBorder="${removeSpikes_leftBorder}"
spikeLimit="${removeSpikes_spikeLimit}"
topSlopeLimit="${removeSpikes_topSlopeLimit}"
maxSpikeLength="${removeSpikes_maxSpikeLength}"
/>
<fact.filter.DrsTimeCalibration
outputKey="timeCalibConst"
/>
<fact.filter.ArrayTimeCorrection
dataKey="DataCalibrated"
timeCalibConstKey="timeCalibConst"
outputKey="DataCalibrated"
/>
<fact.datacorrection.InterpolateTimeSeries
calibService="calibService"
dataKey="DataCalibrated"
dataOutputKey="DataCalibrated"
/>

<!-- Extraction -->
<!-- BasicExtraction, RisingEdgeForPositions, RisingEdgePolynomFit, TimeOverThreshold,
PhotonChargeTimeOverThreshold, HandleSaturation, CorrectPixelDelays-->
<include url="classpath:/default/data/extraction.xml" />
<!-- Output: photoncharge, arrivalTime -->

<!-- Cleaning -->
<!-- SourcePosition(Cetatauri), CoreNeighborCleanTimeNeighbor-->
<include url="classpath:/default/data/cleaning.xml" />
<!-- Output: shower -->

<!-- Parameter calculation (only source independent) -->
<!-- ArrayMean(photoncharge,arrivalTime), ArrayStatistics(photoncharge,arrivalTime,maxSlopes,
arrivalTimePos,maxSlopesPos,maxAmplitudePosition,photonchargeSaturated,arrivalTimeTOT),
Size, DistributionFromShower, M3Long, Length, Width, NumberOfIslands, TimeGraident,
Concentration, ConcentrationCore, ConcentrationAtCenterOfGravity, Leakage, TimeSpread,
ShowerSlope, Disp -->
<include url="classpath:/default/data/parameterCalc.xml" />
<!-- Output: source independent parameters -->

<!-- Parameter calculation (only source dependent) -->
<!-- SourcePosition(${sourcename}), AntiSourcePosition(5), Alpha(for 6 Sources),
Distance(for 6 Sources), CosDeltaAlpha(for 6 Sources), Theta(for 6 Sources) -->
<include url="classpath:/default/data/sourceParameter.xml" />
<!-- Output: source dependent parameters -->

<!-- its important that you output a valid json file for this to work in conjuction with gridmap -->
<fact.io.JSONWriter keys="${keysForOutput}"
url="${output}"
writeListOfItems="True"
specialDoubleValuesAsString="True"
pixelSetsAsInt="True"
/>
<!-- <PrintData/> -->
<!-- <fact.io.PrintKeysOnConsole keys="${keysForOutput}" /> -->
</process>
</container>
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>de.sfb876</groupId>
<artifactId>fact-tools</artifactId>
<name>fact-tools</name>
<version>0.13.3</version>
<version>0.14.0</version>
<url>http://sfb876.de/fact-tools/</url>

<description>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/fact/auxservice/SqliteService.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ private TreeSet<AuxPoint> getSourceDataFromCursor(ISqlJetCursor cursor) throws S
m.put("Angle", cursor.getFloat("Angle"));
m.put("Ra_src", cursor.getFloat("Ra_src"));
m.put("Dec_src", cursor.getFloat("Dec_src"));
m.put("Ra_cmd", cursor.getFloat("Ra_cmd"));
m.put("Dec_cmd", cursor.getFloat("Dec_cmd"));
// m.put("Ra_cmd", cursor.getFloat("Ra_cmd"));
// m.put("Dec_cmd", cursor.getFloat("Dec_cmd"));
m.put("Offset", cursor.getFloat("Offset"));

DateTimeFormatter formatter = DateTimeFormat.forPattern("YYYY-MM-DD HH:mm:ss.SSSSSS");
Expand Down
Loading

0 comments on commit c8e27bb

Please sign in to comment.