-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
quantity conversion. profile shape and bad hdu bug
- Loading branch information
Showing
6 changed files
with
93 additions
and
33 deletions.
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
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,16 @@ | ||
module Test.QuantitySpec where | ||
|
||
import Data.Massiv.Array as M | ||
import NSO.Image.Quantity (forcePositive360) | ||
import NSO.Prelude | ||
import Skeletest | ||
|
||
|
||
spec :: Spec | ||
spec = | ||
describe "Quantities" $ do | ||
describe "convertData" $ do | ||
it "should move negative angles to positive" $ do | ||
let arr = M.fromLists' @P @Ix1 @Float Seq [-100, -200, 0, 30, 300, 400] | ||
let arr2 = M.map forcePositive360 arr | ||
M.toLists (computeAs P arr2) `shouldBe` [260, 160, 0, 30, 300, 40] |