-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Individual pixel gain in spe #204
Open
dneise
wants to merge
21
commits into
master
Choose a base branch
from
individual_pixel_gain_in_spe_197
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
67011be
use individual pixel gains (from integralGain file)
6359d71
implement some tests
fdeca23
create a new calibration service to provide the integral single pulse…
b52aa7d
Implented a processor, to calibrate Timelines
d44ad0e
use SinglePulseGainCalibration before BasicExtraction
aacfc67
Get rid of SinglePulseCalibration inside SinglepulseExtraction
ade6a1e
Revert "Get rid of SinglePulseCalibration inside SinglepulseExtraction"
daeb8d6
Revert "use SinglePulseGainCalibration before BasicExtraction"
ba86cd8
Revert "Implented a processor, to calibrate Timelines"
039d26a
Merge pull request #207 from fact-project/SinglePulseGainCalibrationS…
068744a
merge master back into development branch
4ba4614
fix imports for TemplatePulse
44fa913
use @Service for service
b24928a
use @Service for service; remove defeault_value; WS
f3882b1
typo, sorry
b4bd6c9
convert indents to spaces
8ab6946
implement Service instead of CalibrationService
047f431
remove superfluous factor 10
6a72d30
use SinglePulseGainCalibService in ConvertSinglePulses2Timeseries as …
911945b
another place found, where factSinglePeAmplitudeInMv was used
d8f42aa
add a test
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package fact.utils; | ||
|
||
import fact.features.singlePulse.timeSeriesExtraction.TemplatePulse; | ||
import junit.framework.Assert; | ||
import org.junit.Test; | ||
|
||
public class TemplatePulseTest { | ||
|
||
@Test | ||
public void testIfResultNear24() { | ||
|
||
double result = TemplatePulse.factSinglePePulseIntegral(); | ||
System.out.println(result); | ||
Assert.assertTrue( | ||
Math.abs(result - 24.37) < 0.01 | ||
); | ||
} | ||
|
||
@Test | ||
public void testIntegrateEmptySamples() { | ||
Throwable e = null; | ||
try { | ||
double[] samples = new double[]{}; | ||
TemplatePulse.integrate(samples, 0, 10); | ||
}catch(Throwable ex) { | ||
e = ex; | ||
} | ||
Assert.assertTrue(e instanceof IndexOutOfBoundsException); | ||
} | ||
|
||
@Test | ||
public void testIntegrate() { | ||
double[] samples = new double[]{1,2,3}; | ||
Assert.assertEquals( | ||
6., | ||
TemplatePulse.integrate(samples, 0, 3) | ||
); | ||
} | ||
|
||
@Test | ||
public void testMean() { | ||
double[] foo = new double[]{1,2,3}; | ||
Assert.assertEquals( | ||
2., | ||
TemplatePulse.mean(foo) | ||
); | ||
} | ||
|
||
@Test | ||
public void testfindHalfHeightPosition() { | ||
double[] foo = new double[]{0.1, 0.3, 0.7, 1, 1, 0.5, 0.3}; | ||
Assert.assertEquals( | ||
1, | ||
TemplatePulse.findHalfHeightPosition(foo, 1.) | ||
); | ||
} | ||
|
||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is shit .. I am misusing loadIntegralGainFile as an
__init__
method. so I initialize this member here...but that's of course total bullshit.