radiation 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,6 +27,7 @@ describe Radiation do
27
27
  it "can access different data resources" do
28
28
  expect { Radiation::Source.new(nuclide: "Ra-226") }.to_not raise_error
29
29
  expect { Radiation::Source.new(nuclide: "Ra-226", resource: "nucleide.org") }.to_not raise_error
30
+ expect { Radiation::Source.new(nuclide: "Ra-226", resource: "iaea") }.to_not raise_error
30
31
  end
31
32
 
32
33
  it "checks for valid nuclei" do
@@ -42,6 +43,7 @@ describe Radiation do
42
43
  it "gives an error if no record is found" do
43
44
  expect { Radiation::Source.new(nuclide: "Ra-15") }.to raise_error
44
45
  expect { Radiation::Source.new(nuclide: "Ra-15", resource: "nucleide.org") }.to raise_error
46
+ expect { Radiation::Source.new(nuclide: "Ra-15", resource: "iaea") }.to raise_error
45
47
  end
46
48
 
47
49
  it "can access nuclide halflife" do
@@ -73,7 +75,7 @@ describe Radiation do
73
75
  end
74
76
 
75
77
  it "can calculate detection efficiencies" do
76
- Radiation::Spectrum.new(source: source).parse_hdtv("./samples/B0-Ra226.xml").calibrate.efficiencies.select{|p| p[:energy].to_f.to_i == 295}.first[:efficiency].should be_a_kind_of(Plusminus::PlusminusFloat)
78
+ Radiation::Spectrum.new(source: source).parse_hdtv("./samples/B0-Ra226.xml").calibrate.efficiencies.peaks.select{|p| p[:energy].to_f.to_i == 295}.first[:efficiency].should be_a_kind_of(Plusminus::PlusminusFloat)
77
79
  end
78
80
 
79
81
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Mayer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-09 00:00:00.000000000 Z
11
+ date: 2013-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: plusminus
@@ -157,9 +157,11 @@ files:
157
157
  - data/Eu-152.csv
158
158
  - data/Ra-226.bib
159
159
  - data/Ra-226.csv
160
+ - data/iaea-xgamma.json
160
161
  - lib/radiation.rb
161
162
  - lib/radiation/cli.rb
162
163
  - lib/radiation/resource.rb
164
+ - lib/radiation/resource/iaea.rb
163
165
  - lib/radiation/resource/internal.rb
164
166
  - lib/radiation/resource/nucleideorg.rb
165
167
  - lib/radiation/source.rb