-
Notifications
You must be signed in to change notification settings - Fork 1
Tickets/DM-52459: add donut_id #26
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
a417739
add donut_id to calcZernikesTask
suberlak 769c102
add donut_id to cutOutDonutsBase
suberlak 960ea08
add donut_id to donutStamp
suberlak 24cf11a
add donut_id to donutStampSelector
suberlak 392c983
add donut_id to donutStamps
suberlak f0411d5
add donut_id creation in generateDonutCatalogUtils
suberlak 0edf50d
add donut_id to test for calcZernikesTie Cwfs
suberlak 19b676d
add donut_id to test for calcZerniokesTie Science
suberlak 5aaad19
add donut_id to calcZernikesUnpaired
suberlak 4568eca
add donut_id to test for cutOutDonutsBase
suberlak 75dd84f
add donut_id to test for donutStamp
suberlak 699dde5
add donut_id to test for donutStampSelectorTask
suberlak 607a1d8
add donut_id to test for donutStamps
suberlak 430d4a7
add donut_id to test for generateDonutCatalogWcs
suberlak 55eb17a
add donut_id to test for generateDonutDirect
suberlak 0edf867
add news fragment
suberlak 3919645
add test for donut_id
suberlak 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 hidden or 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 @@ | ||
| Add donut_id generated during the creation of donut table. |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -68,6 +68,7 @@ def _makeStamps(self, nStamps: int, stampSize: int, testDefaults: bool = False) | |
| dfcTypes[:halfStampIdx] = [DefocalType.Intra.value] * halfStampIdx | ||
| dfcDists = np.ones(nStamps) * 1.25 | ||
| bandpass = ["r"] * nStamps | ||
| donutId = np.arange(nStamps) | ||
|
|
||
| metadata = PropertyList() | ||
| metadata["RA_DEG"] = ras | ||
|
|
@@ -77,6 +78,7 @@ def _makeStamps(self, nStamps: int, stampSize: int, testDefaults: bool = False) | |
| metadata["DET_NAME"] = detectorNames | ||
| metadata["CAM_NAME"] = camNames | ||
| metadata["DFC_TYPE"] = dfcTypes | ||
| metadata["DONUT_ID"] = donutId | ||
| if testDefaults is False: | ||
| metadata["DFC_DIST"] = dfcDists | ||
| metadata["BLEND_CX"] = blendCentX | ||
|
|
@@ -122,6 +124,9 @@ def testFactory(self) -> None: | |
| bandpass = donutStamp.bandpass | ||
| self.assertEqual(bandpass, "r") | ||
|
|
||
| donutId = donutStamp.donut_id | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you could remove the blank line above this since it goes with testing the properties. |
||
| self.assertEqual(i, donutId) | ||
|
|
||
| self.assertIsInstance(donutStamp.wep_im, Image) | ||
|
|
||
| def testFactoryMetadataDefaults(self) -> None: | ||
|
|
@@ -145,6 +150,9 @@ def testFactoryMetadataDefaults(self) -> None: | |
| # Test default bandpass value is empty string | ||
| bandpass = donutStamp.bandpass | ||
| self.assertEqual(bandpass, "") | ||
| # Test default donutId value is empty string | ||
| donutId = donutStamp.donut_id | ||
| self.assertEqual(donutId, i) | ||
|
|
||
| def testGetCamera(self) -> None: | ||
| donutStamp = DonutStamp.factory(self.testStamps[0], self.testMetadata, 0) | ||
|
|
@@ -189,6 +197,7 @@ def testCalcFieldXY(self) -> None: | |
| "R22_S11", | ||
| "LSSTCam", | ||
| "r", | ||
| "", | ||
| ) | ||
| np.testing.assert_array_almost_equal(donutStamp.calcFieldXY(), (0, 0)) | ||
|
|
||
|
|
@@ -213,6 +222,7 @@ def testCalcFieldXY(self) -> None: | |
| detName, | ||
| "LSSTCam", | ||
| "r", | ||
| "", | ||
| ) | ||
| fieldAngle = donutStamp.calcFieldXY() | ||
| self.assertEqual(fieldAngle[0], np.degrees(trueFieldAngleX)) | ||
|
|
@@ -229,6 +239,7 @@ def testMakeMask(self) -> None: | |
| "R22_S11", | ||
| "LSSTCam", | ||
| "r", | ||
| "", | ||
| ) | ||
|
|
||
| # Check that mask is empty at start | ||
|
|
@@ -284,6 +295,7 @@ def _testWepImage( | |
| detName, | ||
| "LSSTCam", | ||
| "r", | ||
| "", | ||
| ) | ||
|
|
||
| # Make the mask | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
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.
Remove blank line.