Skip to content

Commit

Permalink
Added test and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthlal25 committed Mar 7, 2020
1 parent 463ea42 commit 99ed1c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/src/background/estimators.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ All of these estimators are subtypes of [`Background.BackgroundEstimator`](@ref)
Mean
Median
Mode
MMMBackground
```

## API/Reference
Expand Down
6 changes: 4 additions & 2 deletions test/background/simple.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ function test_zeros(estimator)
@test estimate_background(estimator, data, dims = 2) zeros(10)
end

@testset "$E" for E in [Mean, Median, MMMBackground]
@test estimate_background(E, ones(10, 10)) == estimate_background(E(), ones(10, 10))
@testset "$E" for E in [Mean, Median, MMMBackground()]
if E != MMMBackground()
@test estimate_background(E, ones(10, 10)) == estimate_background(E(), ones(10, 10))
end
test_ones(E)
test_zeros(E)
end
Expand Down

0 comments on commit 99ed1c3

Please sign in to comment.